]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fstrim: add --all to discard all filesystem
authorKarel Zak <kzak@redhat.com>
Tue, 10 Dec 2013 14:49:49 +0000 (15:49 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Dec 2013 15:40:31 +0000 (16:40 +0100)
commit36c370cbf1481aa8724dff8b7b7fec4a8ba9930b
treeee58ac627274c438bac2cfffb3e9060c79aa62a6
parent84ceaf7a196b1c026b9ce91472e4b8c64af3727a
fstrim: add --all to discard all filesystem

 * read /proc/self/mountinfo to get filesystems
 * ignore net and pseudo filesystems
 * ignore unaccessible filesystems (over mounted by another FS)
 * read disk sysfs queue/discard_granularity to detect is discard support
 * call FITRIM ioctl
 * silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY
   (for example vfat) errors

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/Makemodule.am
sys-utils/fstrim.8
sys-utils/fstrim.c