···112112 * nfs_direct_select_verf - select the right verifier113113 * @dreq - direct request possibly spanning multiple servers114114 * @ds_clp - nfs_client of data server or NULL if MDS / non-pnfs115115- * @ds_idx - index of data server in data server list, only valid if ds_clp set115115+ * @commit_idx - commit bucket index for the DS116116 *117117 * returns the correct verifier to use given the role of the server118118 */119119static struct nfs_writeverf *120120nfs_direct_select_verf(struct nfs_direct_req *dreq,121121 struct nfs_client *ds_clp,122122- int ds_idx)122122+ int commit_idx)123123{124124 struct nfs_writeverf *verfp = &dreq->verf;125125126126#ifdef CONFIG_NFS_V4_1127127 if (ds_clp) {128128 /* pNFS is in use, use the DS verf */129129- if (ds_idx >= 0 && ds_idx < dreq->ds_cinfo.nbuckets)130130- verfp = &dreq->ds_cinfo.buckets[ds_idx].direct_verf;129129+ if (commit_idx >= 0 && commit_idx < dreq->ds_cinfo.nbuckets)130130+ verfp = &dreq->ds_cinfo.buckets[commit_idx].direct_verf;131131 else132132 WARN_ON_ONCE(1);133133 }···148148{149149 struct nfs_writeverf *verfp;150150151151- verfp = nfs_direct_select_verf(dreq, hdr->ds_clp,152152- hdr->ds_idx);151151+ verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx);153152 WARN_ON_ONCE(verfp->committed >= 0);154153 memcpy(verfp, &hdr->verf, sizeof(struct nfs_writeverf));155154 WARN_ON_ONCE(verfp->committed < 0);···168169{169170 struct nfs_writeverf *verfp;170171171171- verfp = nfs_direct_select_verf(dreq, hdr->ds_clp,172172- hdr->ds_idx);172172+ verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx);173173 if (verfp->committed < 0) {174174 nfs_direct_set_hdr_verf(dreq, hdr);175175 return 0;
+2-2
fs/nfs/filelayout/filelayout.c
···492492 /* No multipath support. Use first DS */493493 atomic_inc(&ds->ds_clp->cl_count);494494 hdr->ds_clp = ds->ds_clp;495495- hdr->ds_idx = idx;495495+ hdr->ds_commit_idx = idx;496496 fh = nfs4_fl_select_ds_fh(lseg, j);497497 if (fh)498498 hdr->args.fh = fh;···536536 hdr->pgio_done_cb = filelayout_write_done_cb;537537 atomic_inc(&ds->ds_clp->cl_count);538538 hdr->ds_clp = ds->ds_clp;539539- hdr->ds_idx = idx;539539+ hdr->ds_commit_idx = idx;540540 fh = nfs4_fl_select_ds_fh(lseg, j);541541 if (fh)542542 hdr->args.fh = fh;
+1-1
include/linux/nfs_xdr.h
···13281328 __u64 mds_offset; /* Filelayout dense stripe */13291329 struct nfs_page_array page_array;13301330 struct nfs_client *ds_clp; /* pNFS data server */13311331- int ds_idx; /* ds index if ds_clp is set */13311331+ int ds_commit_idx; /* ds index if ds_clp is set */13321332};1333133313341334struct nfs_mds_commit_info {