Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Lennert Buytenhek <buytenh@wantstofly.org>
To: linux-btrfs@vger.kernel.org
Subject: FS_IOC_FIEMAP fe_physical discrepancies on btrfs
Date: Sat, 27 Oct 2018 18:45:55 +0300	[thread overview]
Message-ID: <20181027154555.GH16768@wantstofly.org> (raw)

Hello!

FS_IOC_FIEMAP on btrfs seems to be returning fe_physical values that
don't always correspond to the actual on-disk data locations.  For some
files the values match, but e.g. for this file:

# filefrag -v foo
Filesystem type is: 9123683e
File size of foo is 4096 (1 block of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:    5774454..   5774454:      1:             last,eof
foo: 1 extent found
#

The file data is actually on disk not in block 5774454 (0x581c76), but
in block 6038646 (0x5c2476), an offset of +0x40800.  Is this expected
behavior?  Googling didn't turn up much, apologies if this is an FAQ. :(

(This is on 4.18.16-200.fc28.x86_64, the current Fedora 28 kernel.)


Thanks,
Lennert

             reply	other threads:[~2018-10-27 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 15:45 Lennert Buytenhek [this message]
2018-10-27 16:50 ` FS_IOC_FIEMAP fe_physical discrepancies on btrfs Andrei Borzenkov
2018-10-28  2:15 ` Qu Wenruo

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=20181027154555.GH16768@wantstofly.org \
    --to=buytenh@wantstofly.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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