Hello,
I am looking at how to implement synthetic uid/gids for flex layout.
From rfc section "Implementation Notes for Synthetic uids/gids": [0]
" When the metadata server had a request to access a file, a SETATTR would be sent to
the storage device to set the
owner and group of the data file. The user and group might be selected in a round robin
fashion from the range of
available ids. Those ids would be sent back as ffds_user and ffds_group to the client.
And it would present them as the
RPC credentials to the storage device. When the client was done accessing the file and
the metadata server knew that no
other client was accessing the file, it
could reset the owner and group to restrict access to the data file."
Few questions regarding implementation:
1. To implement it in nfs-ganesha, we would have to add a way to generate uids/gids, store
a mapping between uids/gids
and the corresponding data file. Is there already such structure in nfs-ganesha that can
be reused?
2. As I understood, once metadata server generates uid/gid, it needs to send a setattr to
the storage device to set
owner and group of data file. But I am not sure how does this synthetic uid/gid maps to
real uid/gid that a data file
might have. The same data file in cephfs can be opened through clients other than nfs as
well.
[0]
https://tools.ietf.org/html/draft-ietf-nfsv4-flex-files-19#page-3
------
Supriti Singh SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284 (AG Nürnberg)