diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2014-09-19 16:55:07 +0200 |
---|---|---|
committer | Tom Haynes <loghyr@primarydata.com> | 2015-02-03 20:06:45 +0100 |
commit | a7d42ddb3099727f58366fa006f850a219cce6c8 (patch) | |
tree | c794857eb5c3ca29f77e259ecd3c155f841134d1 /fs/nfs/objlayout | |
parent | pnfs: pass ds_commit_idx through the commit path (diff) | |
download | linux-a7d42ddb3099727f58366fa006f850a219cce6c8.tar.xz linux-a7d42ddb3099727f58366fa006f850a219cce6c8.zip |
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.c | 3 |
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; |