From 2b1932a258dc803308eb2e837537334185dc08a8 Mon Sep 17 00:00:00 2001 From: Jason Lenz Date: Thu, 17 Mar 2022 22:21:47 -0500 Subject: [PATCH] Report symlink sizes from FUSE mount for snapshot dir Fixes #3667. --- internal/fuse/snapshots_dir.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/fuse/snapshots_dir.go b/internal/fuse/snapshots_dir.go index 34484b597..4371f6568 100644 --- a/internal/fuse/snapshots_dir.go +++ b/internal/fuse/snapshots_dir.go @@ -440,6 +440,8 @@ func (l *snapshotLink) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) func (l *snapshotLink) Attr(ctx context.Context, a *fuse.Attr) error { a.Inode = l.inode a.Mode = os.ModeSymlink | 0777 + a.Size = uint64(len(l.target)) + a.Blocks = 1 + a.Size/blockSize a.Uid = l.root.uid a.Gid = l.root.gid a.Atime = l.snapshot.Time