[PATCH 7/7] pnfs-post-submit: restore setup_layoutcommit

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

 



From: Andy Adamson <andros@xxxxxxxxxx>

Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
---
 fs/nfs/pnfs.c             |    5 +++++
 include/linux/nfs4_pnfs.h |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index cdadddd..035cdde 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1599,6 +1599,11 @@ pnfs_layoutcommit_setup(struct inode *inode,
 	data->args.bitmask = nfss->attr_bitmask;
 	data->res.server = nfss;
 
+	/* Call layout driver to set the arguments */
+	if (nfss->pnfs_curr_ld->ld_io_ops->setup_layoutcommit)
+		result = nfss->pnfs_curr_ld->ld_io_ops->setup_layoutcommit(
+				&NFS_I(inode)->layout, &data->args);
+
 	dprintk("<-- %s Status %d\n", __func__, result);
 	return result;
 }
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index 3ff1dc3..3a150b1 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -154,6 +154,9 @@ struct layoutdriver_io_operations {
 	struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_type *layoutid, struct nfs4_pnfs_layoutget_res *lgr);
 	void (*free_lseg) (struct pnfs_layout_segment *lseg);
 
+	int (*setup_layoutcommit) (struct pnfs_layout_type *layoutid,
+				struct pnfs_layoutcommit_arg *args);
+
 	void (*encode_layoutcommit) (struct pnfs_layout_type *layoutid,
 				struct xdr_stream *xdr,
 				const struct pnfs_layoutcommit_arg *args);
-- 
1.6.6

--
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