qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/9] block: Add flags to BlockDriver.bdrv_co_truncate()


From: Kevin Wolf
Subject: Re: [PATCH v5 1/9] block: Add flags to BlockDriver.bdrv_co_truncate()
Date: Thu, 23 Apr 2020 14:42:17 +0200

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 <address@hidden>
> > Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> > Reviewed-by: Alberto Garcia <address@hidden>
> > ---
> >  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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]