// there are at least N *writable* replicas, so a block
// that cannot be written to should not count toward the
// replication total.
- return TouchBlock(block)
+ return TouchBlock(hash)
} else {
return CollisionError
}
}
// lockfile and unlockfile use flock(2) to manage kernel file locks.
-func lockfile(f os.File) error {
+func lockfile(f *os.File) error {
return syscall.Flock(int(f.Fd()), syscall.LOCK_EX)
}
-func unlockfile(f os.File) error {
+func unlockfile(f *os.File) error {
return syscall.Flock(int(f.Fd()), syscall.LOCK_UN)
}