[sheepdog] [PATCH 2/2] sheepdog: refine discard support
Vasiliy Tolstov
v.tolstov at selfip.ru
Fri Sep 4 12:32:11 CEST 2015
04 сент. 2015 г. 12:57 пользователь "Hitoshi Mitake" <
mitake.hitoshi at gmail.com> написал:
>
> On Fri, Sep 4, 2015 at 5:51 PM, Hitoshi Mitake <mitake.hitoshi at gmail.com>
wrote:
> > On Wed, Sep 2, 2015 at 9:36 PM, Vasiliy Tolstov <v.tolstov at selfip.ru>
wrote:
> >> 2015-09-01 6:03 GMT+03:00 Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp
>:
> >>> This patch refines discard support of the sheepdog driver. The
> >>> existing discard mechanism was implemented on SD_OP_DISCARD_OBJ, which
> >>> was introduced before fine grained reference counting on newer
> >>> sheepdog. It doesn't care about relations of snapshots and clones and
> >>> discards objects unconditionally.
> >>>
> >>> With this patch, the driver just updates an inode object for updating
> >>> reference. Removing the object is done in sheep process side.
> >>>
> >>> Cc: Teruaki Ishizaki <ishizaki.teruaki at lab.ntt.co.jp>
> >>> Cc: Vasiliy Tolstov <v.tolstov at selfip.ru>
> >>> Cc: Jeff Cody <jcody at redhat.com>
> >>> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> >>
> >>
> >> I'm test this patch and now discard working properly and no errors in
> >> sheepdog log file.
> >>
> >> Tested-by: Vasiliy Tolstov <v.tolstov at selfip.ru>
> >
> > On the second thought, this patch has a problem of handling snapshot.
> > Please drop this one (1st patch is ok to apply).
> >
> > I'll solve the problem in sheepdog side.
>
> On the third thought, this patch can work well ;) Please pick this patch,
Jeff.
>
> I considered about a case of interleaving of snapshotting and
> discarding requests like below:
> 1. user invokes dog vdi snapshot, a command for making current VDI
> snapshot (updating inode objects)
> 2. discard request from VM before the request of 1 completes
> 3. discard completes
> 4. request of 1 completes
>
> In this case, some data_vdi_id of original inode can be overwritten
> before completion of snapshotting. However, this behavior is valid
> because dog vdi snapshot doesn't return ack to the user.
>
This is normal for snapshots, to get consistent data you need to cooperate
with guest system to get freeze it fs before snapshot.
Quemu-ga already have this via sending freeze to fs beforw and thaw after
snapshot .
> Thanks,
> Hitoshi
>
> >
> > Thanks,
> > Hitoshi
> >
> >>
> >> --
> >> Vasiliy Tolstov,
> >> e-mail: v.tolstov at selfip.ru
> >> --
> >> sheepdog mailing list
> >> sheepdog at lists.wpkg.org
> >> https://lists.wpkg.org/mailman/listinfo/sheepdog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20150904/a70d2af2/attachment.html>
More information about the sheepdog
mailing list