[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_insert
From: |
Alberto Garcia |
Subject: |
Re: [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted() |
Date: |
Fri, 04 Dec 2020 16:16:29 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 03 Dec 2020 11:27:12 PM CET, Vladimir Sementsov-Ogievskiy wrote:
> Move bdrv_is_inserted() calls into callers.
>
> We are going to make bdrv_check_byte_request() a clean thing.
> bdrv_is_inserted() is not about checking the request, it's about
> checking the bs. So, it should be separate.
>
> With this patch we probably change error path for some failure
> scenarios. But depending on the fact that querying too big request on
> empty cdrom (or corrupted qcow2 node with no drv) will result in EIO
> and not ENOMEDIUM would be very strange. More over, we are going to
> move to 64bit requests, so larger requests will be allowed anyway.
>
> More over, keeping in mind that cdrom is the only driver that has
> .bdrv_is_inserted() handler it's strange that we should care so much
> about it in generic block layer, intuitively we should just do read and
> write, and cdrom driver should return correct errors if it is not
> inserted. But it's a work for another series.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Berto
- [PATCH 0/4] block: prepare for 64bit, Vladimir Sementsov-Ogievskiy, 2020/12/03
- [PATCH 1/4] block/file-posix: fix workaround in raw_do_pwrite_zeroes(), Vladimir Sementsov-Ogievskiy, 2020/12/03
- [PATCH 2/4] block/io: bdrv_refresh_limits(): use ERRP_GUARD, Vladimir Sementsov-Ogievskiy, 2020/12/03
- [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted(), Vladimir Sementsov-Ogievskiy, 2020/12/03
- Re: [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted(),
Alberto Garcia <=
- [PATCH 4/4] block: introduce BDRV_MAX_LENGTH, Vladimir Sementsov-Ogievskiy, 2020/12/03
- Re: [PATCH 0/4] block: prepare for 64bit, Kevin Wolf, 2020/12/08