From: "Theodore Ts'o" <tytso@mit.edu>
To: Linux Filesystem Development List <linux-fsdevel@vger.kernel.org>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
"Darrick J. Wong" <djwong@kernel.org>
Subject: Is fsmap supposed to use open or closed intervals?
Date: Mon, 21 Oct 2024 21:47:42 -0400 [thread overview]
Message-ID: <20241022014742.GA3570993@mit.edu> (raw)
I was debugging ext4's failure with the new test generic/365, which
was testing the regressions fixed by commits 68415b349f3f ("xfs: Fix
the owner setting issue for rmap query in xfs fsmap") and ca6448aed4f1
("xfs: Fix missing interval for missing_owner in xfs fsmap"). It
appears that ext4 has a similar bug, but then when I started looking
at how XFS handles fsmap, it's a bit unclear whether the intervals
queried are supposed to be open, closed, or half-open.
Looking at how 6.11-rc4's xfs handles fsmap, these two results seem to
be a bit contradictory:
root@kvm-xfstests:~# xfs_io -i -c "fsmap -d 104 127" /vdd
0: 254:48 [104..126]: free space 23
OK, so it looks like fsmap returns the half-open interval [104 127).
But then I tried this:
root@kvm-xfstests:~# xfs_io -i -c "fsmap -d 104 128" /vdd
0: 254:48 [104..127]: free space 24
1: 254:48 [128..191]: inodes 64
and the fact that this query returns the region between [128, 191] is
surprising.
Is this a bug? Is it OK if we expand the interval and return more
blocks than what the application program queried?
Thanks,
- Ted
reply other threads:[~2024-10-22 1:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241022014742.GA3570993@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).