Re: [PATCH v7 00/11] Introduce Zone Append for writing to zoned block devices

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

 



On 17/04/2020 18:04, Theodore Y. Ts'o wrote:
> What sort of reordering can take place due to I/O schedulers and or
> racing write appends from different CPU's?  Is it purely the
> userspace's responsibility to avoid racings writes to a particular
> zone?

For normal writes (i.e.: REQ_OP_WRITE) the zone will be locked by the 
I/O scheduler (namely mq-deadline as it's currently the one which does 
have support for zoned block devices). For REQ_OP_ZONE_APPEND we have a 
trylock scheme in the SCSI emulation of ZONE_APPEND, which is fine, as 
SCSI disks are single queue only.

A scenario that can of cause happen is concurring REQ_OP_ZONE_APPEND 
writes from different CPUs to the same zone. This is fine *iff* the sum 
of all writes stays within the free space of the zone. If one if the 
writes will cross a zone boundary it'll get EIO, obviously.

For "userspace's responsibility", I'd re-phrase this as "a consumer's 
responsibility", as we don't have an interface which aims at user-space 
yet. The only consumer this series implements is zonefs, although we did 
have an AIO implementation for early testing and io_uring shouldn't be 
too hard to implement.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux