On Mon, Jul 17, 2017 at 06:47:07PM +0200, David Sterba wrote:
> On Sat, Jul 15, 2017 at 12:52:34PM +0800, Anand Jain wrote:
> > On 07/13/2017 09:18 PM, David Sterba wrote:
> > > Currently, the BTRFS_INODE_NOCOMPRESS will prevent any compression on a
> > > given file, except when the mount is force-compress. As users have
> > > reported on IRC, this will also prevent compression when requested by
> > > defrag (btrfs fi defrag -c file).
> > >
> > > The nocompress flag is set automatically by filesystem when the ratios
> > > are bad and the user would have to manually drop the bit in order to
> > > make defrag -c work. This is not good from the usability perspective.
> > > 
> > > This patch will raise priority for the defrag -c over nocompress, ie.
> > > any file with NOCOMPRESS bit set will get defragmented. The bit will
> > > remain untouched.
> > > 
> > > Alternate option was to also drop the nocompress bit and keep the
> > > decision logic as is, but I think this is not the right solution.
> > 
> > 
> > Now the compression set through property will act same as
> > '-o compress-force'. Before this patch is was like '-o compress'.

Actually we'll need to split btrfs_inode::force_compress as defrag will
reset it to 0 at the end, which needs to be fixed so it does not
conflict with the properties.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to