mbox series

[v5,0/5] RAID 0/1/10 atomic write support

Message ID 20241118105018.1870052-1-john.g.garry@oracle.com (mailing list archive)
Headers show
Series RAID 0/1/10 atomic write support | expand

Message

John Garry Nov. 18, 2024, 10:50 a.m. UTC
This series introduces atomic write support for software RAID 0/1/10.

The main changes are to ensure that we can calculate the stacked device
request_queue limits appropriately for atomic writes. Fundamentally, if
some bottom does not support atomic writes, then atomic writes are not
supported for the top device. Furthermore, the atomic writes limits are
the lowest common supported limits from all bottom devices.

Flag BLK_FEAT_ATOMIC_WRITES_STACKED is introduced to enable atomic writes
for stacked devices selectively. This ensures that we can analyze and test
atomic writes support per individual md/dm personality (prior to
enabling).

Based on 88d47f629313 (block/for-6.13/block) Merge tag
'md-6.13-20241115' of https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux 
into for-6.13/block

Differences to v4:
- Add RB tags from Kuai (thanks!)
- Change error code for atomic write to BB (Song, Kuai)
- Add fuller comment about atomic write to BB (Kuai)

Differences to v3:
- Add RB tags from Christoph and Kuai (thanks!)
- Rebase

Differences to v2:
- Refactor blk_stack_atomic_writes_limits() (Christoph)
- Relocate RAID 1/10 BB check (Kuai)
- Add RB tag from Christoph (Thanks!)
- Set REQ_ATOMIC for RAID 1/10a

John Garry (5):
  block: Add extra checks in blk_validate_atomic_write_limits()
  block: Support atomic writes limits for stacked devices
  md/raid0: Atomic write support
  md/raid1: Atomic write support
  md/raid10: Atomic write support

 block/blk-settings.c   | 132 +++++++++++++++++++++++++++++++++++++++++
 drivers/md/raid0.c     |   1 +
 drivers/md/raid1.c     |  20 ++++++-
 drivers/md/raid10.c    |  20 ++++++-
 include/linux/blkdev.h |   4 ++
 5 files changed, 173 insertions(+), 4 deletions(-)

Comments

Martin K. Petersen Nov. 19, 2024, 1:37 a.m. UTC | #1
John,

> This series introduces atomic write support for software RAID 0/1/10.
>
> The main changes are to ensure that we can calculate the stacked
> device request_queue limits appropriately for atomic writes.
> Fundamentally, if some bottom does not support atomic writes, then
> atomic writes are not supported for the top device. Furthermore, the
> atomic writes limits are the lowest common supported limits from all
> bottom devices.
>
> Flag BLK_FEAT_ATOMIC_WRITES_STACKED is introduced to enable atomic
> writes for stacked devices selectively. This ensures that we can
> analyze and test atomic writes support per individual md/dm
> personality (prior to enabling).

LGTM.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
John Garry Nov. 19, 2024, 5:05 p.m. UTC | #2
On 18/11/2024 10:50, John Garry wrote:
> This series introduces atomic write support for software RAID 0/1/10.
> 
> The main changes are to ensure that we can calculate the stacked device
> request_queue limits appropriately for atomic writes. Fundamentally, if
> some bottom does not support atomic writes, then atomic writes are not
> supported for the top device. Furthermore, the atomic writes limits are
> the lowest common supported limits from all bottom devices.
> 
> Flag BLK_FEAT_ATOMIC_WRITES_STACKED is introduced to enable atomic writes
> for stacked devices selectively. This ensures that we can analyze and test
> atomic writes support per individual md/dm personality (prior to
> enabling).
> 
> Based on 88d47f629313 (block/for-6.13/block) Merge tag
> 'md-6.13-20241115' ofhttps://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux 
> into for-6.13/block

Hi Jens,

In case you are planning on sending a 2nd batch of new dev for 6.13, I 
think that this is in mergeable state.

If not, I'll repost for 6.14 later.

Thanks,
John
Jens Axboe Nov. 19, 2024, 5:29 p.m. UTC | #3
On 11/19/24 10:05 AM, John Garry wrote:
> On 18/11/2024 10:50, John Garry wrote:
>> This series introduces atomic write support for software RAID 0/1/10.
>>
>> The main changes are to ensure that we can calculate the stacked device
>> request_queue limits appropriately for atomic writes. Fundamentally, if
>> some bottom does not support atomic writes, then atomic writes are not
>> supported for the top device. Furthermore, the atomic writes limits are
>> the lowest common supported limits from all bottom devices.
>>
>> Flag BLK_FEAT_ATOMIC_WRITES_STACKED is introduced to enable atomic writes
>> for stacked devices selectively. This ensures that we can analyze and test
>> atomic writes support per individual md/dm personality (prior to
>> enabling).
>>
>> Based on 88d47f629313 (block/for-6.13/block) Merge tag
>> 'md-6.13-20241115' ofhttps://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux into for-6.13/block
> 
> Hi Jens,
> 
> In case you are planning on sending a 2nd batch of new dev for 6.13, I
> think that this is in mergeable state.
> 
> If not, I'll repost for 6.14 later.

I think we can do 6.13 for this one, I always do a later pull week after
merge window starts. And this has been posted previously as well, so
probably no reason to further delay it.
Jens Axboe Nov. 19, 2024, 5:30 p.m. UTC | #4
On Mon, 18 Nov 2024 10:50:13 +0000, John Garry wrote:
> This series introduces atomic write support for software RAID 0/1/10.
> 
> The main changes are to ensure that we can calculate the stacked device
> request_queue limits appropriately for atomic writes. Fundamentally, if
> some bottom does not support atomic writes, then atomic writes are not
> supported for the top device. Furthermore, the atomic writes limits are
> the lowest common supported limits from all bottom devices.
> 
> [...]

Applied, thanks!

[1/5] block: Add extra checks in blk_validate_atomic_write_limits()
      commit: d00eea91deaf363f83599532cb49fa528ab8e00e
[2/5] block: Support atomic writes limits for stacked devices
      commit: d7f36dc446e894e0f57b5f05c5628f03c5f9e2d2
[3/5] md/raid0: Atomic write support
      commit: fa6fec82811bc6ebd3c4337ae4dae36c802c0fc1
[4/5] md/raid1: Atomic write support
      commit: f2a38abf5f1c5aeb3be8e9f4d3d815c867fff7ca
[5/5] md/raid10: Atomic write support
      commit: a1d9b4fd42d93f46c11e7e9d919a55a3f6ca6126

Best regards,
John Garry Nov. 19, 2024, 5:45 p.m. UTC | #5
On 19/11/2024 17:29, Jens Axboe wrote:
>> If not, I'll repost for 6.14 later.
> I think we can do 6.13 for this one, I always do a later pull week after
> merge window starts. And this has been posted previously as well, so
> probably no reason to further delay it.

great, thanks