On Tue, 2024-02-13 at 09:47 -0800, Dai Ngo wrote: > Currently GETATTR conflict with a write delegation is handled by > recalling the delegation before replying to the GETATTR. > > This patch series add supports for CB_GETATTR callback to get the latest > change_info and size information of the file from the client that holds > the delegation to reply to the GETATTR from the second client. > > NOTE: this patch series is mostly the same as the previous patches which > were backed out when un unrelated problem of NFSD server hang on reboot > was reported. > > The only difference is the wait_on_bit() in nfsd4_deleg_getattr_conflict was > replaced with wait_on_bit_timeout() with 30ms timeout to avoid a potential > DOS attack by exhausting NFSD kernel threads with GETATTR conflicts. > > fs/nfsd/nfs4callback.c | 97 +++++++++++++++++++++++++++++++++++- > fs/nfsd/nfs4state.c | 119 ++++++++++++++++++++++++++++++++++++++++---- > fs/nfsd/nfs4xdr.c | 10 +++- > fs/nfsd/nfsd.h | 1 + > fs/nfsd/state.h | 24 ++++++++- > fs/nfsd/xdr4cb.h | 18 +++++++ > 6 files changed, 255 insertions(+), 14 deletions(-) Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>