public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Tahsin Erdogan <tahsin@google.com>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: inplace xattr block update fails to deduplicate blocks
Date: Sat, 5 Aug 2017 22:50:42 -0400	[thread overview]
Message-ID: <20170806025042.anluiwr3bsr2z4ng@thunk.org> (raw)
In-Reply-To: <EAEB944F-E38E-41CE-ACE6-AC9BE0E28598@dilger.ca>

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

      reply	other threads:[~2017-08-06  2:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15  0:25 [PATCH] ext4: inplace xattr block update fails to deduplicate blocks Tahsin Erdogan
2017-07-15  9:49 ` Andreas Dilger
2017-08-06  2:50   ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170806025042.anluiwr3bsr2z4ng@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tahsin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox