mirror of https://github.com/torvalds/linux.git
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: f4ed930379 ("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>
This commit is contained in:
parent
42852fe57c
commit
6ef2175fce
|
|
@ -165,7 +165,7 @@ xfs_dax_translate_range(
|
||||||
uint64_t *bblen)
|
uint64_t *bblen)
|
||||||
{
|
{
|
||||||
u64 dev_start = btp->bt_dax_part_off;
|
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;
|
u64 dev_end = dev_start + dev_len - 1;
|
||||||
|
|
||||||
/* Notify failure on the whole device. */
|
/* Notify failure on the whole device. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue