[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 01/11] block: Add op blocker type "device IO"
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH v2 01/11] block: Add op blocker type "device IO" |
Date: |
Wed, 13 May 2015 23:02:19 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, 05/13 14:04, Paolo Bonzini wrote:
>
>
> On 13/05/2015 19:28, Fam Zheng wrote:
> > @@ -478,6 +478,10 @@ static int blk_check_request(BlockBackend *blk,
> > int64_t sector_num,
> > return -EIO;
> > }
> >
> > + if (bdrv_op_is_blocked(blk->bs, BLOCK_OP_TYPE_DEVICE_IO, NULL)) {
> > + return -EBUSY;
> > + }
>
> I think this is incorrect. It's fine for backends to generate more I/O
> after a blocker is submitted, as long as it's bounded.
>
> For example, SCSI requests can result in many consecutive I/Os:
>
> (1) FUA requests are split in write+flush
>
> (2) adapters that do not use QEMUSGList-based I/O only read 128K at a time
>
> (3) WRITE SAME operations are also split in chunks
>
> (4) UNMAP operations process one descriptor at a time
I don't understand the point of these examples. If we don't return -EBUSY here,
the request will sneak into block/io.c and perhaps break qmp transaction
semantics, if it lands between two backups.
Fam
>
> Paolo
>
> > return blk_check_byte_request(blk, sector_num * BDRV_SECTOR_SIZE,
> > nb_sectors * BDRV_SECTOR_SIZE);
> > }
[Qemu-block] [PATCH v2 03/11] block-backend: Add blk_op_blocker_add_notifier, Fam Zheng, 2015/05/13
[Qemu-block] [PATCH v2 02/11] block: Add op blocker notifier list, Fam Zheng, 2015/05/13
[Qemu-block] [PATCH v2 04/11] virtio-blk: Move complete_request to 'ops' structure, Fam Zheng, 2015/05/13
[Qemu-block] [PATCH v2 05/11] virtio-blk: Don't handle output when there is "device IO" op blocker, Fam Zheng, 2015/05/13
[Qemu-block] [PATCH v2 07/11] blockdev: Block device IO during internal snapshot transaction, Fam Zheng, 2015/05/13
[Qemu-block] [PATCH v2 06/11] nbd-server: Clear "can_read" when "device io" blocker is set, Fam Zheng, 2015/05/13