Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1704735

Re: [PATCH] ext4: inplace xattr block update fails to deduplicate blocks

From Theodore Ts'o <tytso@mit.edu>
Newsgroups linux.kernel
Subject Re: [PATCH] ext4: inplace xattr block update fails to deduplicate blocks
Date 2017-08-06 05:00 +0200
Message-ID <ubjXj-4W5-1@gated-at.bofh.it> (permalink)
References <u3j85-2yP-1@gated-at.bofh.it> <u3rS2-8dL-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jul 15, 2017 at 02:49:05AM -0700, Andreas Dilger wrote:
> On Jul 14, 2017, at 5:25 PM, Tahsin Erdogan <tahsin@google.com> wrote:
> > 
> > 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>
> 
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>

Thanks, applied.

					- Ted

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] ext4: inplace xattr block update fails to deduplicate  blocks Theodore Ts'o <tytso@mit.edu> - 2017-08-06 05:00 +0200

csiph-web