diff options
| author | John Garry <[email protected]> | 2025-07-11 10:52:58 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-07-17 12:01:16 +0000 |
| commit | 63d092d1c1b1f773232c67c87debe557aab5aca0 (patch) | |
| tree | 043eecfe1b8c88a8228bcb76e6f80dd5f55fec07 /lib/crypto/mpi/mpi-add.c | |
| parent | dm-stripe: limit chunk_sectors to the stripe size (diff) | |
| download | kernel-63d092d1c1b1f773232c67c87debe557aab5aca0.tar.gz kernel-63d092d1c1b1f773232c67c87debe557aab5aca0.zip | |
block: use chunk_sectors when evaluating stacked atomic write limits
The atomic write unit max value is limited by any stacked device stripe
size.
It is required that the atomic write unit is a power-of-2 factor of the
stripe size.
Currently we use io_min limit to hold the stripe size, and check for a
io_min <= SECTOR_SIZE when deciding if we have a striped stacked device.
Nilay reports that this causes a problem when the physical block size is
greater than SECTOR_SIZE [0].
Furthermore, io_min may be mutated when stacking devices, and this makes
it a poor candidate to hold the stripe size. Such an example (of when
io_min may change) would be when the io_min is less than the physical
block size.
Use chunk_sectors to hold the stripe size, which is more appropriate.
[0] https://lore.kernel.org/linux-block/[email protected]/T/#mecca17129f72811137d3c2f1e477634e77f06781
Reviewed-by: Nilay Shroff <[email protected]>
Tested-by: Nilay Shroff <[email protected]>
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions
