On 11/28/24 13:39, Christoph Hellwig wrote: > On Thu, Nov 28, 2024 at 01:37:46PM +0900, Damien Le Moal wrote: >> suggested: a BLK_ZONE_WPLUG_NEED_WP_UPDATE flag that is set on error and an >> automatic update of the zone write plug to the start sector of a bio when we >> start seeing writes again for that zone. The idea is that well-behaved users >> will do a report zone after a failed write and restart writing at the correct >> position. >> >> And for good measures, I modified report zones to also automatically update the >> wp of zones that have BLK_ZONE_WPLUG_NEED_WP_UPDATE. So the user doing a report >> zones clears everything up. >> >> Overall, that removes *a lot* of code and makes things a lot simpler. Starting >> test runs with that now. > > How does that work for zone append emulation? 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. I could keep the error work and trigger it to do a report zones to refresh zones wp on entry to submit_bio() also instead on relying on the user doing a report zones. -- Damien Le Moal Western Digital Research