nfs_bio.c (34930) | nfs_bio.c (36176) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 |
37 * $Id: nfs_bio.c,v 1.53 1998/03/08 09:57:54 julian Exp $ | 37 * $Id: nfs_bio.c,v 1.54 1998/03/28 16:05:05 steve Exp $ |
38 */ 39 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/resourcevar.h> 44#include <sys/signalvar.h> 45#include <sys/proc.h> --- 206 unchanged lines hidden (view full) --- 252 if (uio->uio_rw != UIO_READ) 253 panic("nfs_read mode"); 254#endif 255 if (uio->uio_resid == 0) 256 return (0); 257 if (uio->uio_offset < 0) 258 return (EINVAL); 259 p = uio->uio_procp; | 38 */ 39 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/resourcevar.h> 44#include <sys/signalvar.h> 45#include <sys/proc.h> --- 206 unchanged lines hidden (view full) --- 252 if (uio->uio_rw != UIO_READ) 253 panic("nfs_read mode"); 254#endif 255 if (uio->uio_resid == 0) 256 return (0); 257 if (uio->uio_offset < 0) 258 return (EINVAL); 259 p = uio->uio_procp; |
260 if ((nmp->nm_flag & (NFSMNT_NFSV3 | NFSMNT_GOTFSINFO)) == NFSMNT_NFSV3) | 260 if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && 261 (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) |
261 (void)nfs_fsinfo(nmp, vp, cred, p); 262 biosize = vp->v_mount->mnt_stat.f_iosize; 263 /* 264 * For nfs, cache consistency can only be maintained approximately. 265 * Although RFC1094 does not specify the criteria, the following is 266 * believed to be compatible with the reference port. 267 * For nqnfs, full cache consistency is maintained within the loop. 268 * For nfs: --- 362 unchanged lines hidden (view full) --- 631 panic("nfs_write proc"); 632#endif 633 if (vp->v_type != VREG) 634 return (EIO); 635 if (np->n_flag & NWRITEERR) { 636 np->n_flag &= ~NWRITEERR; 637 return (np->n_error); 638 } | 262 (void)nfs_fsinfo(nmp, vp, cred, p); 263 biosize = vp->v_mount->mnt_stat.f_iosize; 264 /* 265 * For nfs, cache consistency can only be maintained approximately. 266 * Although RFC1094 does not specify the criteria, the following is 267 * believed to be compatible with the reference port. 268 * For nqnfs, full cache consistency is maintained within the loop. 269 * For nfs: --- 362 unchanged lines hidden (view full) --- 632 panic("nfs_write proc"); 633#endif 634 if (vp->v_type != VREG) 635 return (EIO); 636 if (np->n_flag & NWRITEERR) { 637 np->n_flag &= ~NWRITEERR; 638 return (np->n_error); 639 } |
639 if ((nmp->nm_flag & (NFSMNT_NFSV3 | NFSMNT_GOTFSINFO)) == NFSMNT_NFSV3) | 640 if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && 641 (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) |
640 (void)nfs_fsinfo(nmp, vp, cred, p); 641 if (ioflag & (IO_APPEND | IO_SYNC)) { 642 if (np->n_flag & NMODIFIED) { 643 np->n_attrstamp = 0; 644 error = nfs_vinvalbuf(vp, V_SAVE, cred, p, 1); 645 if (error) 646 return (error); 647 } --- 593 unchanged lines hidden --- | 642 (void)nfs_fsinfo(nmp, vp, cred, p); 643 if (ioflag & (IO_APPEND | IO_SYNC)) { 644 if (np->n_flag & NMODIFIED) { 645 np->n_attrstamp = 0; 646 error = nfs_vinvalbuf(vp, V_SAVE, cred, p, 1); 647 if (error) 648 return (error); 649 } --- 593 unchanged lines hidden --- |