[Linux-ha-dev] Shared disk file Exclusiveness controlprogramforHB2
ikedaj at intellilink.co.jp
Mon Aug 13 02:11:01 MDT 2007
> > If Node B updates the lock status _at just the right moment_,
> > sfex_update() detects that the other node is trying to update its
> > and it will be terminated with exit(2).
> This time window is enough to destroy all data if you are bad luck ;-(
Node B is just updating its lock status, it's not the data.
Node B can get the lock and access the shared disk after Node A gets out
both of the lock and its data.
> > > This statement is wrong according to your code.
> > > Especially, your check-and-reserve is not an atomic CAS operation.
> > By the way, the lock status stores on the partition, (not using file
> > so, as a communication media, it can keep read-write operation
> > All nodes' action, like read (check) or write (reserve) the status won't
> > bump against each other.
> > inconsequent remark?
> Yes, but still, the CAS operation is not atomic unless we do some tricks
> scsi reservation.
well...I'm not sure the following comment is essential or not,
this is a later-come basis system (inverse of a first-come basis).
Once one node detects its status is updated from the other node,
the comparing will be terminated here.
basically, there is no the second bite at the cherry to get the lock.
More information about the Linux-HA-Dev