Am 24.04.2018 um 21:53 hat Jason Dillaman geschrieben: > On Tue, Apr 24, 2018 at 3:25 PM, Eric Blake <ebl...@redhat.com> wrote: > > We are gradually moving away from sector-based interfaces, towards > > byte-based. Make the change for the last few sector-based callbacks > > in the rbd driver. > > > > Note that the driver was already using byte-based calls for > > performing actual I/O, so this just gets rid of a round trip > > of scaling; however, as I don't know if RBD is tolerant of > > non-sector AIO operations, I went with the conservate approach > > of adding .bdrv_refresh_limits to override the block layer > > defaults back to the pre-patch value of 512. > > > > Signed-off-by: Eric Blake <ebl...@redhat.com> > > > > --- > > v2: override new block layer default alignment [Kevin] > > --- > > block/rbd.c | 44 ++++++++++++++++++++++++-------------------- > > 1 file changed, 24 insertions(+), 20 deletions(-) > > > > diff --git a/block/rbd.c b/block/rbd.c > > index c9359d0ad84..638ecf8d986 100644 > > --- a/block/rbd.c > > +++ b/block/rbd.c > > @@ -231,6 +231,13 @@ done: > > } > > > > > > +static void qemu_rbd_refresh_limits(BlockDriverState *bs, Error **errp) > > +{ > > + /* XXX Does RBD support AIO on less than 512-byte alignment? */ > > Yes, librbd internally supports 1-byte alignment for IO, but the > optimal alignment/length would be object size * stripe count.
Would you like to post a follow-up patch to this series that removes the .bdrv_refresh_limits implementation again with a commit message explaining that RBD does support byte alignment? Kevin