Commit d431f47
committed
block: Ensure start sector is aligned for stacking atomic writes
JIRA: https://issues.redhat.com/browse/RHEL-73721
commit 6564862
Author: John Garry <john.g.garry@oracle.com>
Date: Thu Jan 9 11:39:59 2025 +0000
block: Ensure start sector is aligned for stacking atomic writes
For stacking atomic writes, ensure that the start sector is aligned with
the device atomic write unit min and any boundary. Otherwise, we may
permit misaligned atomic writes.
Rework bdev_can_atomic_write() into a common helper to resuse the
alignment check. There also use atomic_write_hw_unit_min, which is more
proper (than atomic_write_unit_min).
Fixes: d7f36dc ("block: Support atomic writes limits for stacked devices")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20250109114000.2299896-2-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 6564862)
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>1 parent 98c47d0 commit d431f47
2 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
| |||
752 | 755 | | |
753 | 756 | | |
754 | 757 | | |
755 | | - | |
| 758 | + | |
756 | 759 | | |
757 | 760 | | |
758 | 761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1685 | 1685 | | |
1686 | 1686 | | |
1687 | 1687 | | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
1688 | 1697 | | |
1689 | 1698 | | |
1690 | 1699 | | |
| |||
1693 | 1702 | | |
1694 | 1703 | | |
1695 | 1704 | | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1705 | 1708 | | |
1706 | 1709 | | |
1707 | 1710 | | |
| |||
0 commit comments