projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3775: Run local/dev jobs on code from arbitrary remote git repositories.
[arvados.git]
/
services
/
keepstore
/
volume_unix.go
diff --git
a/services/keepstore/volume_unix.go
b/services/keepstore/volume_unix.go
index f43997860061eb45688dcd9fa28cde40557e2194..75a75229a6861f83f45b9264bab9d577d7d0f880 100644
(file)
--- a/
services/keepstore/volume_unix.go
+++ b/
services/keepstore/volume_unix.go
@@
-112,6
+112,15
@@
func (v *UnixVolume) Touch(loc string) error {
return syscall.Utime(p, &utime)
}
return syscall.Utime(p, &utime)
}
+func (v *UnixVolume) Mtime(loc string) (time.Time, error) {
+ p := v.blockPath(loc)
+ if fi, err := os.Stat(p); err != nil {
+ return time.Time{}, err
+ } else {
+ return fi.ModTime(), nil
+ }
+}
+
// Read retrieves a block identified by the locator string "loc", and
// returns its contents as a byte slice.
//
// Read retrieves a block identified by the locator string "loc", and
// returns its contents as a byte slice.
//
@@
-250,7
+259,9
@@
func (v *UnixVolume) Delete(loc string) error {
if err != nil {
return err
}
if err != nil {
return err
}
- lockfile(f)
+ if e := lockfile(f); e != nil {
+ return e
+ }
defer unlockfile(f)
// If the block has been PUT more recently than -permission_ttl,
defer unlockfile(f)
// If the block has been PUT more recently than -permission_ttl,