Re: Linux slack space question

From: Bob Copeland
Date: Fri Dec 08 2006 - 12:46:25 EST


On 12/8/06, Maria Short <mgolod@xxxxxxxx> wrote:
What I need is the code in the kernel that does that. I have been
looking at http://lxr.linux.no/source/fs/ext3/inode.c but I could not
find the specific code for partially filling the last block and
placing an EOF at the end, leaving the rest to slack space.

There is no place where it writes an EOF. The size of the file is
stored in metadata (e.g. inode->i_size), and only the appropriate
number of blocks up to i_size are read or written to. Look at
ext3_get_block to see how blocks are read and allocated.

Bob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/