generic/260 also points out that the bytes cleared are in the wrong
units -- they're supposed to be in bytes, but the "cleared" variable is
in units of fsblocks. Fix that.
Cc: linux-ext4@vger.kernel.org # v1.47.3-rc1
Fixes: 7235b58533b9cd ("fuse2fs: fix FITRIM validation")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/175182663095.1984706.13547873393931840622.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
}
out:
- fr->len = cleared;
+ fr->len = FUSE2FS_FSB_TO_B(ff, cleared);
+ dbg_printf(ff, "%s: len=%llu err=%ld\n", __func__, fr->len, err);
return err;
}
#endif /* FITRIM */