On 2022/08/24 16:46, Damien Le Moal wrote: > On 2022/08/22 21:12, Sam Li wrote: >> Stefan Hajnoczi <stefa...@redhat.com> 于2022年8月23日周二 08:49写道: >>> >>> On Tue, Aug 16, 2022 at 02:25:18PM +0800, Sam Li wrote: [...]>>>> + blkz = (struct blk_zone *)(rep + 1); >>>> + while (n < nrz) { >>>> + memset(rep, 0, rep_size); >>>> + rep->sector = sector; >>>> + rep->nr_zones = nrz - n; >>>> + >>>> + ret = ioctl(fd, BLKREPORTZONE, rep); >>> >>> Does this ioctl() need "do { ... } while (ret == -1 && errno == EINTR)"? >> >> No? We discussed this before. I guess even EINTR should be propagated >> back to the guest. Maybe Damien can talk more about why. > > In the kernel, completion of zone management IO requests are waited for using > wait_for_completion_io() which uses TASK_UNINTERRUPTIBLE. So a signal will not > abort anything. So I do not think that the do { } while() loop is necessary.
Note: I do not think the loop to be necessary, but it will not hurt :) -- Damien Le Moal Western Digital Research