Changeset 6e4709b in rtems-libbsd


Ignore:
Timestamp:
01/05/23 16:42:48 (3 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
6-freebsd-12
Children:
b0fc22c
Parents:
84d15c2
git-author:
Sebastian Huber <sebastian.huber@…> (01/05/23 16:42:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/12/23 07:22:59)
Message:

vfs/nfs: Revert white space changes

Location:
freebsd/sys
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/fs/nfs/nfs_commonkrpc.c

    r84d15c2 r6e4709b  
    220220                else
    221221                        nconf = getnetconfigent("tcp6");
    222 
     222                       
    223223        pktscale = nfs_bufpackets;
    224224        if (pktscale < 2)
     
    238238        so = NULL;
    239239        saddr = NFSSOCKADDR(nrp->nr_nam, struct sockaddr *);
    240         error = socreate(saddr->sa_family, &so, nrp->nr_sotype,
     240        error = socreate(saddr->sa_family, &so, nrp->nr_sotype, 
    241241            nrp->nr_soproto, td->td_ucred, td);
    242242        if (error) {
     
    392392                 * For UDP, there are 2 timeouts:
    393393                 * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer
    394                  *   that does a retransmit of an RPC request using the same
     394                 *   that does a retransmit of an RPC request using the same 
    395395                 *   socket and xid. This is what you normally want to do,
    396396                 *   since NFS servers depend on "same xid" for their
     
    742742                        uint32_t probe_id;
    743743                        int probe_procnum;
    744 
     744       
    745745                        if (nd->nd_flag & ND_NFSV4) {
    746746                                probe_id =
     
    11441144                                      j != NFSERR_BADSTATEID &&
    11451145                                      j != NFSERR_BADSEQID &&
    1146                                       j != NFSERR_BADXDR &&
     1146                                      j != NFSERR_BADXDR &&     
    11471147                                      j != NFSERR_RESOURCE &&
    1148                                       j != NFSERR_NOFILEHANDLE)))
     1148                                      j != NFSERR_NOFILEHANDLE)))               
    11491149                                        nd->nd_flag |= ND_INCRSEQID;
    11501150                        }
     
    12651265{
    12661266        int i;
    1267 
     1267       
    12681268        for (i = 0 ; i < nitems(newnfs_sig_set); i++)
    12691269                if (SIGISMEMBER(set, newnfs_sig_set[i]))
     
    12711271        return (0);
    12721272}
    1273 
     1273 
    12741274/*
    12751275 * The set/restore sigmask functions are used to (temporarily) overwrite
     
    12841284        int i;
    12851285        struct proc *p;
    1286 
     1286       
    12871287        SIGFILLSET(newset);
    12881288        if (td == NULL)
     
    13501350        struct proc *p;
    13511351        sigset_t tmpset;
    1352 
     1352       
    13531353        /* Terminate all requests while attempting a forced unmount. */
    13541354        if (NFSCL_FORCEDISM(nmp->nm_mountp))
     
    14341434        } else
    14351435                mtx_unlock(&nmp->nm_mtx);
    1436 
     1436       
    14371437        mtx_lock(&nmp->nm_mtx);
    14381438        if ((flags & NFSSTA_LOCKTIMEO) && (nmp->nm_state & NFSSTA_LOCKTIMEO)) {
     
    14441444                mtx_unlock(&nmp->nm_mtx);
    14451445}
     1446
  • freebsd/sys/fs/nfs/nfs_commonport.c

    r84d15c2 r6e4709b  
    819819MODULE_DEPEND(nfscommon, nfssvc, 1, 1, 1);
    820820MODULE_DEPEND(nfscommon, krpc, 1, 1, 1);
     821
  • freebsd/sys/fs/nfs/nfs_commonsubs.c

    r84d15c2 r6e4709b  
    47714771        return (ds);
    47724772}
     4773
  • freebsd/sys/fs/nfsclient/nfs.h

    r84d15c2 r6e4709b  
    9797int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *);
    9898int ncl_vinvalbuf(struct vnode *, int, struct thread *, int);
    99 int ncl_asyncio(struct
    100                 nfsmount *, struct buf *, struct ucred *,
     99int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *,
    101100    struct thread *);
    102101int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *,
  • freebsd/sys/fs/nfsclient/nfs_clbio.c

    r84d15c2 r6e4709b  
    16961696#else /* __rtems__ */
    16971697                                panic("nfsclient: text file modification: want to killproc");
    1698 #endif /* _-rtems__ */
     1698#endif /* __rtems__ */
    16991699                        } else
    17001700                                NFSUNLOCKNODE(np);
     
    19241924        return(error);
    19251925}
     1926
  • freebsd/sys/fs/nfsclient/nfs_clkrpc.c

    r84d15c2 r6e4709b  
    299299        }
    300300}
     301
  • freebsd/sys/fs/nfsclient/nfs_clport.c

    r84d15c2 r6e4709b  
    14531453MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1);
    14541454MODULE_DEPEND(nfscl, nfslock, 1, 1, 1);
     1455
  • freebsd/sys/fs/nfsclient/nfs_clrpcops.c

    r84d15c2 r6e4709b  
    77417741        return (laystat);
    77427742}
     7743
  • freebsd/sys/fs/nfsclient/nfs_clstate.c

    r84d15c2 r6e4709b  
    54585458        return (0);
    54595459}
     5460
  • freebsd/sys/fs/nfsclient/nfs_clsubs.c

    r84d15c2 r6e4709b  
    395395        return (0);
    396396}
     397
  • freebsd/sys/fs/nfsclient/nfs_clvfsops.c

    r84d15c2 r6e4709b  
    20612061        nfscl_printoptval(nmp, nmp->nm_retry, ",retrans", &buf, &blen);
    20622062}
     2063
  • freebsd/sys/fs/nfsclient/nfs_clvnops.c

    r84d15c2 r6e4709b  
    818818                    error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0);
    819819                    /* np->n_flag &= ~NMODIFIED; */
    820                 } else if (NFS_ISV4(vp)) {
     820                } else if (NFS_ISV4(vp)) { 
    821821                        if (nfscl_mustflush(vp) != 0) {
    822822                                int cm = newnfs_commit_on_close ? 1 : 0;
     
    834834                NFSLOCKNODE(np);
    835835            }
    836             /*
     836            /* 
    837837             * Invalidate the attribute cache in all cases.
    838838             * An open is going to fetch fresh attrs any way, other procs
    839              * on this node that have file open will be forced to do an
     839             * on this node that have file open will be forced to do an 
    840840             * otw attr fetch, but this is safe.
    841841             * --> A user found that their RPC count dropped by 20% when
     
    892892        if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) {
    893893                NFSLOCKNODE(np);
    894                 KASSERT((np->n_directio_opens > 0),
     894                KASSERT((np->n_directio_opens > 0), 
    895895                        ("nfs_close: unexpectedly value (0) of n_directio_opens\n"));
    896896                np->n_directio_opens--;
     
    10221022                            vap->va_uid == (uid_t)VNOVAL &&
    10231023                            vap->va_gid == (gid_t)VNOVAL)
    1024                                 return (0);
     1024                                return (0);             
    10251025                        vap->va_size = VNOVAL;
    10261026                        break;
     
    10731073        } else {
    10741074                NFSLOCKNODE(np);
    1075                 if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) &&
     1075                if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && 
    10761076                    (np->n_flag & NMODIFIED) && vp->v_type == VREG) {
    10771077                        NFSUNLOCKNODE(np);
     
    11471147        struct vattr vattr;
    11481148        struct timespec nctime;
    1149 
     1149       
    11501150        *vpp = NULLVP;
    11511151        if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) &&
     
    12241224                if (dvp != newvp)
    12251225                        vput(newvp);
    1226                 else
     1226                else 
    12271227                        vrele(newvp);
    12281228                *vpp = NULLVP;
     
    13801380                            0, 1);
    13811381                else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) &&
    1382                     !(np->n_flag & NMODIFIED)) {
     1382                    !(np->n_flag & NMODIFIED)) {                       
    13831383                        /*
    13841384                         * Flush the attribute cache when opening a
     
    17121712                                vap->va_uid = (uid_t)VNOVAL;
    17131713                                vap->va_gid = (uid_t)VNOVAL;
    1714                                 error = nfsrpc_setattr(newvp, vap, NULL,
     1714                                error = nfsrpc_setattr(newvp, vap, NULL, 
    17151715                                    cnp->cn_cred, cnp->cn_thread, &nfsva,
    17161716                                    &attrflag, NULL);
     
    19001900         * ( as far as I can tell ) it flushes dirty buffers more
    19011901         * often.
    1902          *
     1902         * 
    19031903         * Skip the rename operation if the fsync fails, this can happen
    19041904         * due to the server's volume being full, when we pushed out data
     
    23122312        int error = 0;
    23132313        struct vattr vattr;
    2314 
     2314       
    23152315        if (ap->a_eofflag != NULL)
    23162316                *ap->a_eofflag = 0;
    2317         if (vp->v_type != VDIR)
     2317        if (vp->v_type != VDIR) 
    23182318                return(EPERM);
    23192319
     
    23592359                        *ap->a_eofflag = 1;
    23602360        }
    2361 
     2361       
    23622362        /* Add the partial DIRBLKSIZ (left) back in. */
    23632363        uio->uio_resid += left;
     
    23932393                ncl_dircookie_unlock(dnp);
    23942394        } else {
    2395                 ncl_dircookie_unlock(dnp);
     2395                ncl_dircookie_unlock(dnp);             
    23962396                return (NFSERR_BAD_COOKIE);
    23972397        }
     
    25112511        VREF(dvp);
    25122512
    2513         /*
     2513        /* 
    25142514         * Fudge together a funny name.
    2515          * Changing the format of the funny name to accommodate more
     2515         * Changing the format of the funny name to accommodate more 
    25162516         * sillynames per directory.
    2517          * The name is now changed to .nfs.<ticks>.<pid>.4, where ticks is
     2517         * The name is now changed to .nfs.<ticks>.<pid>.4, where ticks is 
    25182518         * CPU ticks since boot.
    25192519         */
     
    25252525        lticks = (unsigned int)ticks;
    25262526        for ( ; ; ) {
    2527                 sp->s_namlen = sprintf(sp->s_name,
    2528                                        ".nfs.%08x.%04x4.4", lticks,
     2527                sp->s_namlen = sprintf(sp->s_name, 
     2528                                       ".nfs.%08x.%04x4.4", lticks, 
    25292529                                       pid);
    25302530                if (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred,
     
    30623062                        np->n_flag |= NFSYNCWAIT;
    30633063                        error = newnfs_msleep(td, &np->n_directio_asyncwr,
    3064                             &np->n_mtx, slpflag | (PRIBIO + 1),
     3064                            &np->n_mtx, slpflag | (PRIBIO + 1), 
    30653065                            "nfsfsync", 0);
    30663066                        if (error) {
    30673067                                if (newnfs_sigintr(nmp, td)) {
    30683068                                        NFSUNLOCKNODE(np);
    3069                                         error = EINTR;
     3069                                        error = EINTR; 
    30703070                                        goto done;
    30713071                                }
     
    31273127        int ret, error = EOPNOTSUPP;
    31283128        u_quad_t size;
    3129 
     3129       
    31303130        ret = NFSVOPLOCK(vp, LK_SHARED);
    31313131        if (ret != 0)
     
    32623262        u_quad_t size;
    32633263        int error;
    3264 
     3264       
    32653265        if (NFS_ISV4(vp))
    32663266                return (EOPNOTSUPP);
     
    34103410        NFSUNLOCKNODE(np);
    34113411        error = fifo_specops.vop_read(ap);
    3412         return error;
     3412        return error;   
    34133413#else /* __rtems__ */
    34143414        return (EINVAL);
     
    36473647        return (error);
    36483648}
     3649
  • freebsd/sys/kern/kern_prot.c

    r84d15c2 r6e4709b  
    18531853crhold(struct ucred *cr)
    18541854{
     1855
    18551856#ifdef __rtems__
    18561857        if (cr == NULL)
  • freebsd/sys/kern/vfs_bio.c

    r84d15c2 r6e4709b  
    29682968#ifndef __rtems__
    29692969                pmap_qremove(trunc_page((vm_offset_t)bp->b_data), bp->b_npages);
    2970 #endif /* _-rtems__ */
     2970#endif /* __rtems__ */
    29712971        } else
    29722972                BUF_CHECK_UNMAPPED(bp);
  • freebsd/sys/kern/vfs_export.c

    r84d15c2 r6e4709b  
    539539        return (0);
    540540}
     541
  • freebsd/sys/kern/vfs_syscalls.c

    r84d15c2 r6e4709b  
    35373537            &cap_renameat_source_rights, td);
    35383538#else
    3539 
    35403539        NDINIT_ATRIGHTS(&fromnd, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1,
    35413540            pathseg, old, oldfd,
  • freebsd/sys/kern/vfs_vnops.c

    r84d15c2 r6e4709b  
    12531253{
    12541254#ifndef __rtems__
    1255         return (EFAULT);
    12561255        struct uio transp_uio;
    12571256        struct iovec transp_iov[1];
  • freebsd/sys/nfs/nfs_nfssvc.c

    r84d15c2 r6e4709b  
    162162/* So that loader and kldload(2) can find us, wherever we are.. */
    163163MODULE_VERSION(nfssvc, 1);
     164
  • freebsd/sys/rpc/svc.c

    r84d15c2 r6e4709b  
    13801380        pool->sp_proc = NULL;
    13811381#endif /* __rtems__ */
    1382 
    13831382        /* Choose group count based on number of threads and CPUs. */
    13841383        pool->sp_groupcount = max(1, min(SVC_MAXGROUPS,
  • freebsd/sys/rpc/svc_auth.c

    r84d15c2 r6e4709b  
    200200        }
    201201}
     202
Note: See TracChangeset for help on using the changeset viewer.