Linux 6.18 Linear RAID "md-linear" To Support Atomic Writes
([Linux Storage] 6 Hours Ago
md-linear + atomic writes)
- Reference: 0001580418
- News link: https://www.phoronix.com/news/Linux-6.18-RAID-Linear-Atomic
- Source link:
Building off the work in months prior around [1]Device Mapper atomic write support and related infrastructure, the md-linear target for linear software RAID support will enable atomic write support with the upcoming Linux 6.18 merge window.
Queued in the [2]md-6.18 Git branch of the MDRAID Git tree is enabling atomic writes for the md-linear target.
John Garry of Oracle explained in that commit:
"All the infrastructure has already been plumbed to support this for stacked devices, so just enable the request_queue limits features flag.
A note about chunk sectors for linear arrays: While it is possible to set a chunk sectors param for building a linear array, this is for specifying the granularity at which data sectors from the device are used. It is not the same as a stripe size, like for RAID0.
As such, it is not appropriate to set chunk_sectors request queue limit to the same value, as chunk_sectors request limit is a boundary for which requests cannot straddle.
However, request_queue limit max_hw_sectors is set to chunk sectors, which almost has the same effect as setting chunk_sectors limit."
At this stage with all of the other infrastructure complete, it's just a one-liner setting the atomic writes block feature flag for the md-linear code.
[1] https://www.phoronix.com/news/Device-Mapper-Atomic-Write
[2] https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux.git/commit/?h=md-6.18&id=b481e72d24feac15017b579232370aa4b33d4129
Queued in the [2]md-6.18 Git branch of the MDRAID Git tree is enabling atomic writes for the md-linear target.
John Garry of Oracle explained in that commit:
"All the infrastructure has already been plumbed to support this for stacked devices, so just enable the request_queue limits features flag.
A note about chunk sectors for linear arrays: While it is possible to set a chunk sectors param for building a linear array, this is for specifying the granularity at which data sectors from the device are used. It is not the same as a stripe size, like for RAID0.
As such, it is not appropriate to set chunk_sectors request queue limit to the same value, as chunk_sectors request limit is a boundary for which requests cannot straddle.
However, request_queue limit max_hw_sectors is set to chunk sectors, which almost has the same effect as setting chunk_sectors limit."
At this stage with all of the other infrastructure complete, it's just a one-liner setting the atomic writes block feature flag for the md-linear code.
[1] https://www.phoronix.com/news/Device-Mapper-Atomic-Write
[2] https://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux.git/commit/?h=md-6.18&id=b481e72d24feac15017b579232370aa4b33d4129
phoronix