Frank Filz has uploaded this change for review.

View Change

PseudoFS lookup fails with ERR_FSAL_DELAY during export update

FSAL_PSEUDO is very simple and actually has very few errors. The change
to return ERR_FSAL_DELAY instead of ERR_FSAL_NOENT however has broken
export update when a new export is added in the PseudoFS.

This patch simply codes more knowledge of how FSAL_PSEUDO works into
make_pseudofs_node() and ignores any error on lookup because it's either
ERR_FSAL_NOENT straight up or translated to ERR_FSAL_DELAY.

Also simplify non-FSAL_PSEUDO error reporting a bit.

Also add comments to point out how FSAL_PSEUDO will actually behave
in any real scenario. It IS possible for the PseudoFS to be created
as read/write in which case a CLIENT COULD upset our apple cart, so
some "make this code look right" error handling COULD actually be
triggered.

Another fix would be to actually disallow any activity on FSAL_PSEUDO
when an update is in progress and fix is_export_update_in_progress()
to not indicate an update is in progress for the thread actually doing
the update... All that would actually need would be to have a flag in
the op_ctx which denotes the updating thread.

Change-Id: If85c09642cf0776ee86b05dbb0f3aa8dde6533af
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
---
M src/Protocols/NFS/nfs4_pseudo.c
1 file changed, 35 insertions(+), 18 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/53/505453/1

To view, visit change 505453. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: If85c09642cf0776ee86b05dbb0f3aa8dde6533af
Gerrit-Change-Number: 505453
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx@mindspring.com>
Gerrit-MessageType: newchange