MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes: > Yes, as long as setattr -x is run on the same machine. Note that > Sheepdog object storage doesn't allow concurrent accesses from > multiple machines. Hi Kazutaka. For this to apply to setattr -x makes the exclusiveness of the operation much less useful: if it's only exclusive on a single machine, one could equivalently just use fcntl() on a lock file which is cheaper and more convenient! I think the semantics for setattr -x were intended to allow it to be used to implement the kind of exclusive locking that Sheepdog requires elsewhere throughout the system to work correctly: claim the lock exclusively with the same convention for the lockfile everywhere, and you know you can safely access the vdi without causing divergence. In the absence of this, automated users of sheepdog would need to implement a separate global locking mechanism (on top of corosync, say) to be able to use sheepdog safely. If setattr -x works atomically on a single node and only breaks down when there are multiple nodes trying to setattr -x, could one could easily fix this by always forwarding setattr from the local sheep to the (guaranteed unique) group leader sheep rather than just executing it locally like a normal vdi write? Cheers, Chris. |