Skip to content

Fix bug that client use a invaild delegation

Bian Naimeng linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Make lock inode before lock nfs4_state_ownerfs/nfs/nfs4state.c+9 -70 replies
2/2We should clear NFS_DELEGATED_STATE after return delegationfs/nfs/nfs4proc.c+14 -119 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix bug that client use a invaild delegation

Hi all

I find a bug at RHEL6Beta2. If client return nfsi->delegation, some open_stateid
still have the NFS_DELEGATED_STATE bit, and another open process which has some owner will not clear this bit, it will not use the new open stateid to fill state->stateid, just fill state->open_stateid.
Then other IO operation will use the old delegation, it will get NFS4ERR_BAD_STATEID.

Thought my test program just FAIL at RHEL6Beta2, latest kernel is OK,
but i thinks the latest kernel maybe have the some bug.

---

Bian Naimeng (2):
[PATCH 1/2] Make lock inode before lock nfs4_state_owner [PATCH 2/2] We should clear NFS_DELEGATED_STATE after return delegation

 fs/nfs/nfs4proc.c  |   15 ++++++++++++++-
 fs/nfs/nfs4state.c |   16 +++++++++-------
 2 files changed, 23 insertions(+), 8 deletions(-)
Signature · 2 lines
Regards
Bian Naimeng