diff mbox

[RFC,v0,49/49] pnfsd: dlm set return_on_close to true

Message ID 1380220995-14943-1-git-send-email-bhalevy@primarydata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benny Halevy Sept. 26, 2013, 6:43 p.m. UTC
The client may hold a layout post CLOSE essentially forever,
requiring the server to remember that.

However, since we keep track of the layout state by hanging it on the
respective file and client structures, when the file goes away we lose
track of the layout therefore we need to set return_on_close to true.

Signed-off-by: Benny Halevy <bhalevy@primarydata.com>
---
 fs/nfsd/nfs4pnfsdlm.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
index de1af22..093d836 100644
--- a/fs/nfsd/nfs4pnfsdlm.c
+++ b/fs/nfsd/nfs4pnfsdlm.c
@@ -406,6 +406,8 @@  static enum nfsstat4 nfsd4_pnfs_dlm_layoutget(struct inode *inode,
 	res->lg_seg.length = NFS4_MAX_UINT64;
 	/* Always give out READ ONLY layouts */
 	res->lg_seg.iomode = IOMODE_READ;
+	/* Set return_on_close to true until we track layout state post CLOSE */
+	res->lg_return_on_close = 1;
 
 	layout = kzalloc(sizeof(*layout), GFP_KERNEL);
 	if (layout == NULL) {