summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-07-14 15:18:27 +0200
committerJakob Unterwurzacher2018-07-14 15:18:27 +0200
commit95b93db35f451dbaef49ae53c9b69e32dc10e14a (patch)
tree5b43733c1abb45b26906195062c0d628dddb309f /internal
parent770c23db7c97a26ecbd018677d5cc9f985aaae45 (diff)
fusefrontend: log prealloc failures at Info level
If the underlying filesystem is full, it is normal get ENOSPC here. Log at Info level instead of Warning. Fixes xfstests generic/015 and generic/027, which complained about the extra output.
Diffstat (limited to 'internal')
-rw-r--r--internal/fusefrontend/file.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index b056dc2..bad9bfc 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -122,7 +122,9 @@ func (f *File) createHeader() (fileID []byte, err error) {
if !f.fs.args.NoPrealloc {
err = syscallcompat.EnospcPrealloc(int(f.fd.Fd()), 0, contentenc.HeaderLen)
if err != nil {
- tlog.Warn.Printf("ino%d: createHeader: prealloc failed: %s\n", f.qIno.Ino, err.Error())
+ // If the underlying filesystem is full, it is normal get ENOSPC here.
+ // Log at Info level instead of Warning.
+ tlog.Info.Printf("ino%d: createHeader: prealloc failed: %s\n", f.qIno.Ino, err.Error())
return nil, err
}
}
@@ -317,7 +319,9 @@ func (f *File) doWrite(data []byte, off int64) (uint32, fuse.Status) {
if !f.fs.args.NoPrealloc {
err = syscallcompat.EnospcPrealloc(int(f.fd.Fd()), cOff, int64(len(ciphertext)))
if err != nil {
- tlog.Warn.Printf("ino%d fh%d: doWrite: prealloc failed: %s", f.qIno.Ino, f.intFd(), err.Error())
+ // If the underlying filesystem is full, it is normal get ENOSPC here.
+ // Log at Info level instead of Warning.
+ tlog.Info.Printf("ino%d fh%d: doWrite: prealloc failed: %s", f.qIno.Ino, f.intFd(), err.Error())
return 0, fuse.ToStatus(err)
}
}