It's true that zio could be NULL after calling avl_first() but this code
would prevent this from ever happening:
p = vdev_queue_class_to_issue(vq);
if (p == ZIO_PRIORITY_NUM_QUEUEABLE) {
/* No eligible queued i/os */
return (NULL);
}
Thanks,
George
On Thu, Sep 8, 2016 at 10:09 AM, Andriy Gapon <[email protected]> wrote:
>
> Coverity warns about the following code in vdev_queue_io_to_issue:
> zio = avl_nearest(tree, idx, AVL_AFTER);
> if (zio == NULL)
> zio = avl_first(tree);
> ASSERT3U(zio->io_priority, ==, p);
> Coverity "thinks" that zio can still be NULL after avl_first().
> I think that that can be true if vdev_queue_io_to_issue() is called from
> vdev_queue_io_done() and the corresponding tree is empty, but I am not
> sure if
> that's possible.
>
> Thank you.
>
> --
> Andriy Gapon
>
-------------------------------------------
openzfs-developer
Archives: https://www.listbox.com/member/archive/274414/=now
RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa
Modify Your Subscription:
https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c
Powered by Listbox: http://www.listbox.com