[PATCH 12/13] SQUASHME pnfs_submit: fall back to MDS on filelayout_commit error

[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/nfs4filelayout.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 80eb481..dc762d9 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -563,6 +563,7 @@ filelayout_commit(struct pnfs_layout_type *layoutid, int sync,
 	loff_t file_offset, comp_offset;
 	size_t stripesz, cbytes;
 	int status;
+	enum pnfs_try_status trypnfs = PNFS_ATTEMPTED;
 	struct nfs4_file_layout_dsaddr *dsaddr;
 	u32 idx1, idx2;
 
@@ -662,11 +663,12 @@ out:
 		       data->pdata.pnfs_error);
 
 	/* XXX should we send COMMIT to MDS e.g. not free data and return 1 ? */
-	return PNFS_ATTEMPTED;
+	return trypnfs;
 err_rewind:
 	/* put remaining pages back onto the original data->pages */
 	list_add(&data->pages, &head);
 	list_del_init(&head);
+	trypnfs = PNFS_NOT_ATTEMPTED;
 	goto out;
 }
 
-- 
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