diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-10 21:54:55 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-10 21:54:55 +0000 |
commit | a4969141930ea0bd8b4b45ba0887713ddd4b572f (patch) | |
tree | 4bd074a6993940941550a9f68e86e211e5b38091 /pkg/sentry/fs/gofer/attr.go | |
parent | 6825d88fe9ee136f8ca63acbc2f03d1403d2ecc3 (diff) | |
parent | a6f9361c2f7c5b46a200de1dc891a0ce059ad90e (diff) |
Merge release-20200127.0-113-ga6f9361 (automated)
Diffstat (limited to 'pkg/sentry/fs/gofer/attr.go')
-rw-r--r-- | pkg/sentry/fs/gofer/attr.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/sentry/fs/gofer/attr.go b/pkg/sentry/fs/gofer/attr.go index 71cccdc34..6db4b762d 100644 --- a/pkg/sentry/fs/gofer/attr.go +++ b/pkg/sentry/fs/gofer/attr.go @@ -88,8 +88,9 @@ func bsize(pattr p9.Attr) int64 { if pattr.BlockSize > 0 { return int64(pattr.BlockSize) } - // Some files may have no clue of their block size. Better not to report - // something misleading or buggy and have a safe default. + // Some files, particularly those that are not on a local file system, + // may have no clue of their block size. Better not to report something + // misleading or buggy and have a safe default. return usermem.PageSize } @@ -149,6 +150,7 @@ func links(valid p9.AttrMask, pattr p9.Attr) uint64 { } // This node is likely backed by a file system that doesn't support links. + // // We could readdir() and count children directories to provide an accurate // link count. However this may be expensive since the gofer may be backed by remote // storage. Instead, simply return 2 links for directories and 1 for everything else |