Star64_linux/Documentation/filesystems
Jaegeuk Kim 3843154598 f2fs: introduce large directory support
This patch introduces an i_dir_level field to support large directory.

Previously, f2fs maintains multi-level hash tables to find a dentry quickly
from a bunch of chiild dentries in a directory, and the hash tables consist of
the following tree structure as below.

In Documentation/filesystems/f2fs.txt,

----------------------
A : bucket
B : block
N : MAX_DIR_HASH_DEPTH
----------------------

level #0   | A(2B)
           |
level #1   | A(2B) - A(2B)
           |
level #2   | A(2B) - A(2B) - A(2B) - A(2B)
     .     |   .       .       .       .
level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
     .     |   .       .       .       .
level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)

But, if we can guess that a directory will handle a number of child files,
we don't need to traverse the tree from level #0 to #N all the time.
Since the lower level tables contain relatively small number of dentries,
the miss ratio of the target dentry is likely to be high.

In order to avoid that, we can configure the hash tables sparsely from level #0
like this.

level #0   | A(2B) - A(2B) - A(2B) - A(2B)

level #1   | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
     .     |   .       .       .       .
level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B)
     .     |   .       .       .       .
level #N   | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B)

With this structure, we can skip the ineffective tree searches in lower level
hash tables.

This patch adds just a facility for this by introducing i_dir_level in
f2fs_inode.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-02-27 19:56:09 +09:00
..
caching
cifs
configfs
nfs Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
pohmelfs
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
9p.txt 9p: update documentation 2014-01-24 10:55:21 -06:00
adfs.txt
affs.txt
afs.txt
autofs4-mount-control.txt
automount-support.txt
befs.txt
bfs.txt
btrfs.txt btrfs: Add treelog mount option. 2014-01-28 13:20:20 -08:00
ceph.txt
coda.txt
cramfs.txt
debugfs.txt
devpts.txt
directory-locking
dlmfs.txt
dnotify.txt
dnotify_test.c
ecryptfs.txt
efivarfs.txt
exofs.txt
ext2.txt
ext3.txt
ext4.txt
f2fs.txt f2fs: introduce large directory support 2014-02-27 19:56:09 +09:00
fiemap.txt
files.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt
gfs2.txt
hfs.txt
hfsplus.txt
hpfs.txt
inotify.txt
isofs.txt
jfs.txt
Locking doc: Fix typo (acces_process_vm -> access_process_vm) 2013-12-19 15:12:21 +01:00
locks.txt
logfs.txt
Makefile
mandatory-locking.txt
ncpfs.txt
nilfs2.txt nilfs2: add comments for ioctls 2014-01-23 16:37:00 -08:00
ntfs.txt
ocfs2.txt
omfs.txt
path-lookup.txt
porting
proc.txt mm, oom: base root bonus on current usage 2014-01-30 16:56:56 -08:00
qnx6.txt
quota.txt
ramfs-rootfs-initramfs.txt
relay.txt
romfs.txt
seq_file.txt
sharedsubtree.txt
spufs.txt
squashfs.txt
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt Documentation/filesystems/sysfs.txt: fix device_attribute declaration 2014-01-23 16:37:00 -08:00
sysv-fs.txt
tmpfs.txt
ubifs.txt
udf.txt
ufs.txt
vfat.txt
vfs.txt Documentation/filesystems/vfs.txt: update file_operations documentation 2014-01-30 16:56:56 -08:00
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt
xfs.txt
xip.txt