diff options
| author | wusong <75450248+wusongANKANG@users.noreply.github.com> | 2024-03-22 21:11:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-22 06:11:16 -0700 |
| commit | a5582cc9212b7293bd1ad9e377ee0310c2fdab48 (patch) | |
| tree | b7c612049917e2a4a2f750ea6461b39b02be2770 | |
| parent | 03f18e43df6379e342b48a900db9ee84fa460c84 (diff) | |
| download | seaweedfs-a5582cc9212b7293bd1ad9e377ee0310c2fdab48.tar.xz seaweedfs-a5582cc9212b7293bd1ad9e377ee0310c2fdab48.zip | |
[mount] fix GetAttr blocks count (#5409)
| -rw-r--r-- | weed/mount/weedfs_attr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/mount/weedfs_attr.go b/weed/mount/weedfs_attr.go index 9cd643d95..c389e0627 100644 --- a/weed/mount/weedfs_attr.go +++ b/weed/mount/weedfs_attr.go @@ -145,7 +145,6 @@ func (wfs *WFS) setRootAttr(out *fuse.AttrOut) { func (wfs *WFS) setAttrByPbEntry(out *fuse.Attr, inode uint64, entry *filer_pb.Entry, calculateSize bool) { out.Ino = inode - out.Blocks = (out.Size + blockSize - 1) / blockSize setBlksize(out, blockSize) if entry == nil { return @@ -159,6 +158,7 @@ func (wfs *WFS) setAttrByPbEntry(out *fuse.Attr, inode uint64, entry *filer_pb.E if entry.FileMode()&os.ModeSymlink != 0 { out.Size = uint64(len(entry.Attributes.SymlinkTarget)) } + out.Blocks = (out.Size + blockSize - 1) / blockSize out.Mtime = uint64(entry.Attributes.Mtime) out.Ctime = uint64(entry.Attributes.Mtime) out.Atime = uint64(entry.Attributes.Mtime) |
