]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ext4: New rec_len encoding for very large blocksizes
authorWei Yongjun <yjwei@cn.fujitsu.com>
Sun, 15 Feb 2009 04:01:36 +0000 (23:01 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 15 Feb 2009 04:01:36 +0000 (23:01 -0500)
commit3d0518f4758eca4339e75e5b9dbb7e06a5ce08b4
tree30a45a1c82d830646a69591c470680573e14de07
parent8bad4597c2d71365adfa846ea1ca6cf99161a455
ext4: New rec_len encoding for very large blocksizes

The rec_len field in the directory entry is 16 bits, so to encode
blocksizes larger than 64k becomes problematic.  This patch allows us
to supprot block sizes up to 256k, by using the low 2 bits to extend
the range of rec_len to 2**18-1 (since valid rec_len sizes must be a
multiple of 4).  We use the convention that a rec_len of 0 or 65535
means the filesystem block size, for compatibility with older kernels.

It's unlikely we'll see VM pages of up to 256k, but at some point we
might find that the Linux VM has been enhanced to support filesystem
block sizes > than the VM page size, at which point it might be useful
for some applications to allow very large filesystem block sizes.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/namei.c