mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-04 16:16:58 +02:00
blocks count
This commit is contained in:
parent
0c1f42f4eb
commit
5e814afe88
|
@ -72,8 +72,8 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) (err error) {
|
||||||
attr.Mtime = time.Unix(entry.Attributes.Mtime, 0)
|
attr.Mtime = time.Unix(entry.Attributes.Mtime, 0)
|
||||||
attr.Gid = entry.Attributes.Gid
|
attr.Gid = entry.Attributes.Gid
|
||||||
attr.Uid = entry.Attributes.Uid
|
attr.Uid = entry.Attributes.Uid
|
||||||
attr.Blocks = attr.Size/blockSize + 1
|
attr.BlockSize = blockSize
|
||||||
attr.BlockSize = uint32(file.wfs.option.ChunkSizeLimit)
|
attr.Blocks = (attr.Size + blockSize - 1) / blockSize
|
||||||
if entry.HardLinkCounter > 0 {
|
if entry.HardLinkCounter > 0 {
|
||||||
attr.Nlink = uint32(entry.HardLinkCounter)
|
attr.Nlink = uint32(entry.HardLinkCounter)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue