nfs: rename pgio header ds_idx to ds_commit_idx
authorWeston Andros Adamson <dros@primarydata.com>
Tue, 16 Sep 2014 21:35:51 +0000 (17:35 -0400)
committerTom Haynes <loghyr@primarydata.com>
Tue, 3 Feb 2015 19:06:44 +0000 (11:06 -0800)
'ds_commit_idx' is a better name - it is used to select the right
commit bucket for pnfs.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
fs/nfs/direct.c
fs/nfs/filelayout/filelayout.c
include/linux/nfs_xdr.h

index e84f764b9dcdb60440c4a0a87c04def9daf3900d..d7c2d430b04d2d54cac5fa3ed67e2d0863a77ac7 100644 (file)
@@ -112,22 +112,22 @@ static inline int put_dreq(struct nfs_direct_req *dreq)
  * nfs_direct_select_verf - select the right verifier
  * @dreq - direct request possibly spanning multiple servers
  * @ds_clp - nfs_client of data server or NULL if MDS / non-pnfs
- * @ds_idx - index of data server in data server list, only valid if ds_clp set
+ * @commit_idx - commit bucket index for the DS
  *
  * returns the correct verifier to use given the role of the server
  */
 static struct nfs_writeverf *
 nfs_direct_select_verf(struct nfs_direct_req *dreq,
                       struct nfs_client *ds_clp,
-                      int ds_idx)
+                      int commit_idx)
 {
        struct nfs_writeverf *verfp = &dreq->verf;
 
 #ifdef CONFIG_NFS_V4_1
        if (ds_clp) {
                /* pNFS is in use, use the DS verf */
-               if (ds_idx >= 0 && ds_idx < dreq->ds_cinfo.nbuckets)
-                       verfp = &dreq->ds_cinfo.buckets[ds_idx].direct_verf;
+               if (commit_idx >= 0 && commit_idx < dreq->ds_cinfo.nbuckets)
+                       verfp = &dreq->ds_cinfo.buckets[commit_idx].direct_verf;
                else
                        WARN_ON_ONCE(1);
        }
@@ -148,8 +148,7 @@ static void nfs_direct_set_hdr_verf(struct nfs_direct_req *dreq,
 {
        struct nfs_writeverf *verfp;
 
-       verfp = nfs_direct_select_verf(dreq, hdr->ds_clp,
-                                     hdr->ds_idx);
+       verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx);
        WARN_ON_ONCE(verfp->committed >= 0);
        memcpy(verfp, &hdr->verf, sizeof(struct nfs_writeverf));
        WARN_ON_ONCE(verfp->committed < 0);
@@ -169,8 +168,7 @@ static int nfs_direct_set_or_cmp_hdr_verf(struct nfs_direct_req *dreq,
 {
        struct nfs_writeverf *verfp;
 
-       verfp = nfs_direct_select_verf(dreq, hdr->ds_clp,
-                                        hdr->ds_idx);
+       verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx);
        if (verfp->committed < 0) {
                nfs_direct_set_hdr_verf(dreq, hdr);
                return 0;
index 2af32fc39d600a7345e92c66f1ffa03d20ee8647..520cbc53e035d2c2e6af568d3009b8b58995c3ed 100644 (file)
@@ -492,7 +492,7 @@ filelayout_read_pagelist(struct nfs_pgio_header *hdr)
        /* No multipath support. Use first DS */
        atomic_inc(&ds->ds_clp->cl_count);
        hdr->ds_clp = ds->ds_clp;
-       hdr->ds_idx = idx;
+       hdr->ds_commit_idx = idx;
        fh = nfs4_fl_select_ds_fh(lseg, j);
        if (fh)
                hdr->args.fh = fh;
@@ -536,7 +536,7 @@ filelayout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
        hdr->pgio_done_cb = filelayout_write_done_cb;
        atomic_inc(&ds->ds_clp->cl_count);
        hdr->ds_clp = ds->ds_clp;
-       hdr->ds_idx = idx;
+       hdr->ds_commit_idx = idx;
        fh = nfs4_fl_select_ds_fh(lseg, j);
        if (fh)
                hdr->args.fh = fh;
index 4fd7793d45d16f403ba7ea1c514d383bf075bcb5..5bc99f04a5507163dd6272b25ccd408d1043e8ce 100644 (file)
@@ -1328,7 +1328,7 @@ struct nfs_pgio_header {
        __u64                   mds_offset;     /* Filelayout dense stripe */
        struct nfs_page_array   page_array;
        struct nfs_client       *ds_clp;        /* pNFS data server */
-       int                     ds_idx;         /* ds index if ds_clp is set */
+       int                     ds_commit_idx;  /* ds index if ds_clp is set */
 };
 
 struct nfs_mds_commit_info {
This page took 0.029138 seconds and 5 git commands to generate.