aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDarrick J. Wong <[email protected]>2025-04-15 00:33:45 +0000
committerCarlos Maiolino <[email protected]>2025-04-16 10:56:10 +0000
commitc6f1401b1d5fb3b83bd16ba8a0f89a8b1c805993 (patch)
tree3552eac0742c55977040d738dc20d16910d9c080 /net/unix/af_unix.c
parentxfs: Fix spelling mistake "drity" -> "dirty" (diff)
downloadkernel-c6f1401b1d5fb3b83bd16ba8a0f89a8b1c805993.tar.gz
kernel-c6f1401b1d5fb3b83bd16ba8a0f89a8b1c805993.zip
xfs: fix fsmap for internal zoned devices
Filesystems with an internal zoned rt section use xfs_rtblock_t values that are relative to the start of the data device. When fsmap reports on internal rt sections, it reports the space used by the data section as "OWN_FS". Unfortunately, the logic for resuming a query isn't quite right, so xfs/273 fails because it stress-tests GETFSMAP with a single-record buffer. If we enter the "report fake space as OWN_FS" block with a nonzero key[0].fmr_length, we should add that to key[0].fmr_physical and recheck if we still need to emit the fake record. We should /not/ just return 0 from the whole function because that prevents all rmap record iteration. If we don't enter that block, the resumption is still wrong. keys[*].fmr_physical is a reflection of what we copied out to userspace on a previous query, which means that it already accounts for rgstart. It is not correct to add rtstart_daddr when computing start_rtb or end_rtb, so stop that. While we're at it, add a xfs_has_zoned to make it clear that this is a zoned filesystem thing. Fixes: e50ec7fac81aa2 ("xfs: enable fsmap reporting for internal RT devices") Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions