NFSv4: Be less aggressive about returning delegations for open files
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 3 Apr 2013 18:33:49 +0000 (14:33 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 5 Apr 2013 21:03:55 +0000 (17:03 -0400)
commitb757144fd77cf5512f5b60179ba5ca8dcc5184b4
tree8c83188cb1aa8e4ff5e8d25b48a3cf811d31772d
parentdb4f2e637f6d5dff6d07112e62605275be6050b3
NFSv4: Be less aggressive about returning delegations for open files

Currently, if the application that holds the file open isn't doing
I/O, we may end up returning the delegation. This means that we can
no longer cache the file as aggressively, and often also that we
multiply the state that both the server and the client needs to track.

This patch adds a check for open files to the routine that scans
for delegations that are unreferenced.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/delegation.c
fs/nfs/delegation.h