Change in ffilz/nfs-ganesha[next]: FSAL_UP: fix op_ctx handling in delegation recall/revoke codepaths
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/418214
Change subject: FSAL_UP: fix op_ctx handling in delegation recall/revoke codepaths
......................................................................
FSAL_UP: fix op_ctx handling in delegation recall/revoke codepaths
delegrecall_task calls dec_state_t_ref at the end of it, which can do a
subcall_task call. That requires a valid op_ctx pointer, but we will
have already reset op_ctx back to its original value at that point
(which may very well be NULL).
Fix the code to set up the op_ctx much earlier, on entry into the
function and then only switch it back at exit. Also, ensure we clear
out the export pointers just before we put the reference to ensure that
no subcall will attempt to use them.
Also, tighten up some similar op_ctx handling in other delegation
recall and revoke handling codepaths.
Change-Id: I2718515fe12448209502ba561f5bb2c40248faa7
Reported-by: Jiffin Tony Thottan <thottanjiffin(a)gmail.com>
Cc: Soumya Koduri <skoduri(a)redhat.com>
Fixes: 81caa34f9aca (set op_ctx during deleg revokes and recalls)
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/FSAL_UP/fsal_up_top.c
1 file changed, 34 insertions(+), 20 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/14/418214/1
--
To view, visit https://review.gerrithub.io/418214
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2718515fe12448209502ba561f5bb2c40248faa7
Gerrit-Change-Number: 418214
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
Gerrit-CC: Soumya <skoduri(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: NFS: handle recalled CLAIM_PREVIOUS delegations correctly
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/417785
Change subject: NFS: handle recalled CLAIM_PREVIOUS delegations correctly
......................................................................
NFS: handle recalled CLAIM_PREVIOUS delegations correctly
It's possible that we'll hand out a delegation to a client, and then
crash, and during the downtime conflicting access occurs that would
cause the delegation to be recalled.
Currently, we just refuse to grant the delegation in the reclaim request
in that case, but that can be problematic, particularly with write
delegations.
The RFCs state that we should instead grant reclaimed delegations during
a recall, and set the "recalled" flag in them. This patch fixes that
handling in ganesha.
When we're handling a request to reclaim a delegation and the FSAL
won't grant us one, then go ahead and grant it anyway and set the
recalled flag in the response.
Change-Id: I9bca3087e9b1c25fd65839189aae5b05a2b899fd
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/Protocols/NFS/nfs4_op_open.c
1 file changed, 13 insertions(+), 10 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/85/417785/1
--
To view, visit https://review.gerrithub.io/417785
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bca3087e9b1c25fd65839189aae5b05a2b899fd
Gerrit-Change-Number: 417785
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Pnfs flex layout: synthetic uid/gid
by Supriti Singh
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)
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: SAL: remove unneeded else blocks in get_delegation
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/417682
Change subject: SAL: remove unneeded else blocks in get_delegation
......................................................................
SAL: remove unneeded else blocks in get_delegation
They're not needed when the previous if block does a direct return.
Change-Id: Idde92381ab8d398fdca1dbdf115d2ed649f89a8d
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/Protocols/NFS/nfs4_op_open.c
1 file changed, 37 insertions(+), 42 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/82/417682/1
--
To view, visit https://review.gerrithub.io/417682
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idde92381ab8d398fdca1dbdf115d2ed649f89a8d
Gerrit-Change-Number: 417682
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months
Change in ffilz/nfs-ganesha[next]: SAL: update_delegation_stats doesn't need a state_t pointer
by GerritHub
From Jeff Layton <jlayton(a)redhat.com>:
Jeff Layton has uploaded this change for review. ( https://review.gerrithub.io/417681
Change subject: SAL: update_delegation_stats doesn't need a state_t pointer
......................................................................
SAL: update_delegation_stats doesn't need a state_t pointer
Change-Id: Iea6a2a33fdd6c3e3f4d13a75c83f65acb8de8303
Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
---
M src/SAL/state_deleg.c
M src/include/sal_functions.h
2 files changed, 3 insertions(+), 5 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/81/417681/1
--
To view, visit https://review.gerrithub.io/417681
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea6a2a33fdd6c3e3f4d13a75c83f65acb8de8303
Gerrit-Change-Number: 417681
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlayton(a)redhat.com>
6 years, 5 months