Am 23.04.2020 um 11:41 hat Max Reitz geschrieben: > On 22.04.20 17:21, Kevin Wolf wrote: > > This adds a new BdrvRequestFlags parameter to the .bdrv_co_truncate() > > driver callbacks, and a supported_truncate_flags field in > > BlockDriverState that allows drivers to advertise support for request > > flags in the context of truncate. > > > > For now, we always pass 0 and no drivers declare support for any flag. > > > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > > Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > > Reviewed-by: Alberto Garcia <be...@igalia.com> > > --- > > include/block/block_int.h | 10 +++++++++- > > block/crypto.c | 3 ++- > > block/file-posix.c | 2 +- > > block/file-win32.c | 2 +- > > block/gluster.c | 1 + > > block/io.c | 8 +++++++- > > block/iscsi.c | 2 +- > > block/nfs.c | 3 ++- > > block/qcow2.c | 2 +- > > block/qed.c | 1 + > > block/raw-format.c | 2 +- > > block/rbd.c | 1 + > > block/sheepdog.c | 4 ++-- > > block/ssh.c | 2 +- > > tests/test-block-iothread.c | 3 ++- > > 15 files changed, 33 insertions(+), 13 deletions(-) > > (I know I haven’t complained before, so *shrug*, but I wonder now > whether it actually makes sense to have the same BdrvRequestFlags for > all request types. Or why we have the same flags type for read, write, > and zero-write already.)
Yeah, nothing this series introduces. I wonder, too, but as long as we have enough bits to cover flags for all request types, and because we have overlaps between the request types, it might be easier to have only one set of flags. So it might be accidental, but I actually feel the current state isn't bad. Kevin
signature.asc
Description: PGP signature