]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: cleanup buftarg handling in XFS_IOC_VERIFY_MEDIA
authorChristoph Hellwig <hch@lst.de>
Mon, 16 Mar 2026 15:35:29 +0000 (16:35 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 18 Mar 2026 08:52:33 +0000 (09:52 +0100)
commit0c98524ab20193d8772cff9c71b00ad004fb1349
tree73548ffa3bad420c9bd61261d3b67d57e4317801
parent268378b6ad20569af0d1957992de1c8b16c6e900
xfs: cleanup buftarg handling in XFS_IOC_VERIFY_MEDIA

The newly added XFS_IOC_VERIFY_MEDIA is a bit unusual in how it handles
buftarg fields.  Update it to be more in line with other XFS code:

 - use btp->bt_dev instead of btp->bt_bdev->bd_dev to retrieve the device
   number for tracing
 - use btp->bt_logical_sectorsize instead of
   bdev_logical_block_size(btp->bt_bdev) to retrieve the logical sector
   size
 - compare the buftarg and not the bdev to see if there is a separate
   log buftarg

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_verify_media.c