On Thu, Jun 15, 2017 at 11:26:25AM +0300, Alex Ivanov wrote: > fstrim --all is broken in a way that if there is a bind mount for some filesystem, > that filesystem will not be trimmed. This is especially critical for e.g. > NixOS distribution, which needs bind mount within root fs: > https://github.com/NixOS/nixos/blob/master/modules/system/boot/stage-2-init.sh#L55 > > Currently for a given filesystem during "de-duplication by source and root" phase, > an early mounted fs path is filtered (e.g. "/"), while later mounted fs path is kept > (e.g. "/nix/store") though anyway discarded later (since it's an overlaying mount). > This leads to skipped trimming. > > So flip this behaviour. Should also help for other types of overlaying mounts. Seems good (for mountpoints we need de-duplication in backward way, but for sources it seems like a good solution). Applied, thanks. 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