]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fstrim: de-duplicate btrfs sub-volumes
authorStanislav Brabec <sbrabec@suse.cz>
Wed, 25 Jan 2017 17:30:26 +0000 (18:30 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 21 Feb 2017 12:13:25 +0000 (13:13 +0100)
commitfb6ce9b0fb5552b7658f2c8bcdd3c438e30c6626
treeadb5c39e36878816074ce265fc9dba2cf89fba5b
parentc26866864f4ab4e9050a0acc26edfc83d2df246d
fstrim: de-duplicate btrfs sub-volumes

There was a comparison of roots in uniq_fs_source_cmp(). As we care only on
device names, comparing roots makes only a little sense, and it breaks on btrfs.
As a result, FITRIM ioctl() is called for each subvolume. But by design, only
one TRIM is needed for the whole btrfs volume.

Remove it to be able to de-duplicate btrfs subvolumes.

Fixes opensuse #1020077.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
sys-utils/fstrim.c