From 70d2fe656845796669e2fb37f7d51dd6fd948e3c Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Tue, 7 Oct 2025 15:05:33 +0000 Subject: [PATCH] fs: remove unnecessary Seek call on log file We were seeing a (non-fatal) error in our logs: ``` Failed to seek log file to end: seek /proc/1/fd/1: illegal seek ``` Because we open the log file with O_APPEND, we don't need to manually seek to the end. As https://pkg.go.dev/os#File.Seek also confirms that the behavior of `Seek` is not specified if the file has been opened with O_APPEND, remove the `Seek` call. --- fs/log/log.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/log/log.go b/fs/log/log.go index 0c0fad727..dd6f5d274 100644 --- a/fs/log/log.go +++ b/fs/log/log.go @@ -216,10 +216,6 @@ func InitLogging() { if err != nil { fs.Fatalf(nil, "Failed to open log file: %v", err) } - _, err = f.Seek(0, io.SeekEnd) - if err != nil { - fs.Errorf(nil, "Failed to seek log file to end: %v", err) - } redirectStderr(f) w = f } else {