[sheepdog-users] Discard support

Liu Yuan namei.unix at gmail.com
Mon May 25 09:27:07 CEST 2015


On Sun, May 24, 2015 at 08:58:07PM +0900, Hitoshi Mitake wrote:
> At Sun, 24 May 2015 20:47:54 +0900,
> Hitoshi Mitake wrote:
> > 
> > At Thu, 21 May 2015 18:43:13 +0200 (CEST),
> > Walid Moghrabi wrote:
> > > 
> > > [1  <multipart/alternative (7bit)>]
> > > [1.1  <text/plain; utf-8 (7bit)>]
> > > Hi, 
> > > 
> > > Just a question : is discard support safe and proven ? 
> > > 
> > > I activated discard support on my VDIs and I can see with dog vdi list that discard is effective when I run a "fstrim /" in my VMs but, in Sheepdog logs, here is what I get on some nodes : 
> > > 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [gway 370139] wait_forward_request(438) fail 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [io 370197] sd_remove_object(466) failed to remove object 251f930000033f, No object found 
> > > May 21 18:40:42 ERROR [io 370197] local_discard_obj(901) failed to remove 251f930000033f 
> > > 
> > > What should I think of it ? 
> > 
> > I checked the implementation of discard, and it is completely
> > broken. In short, it can cause data loss. Please never use it.
> > 
> > It can cause data loss in a below case: issue discard from VM to a
> > VDI, which is a cloned one. If the discarded object is a one of parent
> > VDI (a snapshot which is a parent of the cloned VDI), it will remove
> > the data from the snapshot.
> 
> Seems that the data loss is not caused. It is my mistake. But the
> implementation has a serious bug because it doesn't reload inode in
> qemu driver. I don't suggest to use discard anyway.
> 
> Thanks,
> Hitoshi

Why we need reload inode in QEMU? I checked the QEMU and didn't find any problem
for discard.

Thanks,
Yuan


More information about the sheepdog-users mailing list