diff options
author | Rob Norris <[email protected]> | 2024-04-10 13:14:13 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-04-11 14:43:27 -0700 |
commit | 1bf649cb0a1cc6e48dce848611ba327eb283000e (patch) | |
tree | d0f03cc09ea043c10910d8e7bdd84be7cc5b4b5a /.mailmap | |
parent | bc27c494049e5282f90b103ee45d0fe12310aac4 (diff) |
vdev_disk: fix alignment check when buffer has non-zero starting offset
If a linear buffer spans multiple pages, and the first page has a
non-zero starting offset, the checker would not include the offset, and
so would think there was an alignment gap at the end of the first page,
rather than at the start.
That is, for a 16K buffer spread across five pages with an initial 512B
offset:
[.XXXXXXX][XXXXXXXX][XXXXXXXX][XXXXXXXX][XXXXXXX.]
It would be interpreted as:
[XXXXXXX.][XXXXXXXX]...
And be rejected as misaligned.
Since it's already a linear ABD, the "linearising" copy would just reuse
the buffer as-is, and the second check would failing, tripping the
VERIFY in vdev_disk_io_rw().
This commit fixes all this by including the offset in the check for
end-of-page alignment.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16076
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions