diff options
author | Christoph Hellwig <hch@lst.de> | 2025-09-19 06:12:09 -0700 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2025-09-22 12:55:20 +0200 |
commit | 6ef2175fce30ccab80d519f2afcc93d8b138c16c (patch) | |
tree | b55a738732a22d1fb18edbb8b26244e8bf4a2cbd | |
parent | 42852fe57c6d2a0abb10429841cb1226b7186b7a (diff) |
xfs: use bt_nr_sectors in xfs_dax_translate_range
Only ranges inside the file system can be translated, and the file system
can be smaller than the containing device.
Fixes: f4ed93037966 ("xfs: don't shut down the filesystem for media failures beyond end of log")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | fs/xfs/xfs_notify_failure.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c index fbeddcac4792..b17672889942 100644 --- a/fs/xfs/xfs_notify_failure.c +++ b/fs/xfs/xfs_notify_failure.c @@ -165,7 +165,7 @@ xfs_dax_translate_range( uint64_t *bblen) { u64 dev_start = btp->bt_dax_part_off; - u64 dev_len = bdev_nr_bytes(btp->bt_bdev); + u64 dev_len = BBTOB(btp->bt_nr_sectors); u64 dev_end = dev_start + dev_len - 1; /* Notify failure on the whole device. */ |