summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2017-08-06 05:41:42 +0300
committerTheodore Ts'o <tytso@mit.edu>2017-08-06 05:41:42 +0300
commitec00022030da5761518476096626338bd67df57a (patch)
treee6d9d86c05a0a98e625a0f0cafb1f944f3b611ac /fs/ext4/ext4.h
parent77a2e84d51729da7957d19283523af7b571d61f6 (diff)
downloadlinux-ec00022030da5761518476096626338bd67df57a.tar.xz
ext4: inplace xattr block update fails to deduplicate blocks
When an xattr block has a single reference, block is updated inplace and it is reinserted to the cache. Later, a cache lookup is performed to see whether an existing block has the same contents. This cache lookup will most of the time return the just inserted entry so deduplication is not achieved. Running the following test script will produce two xattr blocks which can be observed in "File ACL: " line of debugfs output: mke2fs -b 1024 -I 128 -F -O extent /dev/sdb 1G mount /dev/sdb /mnt/sdb touch /mnt/sdb/{x,y} setfattr -n user.1 -v aaa /mnt/sdb/x setfattr -n user.2 -v bbb /mnt/sdb/x setfattr -n user.1 -v aaa /mnt/sdb/y setfattr -n user.2 -v bbb /mnt/sdb/y debugfs -R 'stat x' /dev/sdb | cat debugfs -R 'stat y' /dev/sdb | cat This patch defers the reinsertion to the cache so that we can locate other blocks with the same contents. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Diffstat (limited to 'fs/ext4/ext4.h')
0 files changed, 0 insertions, 0 deletions