diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-11-15 17:37:37 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-11-30 10:52:22 -0500 |
commit | 63e2fffa59a9dd91e443b08832656399fd80b7f0 (patch) | |
tree | c63da5c4966c08dcfa790cd401bcbc83cf1ee143 /include | |
parent | b65054597872ce3aefbc6a666385eabdf9e288da (diff) | |
download | linux-stable-63e2fffa59a9dd91e443b08832656399fd80b7f0.tar.gz linux-stable-63e2fffa59a9dd91e443b08832656399fd80b7f0.tar.bz2 linux-stable-63e2fffa59a9dd91e443b08832656399fd80b7f0.zip |
pNFS/flexfiles: Fix array overflow when flexfiles mirroring is enabled
If the flexfiles mirroring is enabled, then the read code expects to be
able to set pgio->pg_mirror_idx to point to the data server that is
being used for this particular read. However it does not change the
pg_mirror_count because we only need to send a single read.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_page.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index c32c15216da3..f0373a6cb5fb 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -55,6 +55,7 @@ struct nfs_page { unsigned short wb_nio; /* Number of I/O attempts */ }; +struct nfs_pgio_mirror; struct nfs_pageio_descriptor; struct nfs_pageio_ops { void (*pg_init)(struct nfs_pageio_descriptor *, struct nfs_page *); @@ -64,6 +65,9 @@ struct nfs_pageio_ops { unsigned int (*pg_get_mirror_count)(struct nfs_pageio_descriptor *, struct nfs_page *); void (*pg_cleanup)(struct nfs_pageio_descriptor *); + struct nfs_pgio_mirror * + (*pg_get_mirror)(struct nfs_pageio_descriptor *, u32); + u32 (*pg_set_mirror)(struct nfs_pageio_descriptor *, u32); }; struct nfs_rw_ops { |