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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 fs/nfsd/nfs4pnfsdlm.c | 2 ++
 1 file changed, 2 insertions(+)

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) {
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux