Stanislav Brabec changed bug 1127701
What Removed Added
Status CONFIRMED IN_PROGRESS

Comment # 2 on bug 1127701 from
It looks like a logical error in the sys-utils/fstrim.c: fstrim_all().
De-duplication of items is performed too early.

First it calls
mnt_new_table_from_file(filename);

In case of "fstrim -a", it reads /proc/self/mountinfo, in case of "fstrim -A",
it reads /etc/fstab. But in case of source in the UUID= format,
mnt_fs_get_srcpath(fs) returns NULL.

On that table, de-duplication is called:
mnt_table_uniq_fs(tab, MNT_UNIQ_FORWARD, uniq_fs_source_cmp);

De-duplication by source is performed on unprocessed /etc/fstab, so
de-duplication by source is not possible.

One has to call:
mnt_resolve_spec(mnt_fs_get_source(fs), cache);
to resolve the source. It is really done, but after the de-duplication, just
before calling fstrim_filesystem() itself. It is too late to de-duplicate.


You are receiving this mail because: