diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-03-09 17:33:16 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-10 15:08:40 -0700 |
commit | bda190760b07a7350de7ca8d9afe0fd8c667ad2d (patch) | |
tree | 1d4160e76968ff6329886e039065c8b13eab452e /fs/f2fs/acl.c | |
parent | 57ed1e95babbd2df33f70eb820c7a9984199557b (diff) |
f2fs: fix to calculate max length of contiguous free slots correctly
When lookuping for creating, we will try to record the level of current dentry
hash table if current dentry has enough contiguous slots for storing name of new
file which will be created later, this can save our lookup time when add a link
into parent dir.
But currently in find_target_dentry, our current length of contiguous free slots
is not calculated correctly. This make us leaving some holes in dentry block
occasionally, it wastes our space of dentry block.
Let's refactor the lookup flow for max slots as following to fix this issue:
a) increase max_len if current slot is free;
b) update max_slots with max_len if max_len is larger than max_slots;
c) reset max_len to zero if current slot is not free.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/acl.c')
0 files changed, 0 insertions, 0 deletions