linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Chris Laprise <tasket@posteo.net>
Cc: Christoph Hellwig <hch@infradead.org>, linux-btrfs@vger.kernel.org
Subject: Re: Can the output of FIEMAP on BTRFS be used to check if a file and its reflink copy might have diverged?
Date: Fri, 3 Oct 2025 21:51:02 -0700	[thread overview]
Message-ID: <aOCntgRVT0wz5IJ9@infradead.org> (raw)
In-Reply-To: <c309381f-c39e-4362-a2b2-8d677346f4a6@posteo.net>

On Sat, Oct 04, 2025 at 01:43:32AM +0000, Chris Laprise wrote:
> > > I should clarify that in this application we are not interested in physical
> > > mappings, but the logical representation of data.
> > 
> > And that's not what FIEMAP provides.
> 
> Its actually what FIEMAP provides: the reported 'logical offsets' are
> intra-file offsets mapped to extent addresses which are labeled 'physical'
> (in FIEMAP only) as a historical holdover in Btrfs.  From the "BTRFS: The
> Linux B-Tree Filesystem" paper [1] and developer reference [2]:

FIEMAP is NOT an application tool but a provider out debug output.
The target is supposed to be physical addresses, but as you've
noticed the interpretation varies widely.

If you use it, you will eventually lose data.  DONT do it, and do not
blame the file systems if it eventually happens.  If you want to be
known for a backup tools that loses data, go ahead.  But don't blame it
on anyone else.

And please, don't give me a reading on FIEMAP.  I've been involved with
it from the very beginning.  Reading out the documentation feels rather
patronizing.


      reply	other threads:[~2025-10-04  4:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  0:07 Can the output of FIEMAP on BTRFS be used to check if a file and its reflink copy might have diverged? Demi Marie Obenour
2025-09-22  0:50 ` Qu Wenruo
2025-09-22 18:24   ` Demi Marie Obenour
2025-09-22 21:38     ` Qu Wenruo
2025-09-22 16:48 ` Christoph Hellwig
2025-09-22 17:18   ` Demi Marie Obenour
2025-09-22 17:20     ` Christoph Hellwig
2025-09-22 17:30       ` Demi Marie Obenour
2025-09-22 17:31         ` Christoph Hellwig
2025-09-22 17:54           ` Demi Marie Obenour
2025-09-29  8:50             ` Christoph Hellwig
2025-09-29 23:56               ` Demi Marie Obenour
2025-09-30  1:34               ` Demi Marie Obenour
2025-10-03  7:45                 ` Christoph Hellwig
2025-09-22 23:25       ` Chris Laprise
2025-09-29  8:49         ` Christoph Hellwig
2025-09-29 23:55           ` Demi Marie Obenour
2025-10-03  7:44             ` Christoph Hellwig
2025-10-04  1:09               ` Demi Marie Obenour
2025-10-04  1:43           ` Chris Laprise
2025-10-04  4:51             ` Christoph Hellwig [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=aOCntgRVT0wz5IJ9@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tasket@posteo.net \
    /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;
as well as URLs for NNTP newsgroup(s).