Re: Ext4 and xfs problems in dm-thin on allocation and discard

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

 



On Tue, Jun 19 2012 at  9:25am -0400,
Lukáš Czerner <lczerner@xxxxxxxxxx> wrote:

> On Tue, 19 Jun 2012, Mike Snitzer wrote:
> 
> > Date: Tue, 19 Jun 2012 09:16:49 -0400
> > From: Mike Snitzer <snitzer@xxxxxxxxxx>
> > To: Lukáš Czerner <lczerner@xxxxxxxxxx>
> > Cc: Dave Chinner <david@xxxxxxxxxxxxx>, Spelic <spelic@xxxxxxxxxxxxx>,
> >     device-mapper development <dm-devel@xxxxxxxxxx>,
> >     linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
> > Subject: Re: Ext4 and xfs problems in dm-thin on allocation and discard
> > 
> > On Tue, Jun 19 2012 at  2:32am -0400,
> > Lukáš Czerner <lczerner@xxxxxxxxxx> wrote:
> >
> > > So do I understand correctly that even though the discard came
> > > through and thinp took advantage of it it still returns EOPNOTSUPP ?
> > 
> > No, not correct.  Why are you assuming this?  I must be missing
> > something from this discussion that led you there.
> 
> Those two paragraphs led me to that conclusion:
> 
>   That message says the underlying device doesn't support discards
>   (because it is an MD device).  But the thinp device still has discards
>   enabled -- it just won't pass the discards down to the underlying data
>   device.
> 
>   The discards still inform the thin-pool that the corresponding extents
>   are no longer allocated.
> 
> so I am a bit confused now. Why the dm-thin returned EOPNOTSUPP then
> ? Is that because it has been configured to ignore_discard, or it
> actually takes advantage of the discard but underlying device does
> not support it (and no_discard_passdown is not set) so it return
> EOPNOTSUPP ?
> 
> > 
> > > This seems rather suboptimal. IIRC there was a discussion to add an
> > > option to enable/disable sending discard in thinp target down
> > > to the device.
> > > 
> > > So maybe it might be a bit smarter than that and actually
> > > enable/disable discard pass through depending on the underlying
> > > support, so we do not blindly send discard down to the device even
> > > though it does not support it.
> > 
> > Yes, that is what we did.
> > 
> > Discards are enabled my default (including discard passdown), but if the
> > underlying data device doesn't support discards then the discards will
> > not be passed down.
> > 
> > And here are the feature controls that can be provided when loading the
> > thin-pool's DM table:
> > 
> > ignore_discard: disable discard
> > no_discard_passdown: don't pass discards down to the data device
> > 
> > -EOPNOTSUPP is only ever returned if 'ignore_discard' is provided.
> 
> Ok, so in this case 'ignore_discard' has been configured ?

I don't recall Spelic saying anything about EOPNOTSUPP.  So what has
made you zero in on an -EOPNOTSUPP return (which should not be
happening)?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux