Blob Blame History Raw
From: NeilBrown <neilb@suse.de>
Subject: kabi fix for NFS: Fix flexfiles read failover
Patch-mainline: never, kabi
References: git-fixes

patches.suse/NFS-Fix-flexfiles-read-failover.patch

changes the args to an exported function: pnfsd_read_resend_pnfs().

This break kabi.
So restore that function and create a new function: pnfsd_read_resend_pnfs2()
with the extra arg, and use that.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: NeilBrown <neilb@suse.com>

---
 fs/nfs/flexfilelayout/flexfilelayout.c |    2 +-
 fs/nfs/pnfs.c                          |    8 +++++++-
 fs/nfs/pnfs.h                          |    3 ++-
 3 files changed, 10 insertions(+), 3 deletions(-)

--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1127,7 +1127,7 @@ static void ff_layout_resend_pnfs_read(s
 		ff_layout_send_layouterror(hdr->lseg);
 	else
 		pnfs_error_mark_layout_for_return(hdr->inode, hdr->lseg);
-	pnfs_read_resend_pnfs(hdr, new_idx);
+	pnfs_read_resend_pnfs2(hdr, new_idx);
 }
 
 static void ff_layout_reset_read(struct nfs_pgio_header *hdr)
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2736,7 +2736,7 @@ pnfs_try_to_read_data(struct nfs_pgio_he
 }
 
 /* Resend all requests through pnfs. */
-void pnfs_read_resend_pnfs(struct nfs_pgio_header *hdr,
+void pnfs_read_resend_pnfs2(struct nfs_pgio_header *hdr,
 			   unsigned int mirror_idx)
 {
 	struct nfs_pageio_descriptor pgio;
@@ -2752,6 +2752,12 @@ void pnfs_read_resend_pnfs(struct nfs_pg
 		hdr->task.tk_status = nfs_pageio_resend(&pgio, hdr);
 	}
 }
+EXPORT_SYMBOL_GPL(pnfs_read_resend_pnfs2);
+
+void pnfs_read_resend_pnfs(struct nfs_pgio_header *hdr)
+{
+	pnfs_read_resend_pnfs2(hdr, 0);
+}
 EXPORT_SYMBOL_GPL(pnfs_read_resend_pnfs);
 
 static void
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -295,7 +295,8 @@ int _pnfs_return_layout(struct inode *);
 int pnfs_commit_and_return_layout(struct inode *);
 void pnfs_ld_write_done(struct nfs_pgio_header *);
 void pnfs_ld_read_done(struct nfs_pgio_header *);
-void pnfs_read_resend_pnfs(struct nfs_pgio_header *, unsigned int mirror_idx);
+void pnfs_read_resend_pnfs(struct nfs_pgio_header *);
+void pnfs_read_resend_pnfs2(struct nfs_pgio_header *, unsigned int mirror_idx);
 struct pnfs_layout_segment *pnfs_update_layout(struct inode *ino,
 					       struct nfs_open_context *ctx,
 					       loff_t pos,