> > If Node B updates the lock status _at just the right moment_,
> > sfex_update() detects that the other node is trying to update its
status,
> > 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
system)
> > so, as a communication media, it can keep read-write operation
atomicity.
> > 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
like
> 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.

Thanks,
Junko

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to