summaryrefslogtreecommitdiff
path: root/fs/nfs/objlayout
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-09-19 10:55:07 -0400
committerTom Haynes <loghyr@primarydata.com>2015-02-03 11:06:45 -0800
commita7d42ddb3099727f58366fa006f850a219cce6c8 (patch)
treec794857eb5c3ca29f77e259ecd3c155f841134d1 /fs/nfs/objlayout
parentb57ff1303a2d4d1484c7a82bd80a3e014d6cdf5e (diff)
nfs: add mirroring support to pgio layer
This patch adds mirrored write support to the pgio layer. The default is to use one mirror, but pgio callers may define callbacks to change this to any value up to the (arbitrarily selected) limit of 16. The basic idea is to break out members of nfs_pageio_descriptor that cannot be shared between mirrored DSes and put them in a new structure. Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Diffstat (limited to 'fs/nfs/objlayout')
-rw-r--r--fs/nfs/objlayout/objio_osd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index d00778077df1..9a5f2ee6001f 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -537,11 +537,12 @@ int objio_write_pagelist(struct nfs_pgio_header *hdr, int how)
static size_t objio_pg_test(struct nfs_pageio_descriptor *pgio,
struct nfs_page *prev, struct nfs_page *req)
{
+ struct nfs_pgio_mirror *mirror = &pgio->pg_mirrors[pgio->pg_mirror_idx];
unsigned int size;
size = pnfs_generic_pg_test(pgio, prev, req);
- if (!size || pgio->pg_count + req->wb_bytes >
+ if (!size || mirror->pg_count + req->wb_bytes >
(unsigned long)pgio->pg_layout_private)
return 0;