Re: [PATCH 11/20] rbd: introduce copyup state machine

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

 



On Mon, Jul 1, 2019 at 4:42 PM Jason Dillaman <jdillama@xxxxxxxxxx> wrote:
>
> On Tue, Jun 25, 2019 at 10:42 AM Ilya Dryomov <idryomov@xxxxxxxxx> wrote:
> >
> > Both write and copyup paths will get more complex with object map.
> > Factor copyup code out into a separate state machine.
> >
> > While at it, take advantage of obj_req->osd_reqs list and issue empty
> > and current snapc OSD requests together, one after another.
> >
> > Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>
> > ---
> >  drivers/block/rbd.c | 187 +++++++++++++++++++++++++++++---------------
> >  1 file changed, 123 insertions(+), 64 deletions(-)
> >
> > diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> > index 2bafdee61dbd..34bd45d336e6 100644
> > --- a/drivers/block/rbd.c
> > +++ b/drivers/block/rbd.c
> > @@ -226,6 +226,7 @@ enum obj_operation_type {
> >
> >  #define RBD_OBJ_FLAG_DELETION                  (1U << 0)
> >  #define RBD_OBJ_FLAG_COPYUP_ENABLED            (1U << 1)
> > +#define RBD_OBJ_FLAG_COPYUP_ZEROS              (1U << 2)
> >
> >  enum rbd_obj_read_state {
> >         RBD_OBJ_READ_START = 1,
> > @@ -261,9 +262,15 @@ enum rbd_obj_read_state {
> >  enum rbd_obj_write_state {
> >         RBD_OBJ_WRITE_START = 1,
> >         RBD_OBJ_WRITE_OBJECT,
> > -       RBD_OBJ_WRITE_READ_FROM_PARENT,
> > -       RBD_OBJ_WRITE_COPYUP_EMPTY_SNAPC,
> > -       RBD_OBJ_WRITE_COPYUP_OPS,
> > +       __RBD_OBJ_WRITE_COPYUP,
> > +       RBD_OBJ_WRITE_COPYUP,
> > +};
>
> Nit: should the state diagram above this enum be updated to match this change?

Yeah, I'll update these diagrams in a follow-up commit.

Thanks,

                Ilya



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux