[lustre-devel] [PATCH 29/37] lustre: handles: discard h_owner in favour of h_ops
Andreas Dilger
adilger at whamcloud.com
Tue Feb 26 22:37:49 PST 2019
On Feb 18, 2019, at 17:09, NeilBrown <neilb at suse.com> wrote:
>
> lustre_handles assigned a 64bit unique identifier (a 'cookie') to
> objects of various types and stored them in a hash table, allowing
> them to be accessed by the cookie.
>
> The is a facility for type checking by recording an 'owner' for each
> object, and checking the owner on lookup. Unfortunately this is not
> used - owner is always zero.
>
> Eahc object also contains an h_ops pointer which can be used to
> reliably identify an owner.
>
> So discard h_owner, pass and 'ops' pointer to class_handle2object(),
> and only return objects for which the h_ops matches.
>
> Signed-off-by: NeilBrown <neilb at suse.com>
The h_owner is not used in the client code, but it is still used in the
server code to ensure that only clients which have already opened a file
handle can use the open file handle cookie to re-open the file. The
h_owner in this case is an MDS-local pointer to the client export data,
so just using the h_ops pointer (which is generic to the class of users,
not the specific user) would not provide this functionality.
Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud
More information about the lustre-devel
mailing list