On 1/10/24 15:08, Christoph Hellwig wrote: > On Wed, Jan 10, 2024 at 02:15:59PM +0900, Damien Le Moal wrote: >> Partial completions of zone append request is not allowed but if a zone >> append completion indicates a number of completed bytes different from >> the original BIO size, only the BIO status is set to error. This leads >> to bio_advance() not setting the BIO size to 0 and thus to not call >> bio_endio() at the end of req_bio_endio(). >> >> Make sure a partially completed zone append is failed and completed >> immediately by forcing the completed number of bytes (nbytes) to be >> equal to the BIO sizei, thus ensuring that bio_endio() is called. > > This really is a should not ever happen case. But if it does happen > anyway for some reason, this is the right way to deal with it, so: Yes, that is likely impossible for NVMe ZNS. But that is definitely in the realm of the possible for SMR drives with zone append emulation using regular writes. ATA drives will never partially complete, but SAS drives may do so. > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> Thanks. -- Damien Le Moal Western Digital Research