Since FSAL_CEPH is just using the pointer to the state_owner_t as a
64-bit
integer, it cannot be duplicated. That pointer is unique. You can use the NFS4 or
NLM owner if you want (it's stored in the state_owner_t). Those are unique,
because they're based on the client ID, which is guaranteed unique to a client.
In the case of FSAL_CEPH, the pointer will have changed across reboot.
I'm not sure how it's handling it. Jeff would know more.
To be clear, the NLM lock owner is a client generated opaque string. There is no guarantee
that it is unique across all clients. I'm pretty sure the NFS4 owner is the same way.
The pointer is unique within an instance of Ganesha because it is the pointer to the
state_owner_t that describes a specific client lock owner, which is indexed by the
possibly/probably non-unique lock owner opaque from the client PLUS the client's IP
address (for NLM) and clientid (for NFS4).
A clustered filesystem would need to add its own "client" or "node"
identifier.
HA failover traditionally relies on use of the NLM and NFSv4 state (lock and open)
recovery mechanism to re-acquire locks from the failed node. With this, the recovery
process need not know how the lock owners from the failed node are identified.
Jeff Layton added functionality into cephfs to prevent conflicting state from being
granted after a cephfs client fails until the Ganesha clients establish grace period.
In some HA failover situations, it may be possible for the new node to indicate it is
recovering a lock, and reclaim a lock that is still instantiated by the failed node (in
this case, the failed node must not actually be failed, but perhaps is considered down
because a client side network interface is down, or it could be a failback situation where
the IP address for a failed node is being returned to that node after it recovers).
FSAL_GLUSTER's clustering implementation technically leaves a window where a node has
failed and taken it's lock state with it before Ganesha recognizes the loss of node
and triggers grace period. During this window, a client could claim a conflicting lock
from another node.
Jeff can go into all of what he did for cephfs if you are interested.
Frank
On 5/8/19 3:29 AM, fanzi2009(a)hotmail.com wrote:
> Hi,
> I'm implementing a file system FSAL which is similar to CEPH FSAL. I checked
ceph_fsal_lock_op2() and other FSAL lock_op2 implementation. The owner
parameter is a pointer, but it converts it to 64bit integer and sends to CEPH.
Ceph will judge if it's a conflict according to this value.
> My question is :
> 1. it's possible that different clients have the same value even though the
possibility is very low.
> 2. When this sever reboot and reclaim the lock, this value should change.
>
> Thanks,
> Marvin
> _______________________________________________
> Devel mailing list -- devel(a)lists.nfs-ganesha.org To unsubscribe send
> an email to devel-leave(a)lists.nfs-ganesha.org
>
_______________________________________________
Devel mailing list -- devel(a)lists.nfs-ganesha.org To unsubscribe send an email to
devel-leave(a)lists.nfs-ganesha.org