Skip to content

Commit

Permalink
recover access log (#4547)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Mar 21, 2024
1 parent d369163 commit a07d23c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/vfs/vfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ func (v *VFS) Read(ctx Context, ino Ino, buf []byte, off uint64, fh uint64) (n i
}

if ino == logInode {
if h.flags&O_RECOVERED != 0 {
openAccessLog(fh)
}
n = readAccessLog(fh, buf)
} else {
defer func() { logit(ctx, "read (%d,%d,%d,%d): %s (%d)", ino, size, off, fh, strerr(err), n) }()
Expand Down

0 comments on commit a07d23c

Please sign in to comment.