Changeset 6e4709b in rtems-libbsd
- Timestamp:
- 01/05/23 16:42:48 (3 months ago)
- 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)
- Location:
- freebsd/sys
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd/sys/fs/nfs/nfs_commonkrpc.c
r84d15c2 r6e4709b 220 220 else 221 221 nconf = getnetconfigent("tcp6"); 222 222 223 223 pktscale = nfs_bufpackets; 224 224 if (pktscale < 2) … … 238 238 so = NULL; 239 239 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, 241 241 nrp->nr_soproto, td->td_ucred, td); 242 242 if (error) { … … 392 392 * For UDP, there are 2 timeouts: 393 393 * - 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 395 395 * socket and xid. This is what you normally want to do, 396 396 * since NFS servers depend on "same xid" for their … … 742 742 uint32_t probe_id; 743 743 int probe_procnum; 744 744 745 745 if (nd->nd_flag & ND_NFSV4) { 746 746 probe_id = … … 1144 1144 j != NFSERR_BADSTATEID && 1145 1145 j != NFSERR_BADSEQID && 1146 j != NFSERR_BADXDR && 1146 j != NFSERR_BADXDR && 1147 1147 j != NFSERR_RESOURCE && 1148 j != NFSERR_NOFILEHANDLE))) 1148 j != NFSERR_NOFILEHANDLE))) 1149 1149 nd->nd_flag |= ND_INCRSEQID; 1150 1150 } … … 1265 1265 { 1266 1266 int i; 1267 1267 1268 1268 for (i = 0 ; i < nitems(newnfs_sig_set); i++) 1269 1269 if (SIGISMEMBER(set, newnfs_sig_set[i])) … … 1271 1271 return (0); 1272 1272 } 1273 1273 1274 1274 /* 1275 1275 * The set/restore sigmask functions are used to (temporarily) overwrite … … 1284 1284 int i; 1285 1285 struct proc *p; 1286 1286 1287 1287 SIGFILLSET(newset); 1288 1288 if (td == NULL) … … 1350 1350 struct proc *p; 1351 1351 sigset_t tmpset; 1352 1352 1353 1353 /* Terminate all requests while attempting a forced unmount. */ 1354 1354 if (NFSCL_FORCEDISM(nmp->nm_mountp)) … … 1434 1434 } else 1435 1435 mtx_unlock(&nmp->nm_mtx); 1436 1436 1437 1437 mtx_lock(&nmp->nm_mtx); 1438 1438 if ((flags & NFSSTA_LOCKTIMEO) && (nmp->nm_state & NFSSTA_LOCKTIMEO)) { … … 1444 1444 mtx_unlock(&nmp->nm_mtx); 1445 1445 } 1446 -
freebsd/sys/fs/nfs/nfs_commonport.c
r84d15c2 r6e4709b 819 819 MODULE_DEPEND(nfscommon, nfssvc, 1, 1, 1); 820 820 MODULE_DEPEND(nfscommon, krpc, 1, 1, 1); 821 -
freebsd/sys/fs/nfs/nfs_commonsubs.c
r84d15c2 r6e4709b 4771 4771 return (ds); 4772 4772 } 4773 -
freebsd/sys/fs/nfsclient/nfs.h
r84d15c2 r6e4709b 97 97 int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *); 98 98 int ncl_vinvalbuf(struct vnode *, int, struct thread *, int); 99 int ncl_asyncio(struct 100 nfsmount *, struct buf *, struct ucred *, 99 int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *, 101 100 struct thread *); 102 101 int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *, -
freebsd/sys/fs/nfsclient/nfs_clbio.c
r84d15c2 r6e4709b 1696 1696 #else /* __rtems__ */ 1697 1697 panic("nfsclient: text file modification: want to killproc"); 1698 #endif /* _ -rtems__ */1698 #endif /* __rtems__ */ 1699 1699 } else 1700 1700 NFSUNLOCKNODE(np); … … 1924 1924 return(error); 1925 1925 } 1926 -
freebsd/sys/fs/nfsclient/nfs_clkrpc.c
r84d15c2 r6e4709b 299 299 } 300 300 } 301 -
freebsd/sys/fs/nfsclient/nfs_clport.c
r84d15c2 r6e4709b 1453 1453 MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); 1454 1454 MODULE_DEPEND(nfscl, nfslock, 1, 1, 1); 1455 -
freebsd/sys/fs/nfsclient/nfs_clrpcops.c
r84d15c2 r6e4709b 7741 7741 return (laystat); 7742 7742 } 7743 -
freebsd/sys/fs/nfsclient/nfs_clstate.c
r84d15c2 r6e4709b 5458 5458 return (0); 5459 5459 } 5460 -
freebsd/sys/fs/nfsclient/nfs_clsubs.c
r84d15c2 r6e4709b 395 395 return (0); 396 396 } 397 -
freebsd/sys/fs/nfsclient/nfs_clvfsops.c
r84d15c2 r6e4709b 2061 2061 nfscl_printoptval(nmp, nmp->nm_retry, ",retrans", &buf, &blen); 2062 2062 } 2063 -
freebsd/sys/fs/nfsclient/nfs_clvnops.c
r84d15c2 r6e4709b 818 818 error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0); 819 819 /* np->n_flag &= ~NMODIFIED; */ 820 } else if (NFS_ISV4(vp)) { 820 } else if (NFS_ISV4(vp)) { 821 821 if (nfscl_mustflush(vp) != 0) { 822 822 int cm = newnfs_commit_on_close ? 1 : 0; … … 834 834 NFSLOCKNODE(np); 835 835 } 836 /* 836 /* 837 837 * Invalidate the attribute cache in all cases. 838 838 * 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 840 840 * otw attr fetch, but this is safe. 841 841 * --> A user found that their RPC count dropped by 20% when … … 892 892 if (newnfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { 893 893 NFSLOCKNODE(np); 894 KASSERT((np->n_directio_opens > 0), 894 KASSERT((np->n_directio_opens > 0), 895 895 ("nfs_close: unexpectedly value (0) of n_directio_opens\n")); 896 896 np->n_directio_opens--; … … 1022 1022 vap->va_uid == (uid_t)VNOVAL && 1023 1023 vap->va_gid == (gid_t)VNOVAL) 1024 return (0); 1024 return (0); 1025 1025 vap->va_size = VNOVAL; 1026 1026 break; … … 1073 1073 } else { 1074 1074 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) && 1076 1076 (np->n_flag & NMODIFIED) && vp->v_type == VREG) { 1077 1077 NFSUNLOCKNODE(np); … … 1147 1147 struct vattr vattr; 1148 1148 struct timespec nctime; 1149 1149 1150 1150 *vpp = NULLVP; 1151 1151 if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) && … … 1224 1224 if (dvp != newvp) 1225 1225 vput(newvp); 1226 else 1226 else 1227 1227 vrele(newvp); 1228 1228 *vpp = NULLVP; … … 1380 1380 0, 1); 1381 1381 else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && 1382 !(np->n_flag & NMODIFIED)) { 1382 !(np->n_flag & NMODIFIED)) { 1383 1383 /* 1384 1384 * Flush the attribute cache when opening a … … 1712 1712 vap->va_uid = (uid_t)VNOVAL; 1713 1713 vap->va_gid = (uid_t)VNOVAL; 1714 error = nfsrpc_setattr(newvp, vap, NULL, 1714 error = nfsrpc_setattr(newvp, vap, NULL, 1715 1715 cnp->cn_cred, cnp->cn_thread, &nfsva, 1716 1716 &attrflag, NULL); … … 1900 1900 * ( as far as I can tell ) it flushes dirty buffers more 1901 1901 * often. 1902 * 1902 * 1903 1903 * Skip the rename operation if the fsync fails, this can happen 1904 1904 * due to the server's volume being full, when we pushed out data … … 2312 2312 int error = 0; 2313 2313 struct vattr vattr; 2314 2314 2315 2315 if (ap->a_eofflag != NULL) 2316 2316 *ap->a_eofflag = 0; 2317 if (vp->v_type != VDIR) 2317 if (vp->v_type != VDIR) 2318 2318 return(EPERM); 2319 2319 … … 2359 2359 *ap->a_eofflag = 1; 2360 2360 } 2361 2361 2362 2362 /* Add the partial DIRBLKSIZ (left) back in. */ 2363 2363 uio->uio_resid += left; … … 2393 2393 ncl_dircookie_unlock(dnp); 2394 2394 } else { 2395 ncl_dircookie_unlock(dnp); 2395 ncl_dircookie_unlock(dnp); 2396 2396 return (NFSERR_BAD_COOKIE); 2397 2397 } … … 2511 2511 VREF(dvp); 2512 2512 2513 /* 2513 /* 2514 2514 * 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 2516 2516 * 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 2518 2518 * CPU ticks since boot. 2519 2519 */ … … 2525 2525 lticks = (unsigned int)ticks; 2526 2526 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, 2529 2529 pid); 2530 2530 if (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred, … … 3062 3062 np->n_flag |= NFSYNCWAIT; 3063 3063 error = newnfs_msleep(td, &np->n_directio_asyncwr, 3064 &np->n_mtx, slpflag | (PRIBIO + 1), 3064 &np->n_mtx, slpflag | (PRIBIO + 1), 3065 3065 "nfsfsync", 0); 3066 3066 if (error) { 3067 3067 if (newnfs_sigintr(nmp, td)) { 3068 3068 NFSUNLOCKNODE(np); 3069 error = EINTR; 3069 error = EINTR; 3070 3070 goto done; 3071 3071 } … … 3127 3127 int ret, error = EOPNOTSUPP; 3128 3128 u_quad_t size; 3129 3129 3130 3130 ret = NFSVOPLOCK(vp, LK_SHARED); 3131 3131 if (ret != 0) … … 3262 3262 u_quad_t size; 3263 3263 int error; 3264 3264 3265 3265 if (NFS_ISV4(vp)) 3266 3266 return (EOPNOTSUPP); … … 3410 3410 NFSUNLOCKNODE(np); 3411 3411 error = fifo_specops.vop_read(ap); 3412 return error; 3412 return error; 3413 3413 #else /* __rtems__ */ 3414 3414 return (EINVAL); … … 3647 3647 return (error); 3648 3648 } 3649 -
freebsd/sys/kern/kern_prot.c
r84d15c2 r6e4709b 1853 1853 crhold(struct ucred *cr) 1854 1854 { 1855 1855 1856 #ifdef __rtems__ 1856 1857 if (cr == NULL) -
freebsd/sys/kern/vfs_bio.c
r84d15c2 r6e4709b 2968 2968 #ifndef __rtems__ 2969 2969 pmap_qremove(trunc_page((vm_offset_t)bp->b_data), bp->b_npages); 2970 #endif /* _ -rtems__ */2970 #endif /* __rtems__ */ 2971 2971 } else 2972 2972 BUF_CHECK_UNMAPPED(bp); -
freebsd/sys/kern/vfs_export.c
r84d15c2 r6e4709b 539 539 return (0); 540 540 } 541 -
freebsd/sys/kern/vfs_syscalls.c
r84d15c2 r6e4709b 3537 3537 &cap_renameat_source_rights, td); 3538 3538 #else 3539 3540 3539 NDINIT_ATRIGHTS(&fromnd, DELETE, WANTPARENT | SAVESTART | AUDITVNODE1, 3541 3540 pathseg, old, oldfd, -
freebsd/sys/kern/vfs_vnops.c
r84d15c2 r6e4709b 1253 1253 { 1254 1254 #ifndef __rtems__ 1255 return (EFAULT);1256 1255 struct uio transp_uio; 1257 1256 struct iovec transp_iov[1]; -
freebsd/sys/nfs/nfs_nfssvc.c
r84d15c2 r6e4709b 162 162 /* So that loader and kldload(2) can find us, wherever we are.. */ 163 163 MODULE_VERSION(nfssvc, 1); 164 -
freebsd/sys/rpc/svc.c
r84d15c2 r6e4709b 1380 1380 pool->sp_proc = NULL; 1381 1381 #endif /* __rtems__ */ 1382 1383 1382 /* Choose group count based on number of threads and CPUs. */ 1384 1383 pool->sp_groupcount = max(1, min(SVC_MAXGROUPS, -
freebsd/sys/rpc/svc_auth.c
r84d15c2 r6e4709b 200 200 } 201 201 } 202
Note: See TracChangeset
for help on using the changeset viewer.