[ARVADOS] updated: 1.3.0-2144-g3a2006d29
Git user
git at public.arvados.org
Wed Feb 12 20:36:25 UTC 2020
Summary of changes:
lib/mount/command.go | 2 +-
lib/mount/fs.go | 19 +++++++++++++------
2 files changed, 14 insertions(+), 7 deletions(-)
via 3a2006d29fc38596a4dfb19b331bf2c86a9185ae (commit)
via a1dcbbc1ea60c32adb7bd97e77d2397d0195d437 (commit)
via 3ae251039c2781d13993f4aac24290d881821f12 (commit)
from e54bbc170b78f3f4c90be7c8b314d58e559cd73c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3a2006d29fc38596a4dfb19b331bf2c86a9185ae
Author: Tom Clegg <tom at tomclegg.ca>
Date: Wed Feb 12 12:03:20 2020 -0500
12308: Fix typo.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/mount/command.go b/lib/mount/command.go
index 5b331f0ce..86a9085bd 100644
--- a/lib/mount/command.go
+++ b/lib/mount/command.go
@@ -26,7 +26,7 @@ type cmd struct {
// not be called more than once, or when ready is already
// closed.
ready chan struct{}
- // It is safe to call Unmount ounly after ready has been
+ // It is safe to call Unmount only after ready has been
// closed.
Unmount func() (ok bool)
}
commit a1dcbbc1ea60c32adb7bd97e77d2397d0195d437
Author: Tom Clegg <tom at tomclegg.ca>
Date: Wed Feb 12 12:02:39 2020 -0500
12308: Clarify chmod behavior.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/mount/fs.go b/lib/mount/fs.go
index c18c83d86..c008b96af 100644
--- a/lib/mount/fs.go
+++ b/lib/mount/fs.go
@@ -252,11 +252,18 @@ func (fs *keepFS) Chmod(path string, mode uint32) (errc int) {
}
if fi, err := fs.root.Stat(path); err != nil {
return fs.errCode(err)
- } else if mode & ^uint32(fuse.S_IFREG|fuse.S_IFDIR|0777) != 0 || (fi.Mode()&os.ModeDir != 0) != (mode&fuse.S_IFDIR != 0) {
+ } else if mode & ^uint32(fuse.S_IFREG|fuse.S_IFDIR|0777) != 0 {
+ // Refuse to set mode bits other than
+ // regfile/dir/perms
+ return -fuse.ENOSYS
+ } else if (fi.Mode()&os.ModeDir != 0) != (mode&fuse.S_IFDIR != 0) {
+ // Refuse to transform a regular file to a dir, or
+ // vice versa
return -fuse.ENOSYS
- } else {
- return 0
}
+ // As long as the change isn't nonsense, chmod is a no-op,
+ // because we don't save permission bits.
+ return 0
}
func (fs *keepFS) fillStat(stat *fuse.Stat_t, fi os.FileInfo) {
commit 3ae251039c2781d13993f4aac24290d881821f12
Author: Tom Clegg <tom at tomclegg.ca>
Date: Wed Feb 12 11:39:18 2020 -0500
12308: Use RWMutex for filehandle map.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/lib/mount/fs.go b/lib/mount/fs.go
index 774948f57..c18c83d86 100644
--- a/lib/mount/fs.go
+++ b/lib/mount/fs.go
@@ -36,7 +36,7 @@ type keepFS struct {
root arvados.CustomFileSystem
open map[uint64]*sharedFile
lastFH uint64
- sync.Mutex
+ sync.RWMutex
// If non-nil, this channel will be closed by Init() to notify
// other goroutines that the mount is ready.
@@ -62,8 +62,8 @@ func (fs *keepFS) newFH(f arvados.File) uint64 {
}
func (fs *keepFS) lookupFH(fh uint64) *sharedFile {
- fs.Lock()
- defer fs.Unlock()
+ fs.RLock()
+ defer fs.RUnlock()
return fs.open[fh]
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list