OSDN Git Service

block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 21 Aug 2020 19:53:56 +0000 (21:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 10:31:30 +0000 (12:31 +0200)
commit073a06978c67cbddcaba06f2c4cba28a64a0bd98
tree357c4803cc6a2f3ecd0bb909cb54e3e0393eeb4a
parent3a6d34d0661d25215ca2bc92fa8aa0dbb22a4e81
block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

BDRV_POLL_WHILE() is defined as:

  #define BDRV_POLL_WHILE(bs, cond) ({          \
      BlockDriverState *bs_ = (bs);             \
      AIO_WAIT_WHILE(bdrv_get_aio_context(bs_), \
                     cond); })

As we will remove the BlockDriverState use in the next commit,
start by using the exploded version of BDRV_POLL_WHILE().

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200821195359.1285345-13-philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/nvme.c