From 006e1962449f8ea9f0822b838d9fdf13c98eb147 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Wed, 17 Aug 2022 10:37:35 +0200 Subject: block: use bdrv_is_sg() helper instead of raw bs->sg reading I believe that if the helper exists, it must be used always for reading of the value. It breaks expectations in the other case. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC: Fam Zheng CC: Ronnie Sahlberg CC: Paolo Bonzini CC: Peter Lieven CC: Vladimir Sementsov-Ogievskiy Message-Id: <20220817083736.40981-2-den@openvz.org> Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/iscsi.c') diff --git a/block/iscsi.c b/block/iscsi.c index d707d0b354..612de127e5 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2065,7 +2065,7 @@ static void iscsi_refresh_limits(BlockDriverState *bs, Error **errp) uint64_t max_xfer_len = iscsilun->use_16_for_rw ? 0xffffffff : 0xffff; unsigned int block_size = MAX(BDRV_SECTOR_SIZE, iscsilun->block_size); - assert(iscsilun->block_size >= BDRV_SECTOR_SIZE || bs->sg); + assert(iscsilun->block_size >= BDRV_SECTOR_SIZE || bdrv_is_sg(bs)); bs->bl.request_alignment = block_size; -- cgit v1.2.3