Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfs: rename pgio header ds_idx to ds_commit_idx

'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>

authored by

Weston Andros Adamson and committed by
Tom Haynes
6cccbb6f 309a1d65

+9 -11
+6 -8
fs/nfs/direct.c
··· 112 112 * nfs_direct_select_verf - select the right verifier 113 113 * @dreq - direct request possibly spanning multiple servers 114 114 * @ds_clp - nfs_client of data server or NULL if MDS / non-pnfs 115 - * @ds_idx - index of data server in data server list, only valid if ds_clp set 115 + * @commit_idx - commit bucket index for the DS 116 116 * 117 117 * returns the correct verifier to use given the role of the server 118 118 */ 119 119 static struct nfs_writeverf * 120 120 nfs_direct_select_verf(struct nfs_direct_req *dreq, 121 121 struct nfs_client *ds_clp, 122 - int ds_idx) 122 + int commit_idx) 123 123 { 124 124 struct nfs_writeverf *verfp = &dreq->verf; 125 125 126 126 #ifdef CONFIG_NFS_V4_1 127 127 if (ds_clp) { 128 128 /* pNFS is in use, use the DS verf */ 129 - if (ds_idx >= 0 && ds_idx < dreq->ds_cinfo.nbuckets) 130 - verfp = &dreq->ds_cinfo.buckets[ds_idx].direct_verf; 129 + if (commit_idx >= 0 && commit_idx < dreq->ds_cinfo.nbuckets) 130 + verfp = &dreq->ds_cinfo.buckets[commit_idx].direct_verf; 131 131 else 132 132 WARN_ON_ONCE(1); 133 133 } ··· 148 148 { 149 149 struct nfs_writeverf *verfp; 150 150 151 - verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, 152 - hdr->ds_idx); 151 + verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx); 153 152 WARN_ON_ONCE(verfp->committed >= 0); 154 153 memcpy(verfp, &hdr->verf, sizeof(struct nfs_writeverf)); 155 154 WARN_ON_ONCE(verfp->committed < 0); ··· 168 169 { 169 170 struct nfs_writeverf *verfp; 170 171 171 - verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, 172 - hdr->ds_idx); 172 + verfp = nfs_direct_select_verf(dreq, hdr->ds_clp, hdr->ds_commit_idx); 173 173 if (verfp->committed < 0) { 174 174 nfs_direct_set_hdr_verf(dreq, hdr); 175 175 return 0;
+2 -2
fs/nfs/filelayout/filelayout.c
··· 492 492 /* No multipath support. Use first DS */ 493 493 atomic_inc(&ds->ds_clp->cl_count); 494 494 hdr->ds_clp = ds->ds_clp; 495 - hdr->ds_idx = idx; 495 + hdr->ds_commit_idx = idx; 496 496 fh = nfs4_fl_select_ds_fh(lseg, j); 497 497 if (fh) 498 498 hdr->args.fh = fh; ··· 536 536 hdr->pgio_done_cb = filelayout_write_done_cb; 537 537 atomic_inc(&ds->ds_clp->cl_count); 538 538 hdr->ds_clp = ds->ds_clp; 539 - hdr->ds_idx = idx; 539 + hdr->ds_commit_idx = idx; 540 540 fh = nfs4_fl_select_ds_fh(lseg, j); 541 541 if (fh) 542 542 hdr->args.fh = fh;
+1 -1
include/linux/nfs_xdr.h
··· 1328 1328 __u64 mds_offset; /* Filelayout dense stripe */ 1329 1329 struct nfs_page_array page_array; 1330 1330 struct nfs_client *ds_clp; /* pNFS data server */ 1331 - int ds_idx; /* ds index if ds_clp is set */ 1331 + int ds_commit_idx; /* ds index if ds_clp is set */ 1332 1332 }; 1333 1333 1334 1334 struct nfs_mds_commit_info {