opnsense-src/sys/fs/nfsserver
Rick Macklem 3e5ba2e187 Fix LORs between vn_start_write() and vn_lock() in the pNFS server.
When coding the pNFS server, I added several vn_start_write() calls done
while the vnode was locked, not realizing I had introduced LORs and
possible deadlock when an exported file system on the MDS is suspended.
This patch fixes this by removing the added vn_start_write() calls and
modifying the code so that the extant vn_start_write() call before the
NFS RPC/operation is done when needed by the pNFS server.
Flags are changed so that LayoutCommit and LayoutReturn now get a
vn_start_write() done for them.
When the pNFS server is enabled, the code now also changes the flags for
Getattr, so that the vn_start_write() is done for Getattr, since it may
need to do a vn_set_extattr(). The nfs_writerpc flag array was made global
to the NFS server and renamed nfsrv_writerpc, which is consistent naming
for globals in the NFS server.
Thanks go to kib@ for reporting that doing vn_start_write() while the vnode is
locked results in a LOR.
This patch only affects the behaviour of the pNFS server.
2018-08-17 21:12:16 +00:00
..
nfs_fha_new.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_fha_new.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_nfsdcache.c style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfs_nfsdkrpc.c Fix LORs between vn_start_write() and vn_lock() in the pNFS server. 2018-08-17 21:12:16 +00:00
nfs_nfsdport.c Fix LORs between vn_start_write() and vn_lock() in the pNFS server. 2018-08-17 21:12:16 +00:00
nfs_nfsdserv.c Silence newer gcc warnings. 2018-07-29 21:51:17 +00:00
nfs_nfsdsocket.c Fix LORs between vn_start_write() and vn_lock() in the pNFS server. 2018-08-17 21:12:16 +00:00
nfs_nfsdstate.c Assorted fixes to handling of LayoutRecall callbacks, mostly error handling. 2018-08-08 20:21:45 +00:00
nfs_nfsdsubs.c Merge the pNFS server code from projects/pnfs-planb-server into head. 2018-06-12 19:36:32 +00:00