Ming, On 9/12/17 18:26, Ming Lei wrote: >>> OK, I suggest to document this guarantee of no write reorder for ZBC >>> somewhere, so that people will keep it in mind when trying to change >>> the current code. >> >> Have you looked at the comments in sd_zbc.c ? That is explained there. >> Granted, this is a little deep in the stack, but this is after all >> dependent on the implementation of scsi_request_fn(). I can add comments >> there too if you prefer. > > Yeah, I looked at that, but seems it is too coarse. OK. Will improve that in V3. >> Zoned disks are recent and all of them support FUA. This means that a >> write with FUA will be processed like any other write request (if I read >> the code in blk-flush.c correctly). Well, at least for the mq case, >> which does a blk_mq_sched_insert_request(), while the direct call to > > blk_mq_sched_bypass_insert() can be called for flush requests too, > since requests in flush sequence share one driver tag(rq->tag != -1), > then the rq can be added to front of hctx->dispatch directly. For pure flush commands, any order is OK, since these are not actual writes. the ZBC/ZAC standards do not modify the behavior of flush/synchronize cache commands. But I will look into more detail at the PREFLUSH/POSTFLUSH mechanic and relation to write request ordering to make sure no corner cases are left ignored. Thanks for the comments. Best regards. -- Damien Le Moal, Western Digital