]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: Support atomic writes limits for stacked devices
authorJohn Garry <john.g.garry@oracle.com>
Mon, 18 Nov 2024 10:50:15 +0000 (10:50 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Nov 2024 17:30:02 +0000 (10:30 -0700)
commitd7f36dc446e894e0f57b5f05c5628f03c5f9e2d2
treefab48a6f1c8b44009a70672b6ea586e588b07215
parentd00eea91deaf363f83599532cb49fa528ab8e00e
block: Support atomic writes limits for stacked devices

Allow stacked devices to support atomic writes by aggregating the minimum
capability of all bottom devices.

Flag BLK_FEAT_ATOMIC_WRITES_STACKED is set for stacked devices which
have been enabled to support atomic writes.

Some things to note on the implementation:
- For simplicity, all bottom devices must have same atomic write boundary
  value (if any)
- The atomic write boundary must be a power-of-2 already, but this
  restriction could be relaxed. Furthermore, it is now required that the
  chunk sectors for a top device must be aligned with this boundary.
- If a bottom device atomic write unit min/max are not aligned with the
  top device chunk sectors, the top device atomic write unit min/max are
  reduced to a value which works for the chunk sectors.

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/20241118105018.1870052-3-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c
include/linux/blkdev.h