Skip to content

Commit

Permalink
nfsd4: share file descriptors between stateid's
Browse files Browse the repository at this point in the history
The vfs doesn't really allow us to "upgrade" a file descriptor from
read-only to read-write, and our attempt to do so in nfs4_upgrade_open
is ugly and incomplete.

Move to a different scheme where we keep multiple opens, shared between
open stateid's, in the nfs4_file struct.  Each file will be opened at
most 3 times (for read, write, and read-write), and those opens will be
shared between all clients and openers.  On upgrade we will do another
open if necessary instead of attempting to upgrade an existing open.
We keep count of the number of readers and writers so we know when to
close the shared files.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields authored and J. Bruce Fields committed Jul 29, 2010
1 parent 0292191 commit f9d7562
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 123 deletions.
Loading

0 comments on commit f9d7562

Please sign in to comment.