Mercurial > illumos > nfs4.1
changeset 13936:2a8504eeb807
mnd_lock: delete mnd_eof at nnode_proxy_data_t
author | Vitaliy Gusev <gusev.vitaliy@nexenta.com> |
---|---|
date | Tue, 30 Aug 2011 22:19:18 +0400 |
parents | d3c751305127 |
children | bf6efdac9c20 |
files | usr/src/uts/common/fs/nfs/nfs_nnode_proxy.c usr/src/uts/common/nfs/nnode_proxy.h |
diffstat | 2 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/nfs/nfs_nnode_proxy.c Tue Aug 30 22:19:16 2011 +0400 +++ b/usr/src/uts/common/fs/nfs/nfs_nnode_proxy.c Tue Aug 30 22:19:18 2011 +0400 @@ -149,8 +149,6 @@ sp->io_array_size = io_array_size; sp->io_array = io_array; - mnd->mnd_eof = 0; - /* XXX - this is good for one big honking buffer. */ /* Get our DS filehandles and dev descriptors */ for (i = 0; i < lp->mlo_lc.lc_stripe_count; i++) { @@ -238,7 +236,7 @@ * multi-valued read request to each of N data servers. */ static int -proxy_do_read(nnode_proxy_data_t *mnd, uio_t *uiop, mds_strategy_t *sp) +proxy_do_read(uio_t *uiop, mds_strategy_t *sp, int *eof) { int i, j, idx; /* loop counters */ int segs; /* total segment count */ @@ -360,7 +358,7 @@ } if (resp->DS_READres_u.res_ok.eof == 1) { - mnd->mnd_eof = 1; + *eof = 1; goto out; } for (j = 0; j < resp->DS_READres_u.res_ok.rdv.rdv_len; j++) { @@ -400,7 +398,7 @@ mds_layout_t *lp; uint64_t off; uint64_t moved; - int rc; + int rc, eof = 0; ASSERT((*flags & (NNODE_IO_FLAG_WRITE | NNODE_IO_FLAG_EOF)) == 0); @@ -417,7 +415,7 @@ if (rc != 0) goto out; - rc = proxy_do_read(mnd, uiop, &sp); + rc = proxy_do_read(uiop, &sp, &eof); if (rc != 0) goto out; @@ -431,7 +429,7 @@ } mnd->mnd_flags |= NNODE_NVD_VATTR_VALID; - if (off + moved == vap->va_size || mnd->mnd_eof) + if (off + moved == vap->va_size || eof) *flags |= NNODE_IO_FLAG_EOF; else *flags &= ~NNODE_IO_FLAG_EOF; @@ -669,7 +667,7 @@ vattr_to_wcc_data(beforep, afterp, wcc); } - if (off + moved == vap->va_size || mnd->mnd_eof) + if (off + moved == vap->va_size) *flags |= NNODE_IO_FLAG_EOF; else *flags &= ~NNODE_IO_FLAG_EOF;