mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
b650545978
commit
63e2fffa59
3 changed files with 52 additions and 15 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue