rellermeyer / course_os

CS 439 course OS
BSD 3-Clause "New" or "Revised" License
38 stars 26 forks source link

File System Cannot Handle Large Files #35

Open FernandezR opened 8 years ago

FernandezR commented 8 years ago

The file system can only handle small files, this is due to a problem with the block indexing.

I will be working on solving this issue.

FernandezR commented 8 years ago

The blocksize is unable to changed at this moment. Through my testing it is apparent that the 512 blocksize has some impact in another part of the code that has yet to be isolated.

FernandezR commented 8 years ago

Trying to modify the inode structure is also limited due to it being close to the limit of the block size. If the inode size exceeds the block size the file systems cannot deal with it at this time.

FernandezR commented 8 years ago

Through examination with GDB is has become apparent that when adding files the number direct blocks in the inode is not updated. The is no reference to the size of the file, as a result the indirect blocks are never set. When a file is unable to fit in the direct blocks of a inode, it seems that it just overwrites into another region memory. When a file is added after such a file it potentially overwrites the overflow of the previous file.

FernandezR commented 8 years ago

Utilizing a text file filled with A’s I further tested the use of indirect block, this file had a size of 60K which is over the amount able to be stored in direct blocks with a 512B block size. Stepping through the code more closely it revealed that indirect are in fact being used at with those files copied from the user/hello directory. Though indirect blocks are being used for the user/hello directory files, it seems that for some reason that is not apparent when the complex modifiers are implemented for printf the filesystem crashes. I searched through the code but this issue is more deeply rooted in the code then was previously thought. It will require much more in-depth debugging to trace done the issue.