On 11/28/24 14:00, Christoph Hellwig wrote: > On Thu, Nov 28, 2024 at 01:52:55PM +0900, Damien Le Moal wrote: >> Same: the user must do a report zones to update the zone wp. >> Otherwise, it is hard to guarantee that we can get a valid wp offset value after >> an error. I looked into trying to get a valid value even in the case of a >> partial request failure, but that is easily douable. s/that is easily douable/that is NOT easily douable > Well, we'll better document that. Then again, what kinds of error types > do we have where a write fails, but another write to the same zone later > on will work again? A bad sector that gets remapped when overwritten is probably the most common, and maybe the only one. I need to check again, but I think that for this case, the scsi stack retries the reminder of a torn write so we probably do not even see it in practice, unless the sector/zone is really dead and cannot be recovered. But in that case, no matter what we do, that zone would not be writable anymore. Still trying to see if I can have some sort of synchronization between incoming writes and zone wp update to avoid relying on the user doing a report zones. That would ensure that emulated zone append always work like the real command. -- Damien Le Moal Western Digital Research