Re: [PATCH RFC 4/7] md/raid10: convert read/write to use bio_submit_split()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/08/2025 10:14, Yu Kuai wrote:
Umm, that's actually a red flag.  If a device guarantees atomic behavior
it can't just fail it.  So I think REQ_ATOMIC should be disallowed
for md raid with bad block tracking.


I agree that do not look good, however, John explained while adding this
that user should retry and fallback without REQ_ATOMIC to make things
work as usual.

Whether a device promises atomic write is orthogonal to whether that write succeeds - it could fail for a whole host of reasons, so why can't "this is too big to be atomic" just be another reason for failing?

Yes you want to know *why* the write failed, if you can't pass that back, then you have a problem, but if you can pass back the error "too big for atomic write" then the caller can sort it out.

That then allows the driver - if it knows the block size of the device - to manage atomic writes (in the sense that it can refuse writes that are too large), even if the device doesn't claim to support it. It can just force the caller to submit small enough blocks.

Cheers,
Wol




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux