On 7/9/25 9:28 PM, Damien Le Moal wrote:
See blk_stack_limits() and the section:
/*
* Some feaures need to be supported both by the stacking driver and all
* underlying devices. The stacking driver sets these flags before
* stacking the limits, and this will clear the flags if any of the
* underlying devices does not support it.
*/
if (!(b->features & BLK_FEAT_NOWAIT))
t->features &= ~BLK_FEAT_NOWAIT;
if (!(b->features & BLK_FEAT_POLL))
t->features &= ~BLK_FEAT_POLL;
And make driver_preserves_write_order a feature instead of treating it
specially. Also, the name "driver_preserves_write_order" is not great. The
driver may be preserving write order, but the hardware not (e.g. libata and AHCI).
How about adding this in include/linux/blkdev.h?
/*
* The request order is preserved per hardware queue by the block
driver and
* the block device.
*/
#define BLK_FEAT_ORDERED_HWQ ((__force blk_features_t)(1u << 14))
Thanks,
Bart.