From 0650a512bbf5a49031d47afac538a92e0994757a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 18 May 2021 18:38:23 +0200 Subject: fsck: redirect go-fuse noise to syslog --- fsck.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fsck.go') diff --git a/fsck.go b/fsck.go index 5b32a5e..70528cf 100644 --- a/fsck.go +++ b/fsck.go @@ -253,6 +253,7 @@ func (ck *fsckObj) xattrs(relPath string) { } } +// entrypoint from main() func fsck(args *argContainer) (exitcode int) { if args.reverse { tlog.Fatal.Printf("Running -fsck with -reverse is not supported") @@ -274,6 +275,12 @@ func fsck(args *argContainer) (exitcode int) { watchDone: make(chan struct{}), seenInodes: make(map[uint64]struct{}), } + if args.quiet { + // go-fuse throws a lot of these: + // writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT + // This is ugly and causes failures in xfstests. Hide them away in syslog. + tlog.SwitchLoggerToSyslog() + } // Mount srv := initGoFuse(pfs, args) // Handle SIGINT & SIGTERM -- cgit v1.2.3