Re: [Ext2-devel] [PATCH 1/4] ext2/3: Extends the max file size(ext2 in kernel)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 18, 2006  22:01 +0900, [email protected] wrote:
> The unit of ext2/ext3_inode.i_blocks is sector(512B) and the variable
> size is 4bytes, so it limits the max file size to 2TB.  
> I found that i_blocks is always counted with rounding up to the file
> system block size and does not have fractions.  So we can change the
> unit of ext2/ext3_inode.i_blocks from sector to block size.
> This change extends the maximum file size as below.
> 
>   - Add new compatible flag "EXT2_FEATURE_INCOMPAT_LARGE_BLOCK".
>     It indicates that the file size is extended.
> 
>   - If the flag is set in the super block, ext2_inode.i_blocks is
>     translated into the number of sectors and set to i_blocks of VFS
>     inode.  And, if not, ext2_inode.i_blocks is passed to i_blocks
>     of VFS inode as it is.
> 
>   - If the flag is set, the limit of the max file size defined in
>     ext2_max_size() is set to block size * 2G-1(2^31-1).

Instead of breaking all filesystems that need to create large files,
the patch should instead set "i_flags | EXT2_LARGEBLK_FL" only on inodes
that are larger than 2TB and use "blocksize" i_blocks on those files.

This preserves compatibility with existing filesystems and doesn't
impose any breakage opon an existing filesystem for anyone who wants
to use this feature.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux