I am Mark Meyers, an independent developer in C++, and love ceph around development so much.
In ceph source, src/mds/Locker.cc: Locker::issue_client_lease:
if(... &&
(!diri->filelock.can_lease(
(diri->get_client_cap_pending(
dn->lock.can_lease(client)) {
...
// issue a dentry lease
ClientLease *l = dn->add_client_lease(client, session);
...
LeaseStat e;
...
e.duration_ms = (int)(1000 * mdcache->client_lease_
...
} else {
// null lease
LeaseStat e;
...
e.duration_ms = 0;
...
}
So my understanding is:
If parent directory has neither of lease or CEPH_CAP_FILE_SHARED mask, then the dentry can get a lease of 30s(caculated from duration_ms).
Else if in other conditions, then the dentry get a lease of 0s.
I am confused here, in what situation does the parent directory and the child dentry share a lease?
And in what situation does the child dentry have no lease(lease of zero seconds?)?
Could you please explain it further?
Thanks for your reading, I really appreciate your response. Thanks.
Mark Meyers
From Ceph Community.
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com