Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Dave Chinner <dgc@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Lauri Gates <lauri.gates@gmail.com>,
	linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
	Christian Brauner <christian@brauner.io>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, ocfs2-devel@lists.linux.dev,
	linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org
Subject: Re: Concurrent FIEMAP on reflinked files serialises on the AGF buffer lock
Date: Thu, 19 Nov 2026 07:16:31 +1100	[thread overview]
Message-ID: <av4Hn9u80fs8iHZ6@dread> (raw)
In-Reply-To: <20261117-kiefer-beinfreiheit-entnommen-685343327ac9@brauner>

On Tue, Nov 17, 2026 at 05:22:25PM +0100, Christian Brauner wrote:
> On Thu, Nov 12, 2026 at 12:05:00PM -0800, Christoph Hellwig wrote:
> > On Fri, Nov 06, 2026 at 10:40:26PM +0200, Lauri Gates wrote:
> > > The other is that for a "may share" bit, clear is the unsafe answer,
> > > so a filesystem that cannot answer should not look like one that
> > > answers "not shared". As I understand it, stx_attributes_mask makes
> > > that distinction, while struct file_attr has no validity mask today
> > > (it is size-versioned, so one could be added), so through
> > > file_getattr() btrfs would currently read as never shared. A spare
> > > bit in stx_attributes adds no field to struct statx, which I hope
> > > meets the concern Christian raised about spending statx space on the
> > > case-folding RFC [2]. If fileattr is preferred, the bit could instead
> > > mean "no shared extents", so that clear is the safe default, as it is
> > > for FS_XFLAG_CASEFOLD.
> > 
> > statx sounds good to me, but I'd really like to hear from Christian.
> 
> I'm not fond of it mostly because it seems FIEMAP is a debug interface
> and adding bits into statx() to make said debug interface quicker or
> easier to use feels very wrong to me. So I'd like to hear a better
> argument why we should do this. Otherwise, I think using file_attr as
> suggested earlier is good enough.

I really don't care if it is exposed by statx or file_attr; checking
the flag through either interface will be orders of magnitude faster
than using FIEMAP to iterate extents on every file to find shared
extents. My concern with statx is coherency - it runs completely
unlocked and so can race with operations that add/remove the reflink
flag...

Cheers,

Dave.
-- 
Dave Chinner
dgc@kernel.org

      reply	other threads:[~2026-11-18 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <auudz7Iwm2MrNA-b@dread>
     [not found] ` <20261106122355.16885-1-lauri.gates@gmail.com>
2026-11-06 15:20   ` Concurrent FIEMAP on reflinked files serialises on the AGF buffer lock Christoph Hellwig
2026-11-06 20:40     ` Lauri Gates
2026-11-12 20:05       ` Christoph Hellwig
2026-11-17 16:22         ` Christian Brauner
2026-11-18 20:16           ` Dave Chinner [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=av4Hn9u80fs8iHZ6@dread \
    --to=dgc@kernel.org \
    --cc=brauner@kernel.org \
    --cc=cem@kernel.org \
    --cc=christian@brauner.io \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=lauri.gates@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ocfs2-devel@lists.linux.dev \
    /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