From 374baa6f64cafe7f1455d68da4fe7069ffbfe6c8 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Tue, 7 May 2019 20:18:08 +0100 Subject: fstrim: add --quiet option to suppress error messages When fstrim interacts with NTFS it result can be error reporting bad file descriptor. That seems to be a bug in NTFS. While waiting driver to get on top of the issue and be commonly available lets add to fstrim option to make it be more silent about errno 9 aka EBADF, Bad file descriptor. Reported-by: https://github.com/moviuro Proposed-by: Dave Reisner Reference: https://bugs.archlinux.org/task/62288 Addresses: https://github.com/karelzak/util-linux/issues/789 Signed-off-by: Sami Kerola --- sys-utils/fstrim.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys-utils/fstrim.8') diff --git a/sys-utils/fstrim.8 b/sys-utils/fstrim.8 index c6ecca706..7e04d46be 100644 --- a/sys-utils/fstrim.8 +++ b/sys-utils/fstrim.8 @@ -1,4 +1,4 @@ -.TH FSTRIM 8 "July 2014" "util-linux" "System Administration" +.TH FSTRIM 8 "May 2019" "util-linux" "System Administration" .SH NAME fstrim \- discard unused blocks on a mounted filesystem .SH SYNOPSIS @@ -100,6 +100,14 @@ LVM setup, etc. These reductions would not be reflected in fstrim_range.len .B --length option). .TP +.B \-\-quiet +Suppress error messages. This option is meant to be used in systemd service +file to hide warnings that are result of known problems, such as NTFS driver +reporting +.I Bad file descriptor +when device is mounted read-only, or lack of file system support for ioctl +FITRIM call. +.TP .BR \-V , " \-\-version" Display version information and exit. .TP -- cgit v1.2.3-55-g7522