Re: [PATCH 0/1] fstrim: de-duplication of btrfs subvolumes

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

 



On Wed, Jan 25, 2017 at 06:30:11PM +0100, Stanislav Brabec wrote:
> I got a report that TRIM is called many times on btrfs with subvolumes.
> I did a research and found that sys-utils/fstrim.c: uniq_fs_source_cmp()
> contains a code that compares not only file system sources (i. e.
> devices), but also roots.
> 
> I doubt that it is needed in any situation. We just care about source,
> i. e. device node. I think that if it matches, it is always particular
> device duplicate.
> 
> Root does not equal for btrfs subvolumes, but also it does not equal for
> bind mounts. And btrfs subvolumes remain duplicated after the whole
> de-duplication process.

Ah... I have probably thought the roots are really independent on the
device, but now when I think about it the idea does not make sense :-)

> The patch assumes that the root comparison is not needed here at all. If
> it is not true, I will prepare another patch ignoring root specifically
> for btrfs.

The patch makes more sense than the original code.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux