Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

File size is limited #1

Open
tyfkda opened this issue Jun 29, 2018 · 1 comment
Open

File size is limited #1

tyfkda opened this issue Jun 29, 2018 · 1 comment
Labels

Comments

@tyfkda
Copy link
Owner

tyfkda commented Jun 29, 2018

File size is limited to 71680 bytes.
This comes from MAXFILE (= (NDIRECT(12) + NINDIRECT(512/4)) * BSIZE(512))

@takeharukato
Copy link

takeharukato commented Aug 13, 2018

Hi,

Roughly speaking, there might be two major ways to solve this issue.

  1. Expand logical block size from file system's point of view.
    It means that we should make bio.c handle contiguous sectors as a filesystem block.
    In addition to this, we should also rewrite the superblock definition and various inode space operation in fs.c ( e.g., bmap, itrunc, readi, writei, and so on). It might be more preferable to re-make file system layer completely.
  2. Add double indirect reference block in inode and fix bmap, itrunc in fs.c
    Ancient UNIX defines double indirect reference block for big files
    It can be achieved by same way as current indirect block handling in xv6.

Ideally, 1. is more preferable, but it takes much more time than 2.
I hope that the following steps might help you.

i) Add double indirect reference block in inode and fix bmap, itrunc
ii) Modify block I/O layer to handle over 512 byte sectors but set block size 512 byte at this moment.
iii) Modify super block to treat variable block size
iv) Modify bmap, itrunc, i-node, data-block bitmap operations , inode look up from disk devices with a value which a superblock has.

Thanks,
Regards,

@tyfkda tyfkda added the fs label Feb 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants