perry
bcfcddbac1
nuke trailing whitespace
2005-02-26 22:31:44 +00:00
yamt
12ee5f9c3a
nfs_namei: return EACCES for empty filenames as rfc1813 says.
2005-01-28 10:12:23 +00:00
yamt
2520660990
nfs_clearcommit: don't attempt to clear commit info (n_pushlo, etc)
...
unless the vnode is of VREG. union members used to keep commit info
are used for other purposes in the case of !VREG.
2005-01-28 10:11:31 +00:00
yamt
f1661c75d1
- simplify nfs_bio.c rev.1.126
...
- add an assertion.
no functional changes.
2005-01-27 12:46:42 +00:00
yamt
cf56f2b873
keep directory eof cache when inactivating vnode
...
because there's no reason to throw it away.
(fix an unintended side effect of nfs_subs.c rev.1.144.)
2005-01-27 11:33:26 +00:00
yamt
407a63dc34
nfs_bioread:
...
- if a buffer is still empty after successful nfs_doio, it implies EOF.
- don't cache blocks beyond EOF.
2005-01-27 11:29:25 +00:00
yamt
f6e331ee7c
nfs_readdirrpc, nfs_readdirplusrpc:
...
avoid infinite loops when getting readdir response without
any entries or eof. PR/28971.
2005-01-26 10:33:54 +00:00
yamt
72d6e88acf
handle a really empty directory, which doesn't have even the dot entry.
2005-01-26 10:30:58 +00:00
yamt
a7b5d8f567
nfs_check_wccdata: comment.
2005-01-25 12:20:32 +00:00
yamt
de3e729ad9
s/time/mono_time/ for n_attrstamp and n_accstamp. (parts of) PR/25641.
2005-01-21 14:31:29 +00:00
yamt
fc08656a20
implement inaccurate mtime/ctime detection.
...
namely, if mtime or ctime are same between pre_op_attr and post_op_attr
when we expected them to be changed, don't trust the server.
2005-01-19 16:22:19 +00:00
chs
8975a0856f
adjust the UBC mapping code to support non-vnode uvm_objects.
...
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway. there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
2005-01-09 16:42:43 +00:00
yamt
e5bd47dc3c
invalidate cache if filesize is changed besides our activity
...
because it means that we're out of sync with the server.
2005-01-09 01:32:32 +00:00
yamt
68c071389c
nfs_lookup: check n_nctime for positive entries as well to improve
...
cache consistency.
2005-01-08 03:12:30 +00:00
yamt
f80647ef1e
nfs_loadattrcache: invalidate access cache when ctime is changed.
2005-01-06 11:52:44 +00:00
thorpej
1c95472d01
Add the system call and VFS infrastructure for file system extended
...
attributes.
From FreeBSD.
2005-01-02 16:08:28 +00:00
yamt
f4221aaaf6
revive spec vop_bwrite as it's needed for block devices.
...
PR/28684 from Jukka Salmi.
2004-12-17 03:31:20 +00:00
yamt
ee344f939f
redirect some VOPs which shouldn't be used for nfs
...
to genfs_badop (ie. panic).
2004-12-14 09:15:23 +00:00
yamt
e3ed5def47
- centerize code to invalidate stale cache.
...
- don't ignore errors when invalidating buffers in nfs_open.
2004-12-14 09:13:13 +00:00
bouyer
0f82537ed4
The macro used for static server address is NFS_BOOTSTATIC_SERVADDR, not
...
NFS_BOOTSTATIC_SADDR. From Xen source distribution.
XXX NFS_BOOTSTATIC* doesn't seem to be documented anywhere ...
2004-12-12 16:24:14 +00:00
yamt
8cd5f554ba
nfsrv_commit: make cnt unsigned so that very large commit requests can be
...
handled properly.
2004-12-09 02:18:45 +00:00
yamt
2bc7120ab8
when calling create-type VOP, make sure that va_mode is set
...
even when a client doesn't specify it.
(most filesystems get confused if va_mode is VNOVAL.)
2004-12-09 01:48:22 +00:00
yamt
f11ea18093
nfsrv_read: fall back to copying when fail to loan pages.
...
(i forgot to commit this with uvm_loan.c rev.1.51.)
2004-12-04 08:07:52 +00:00
yamt
a9fa9f0745
since daddr_t is 64-bit these days, simply use nfs directory cookies
...
as buffer cache indexes. regress/sys/fs/getdents is now supposed to work.
fix PR/27112.
2004-10-26 04:34:46 +00:00
yamt
20a0770136
remove #if 0'ed out definition of VA_EXCLUSIVE.
2004-10-26 00:58:54 +00:00
yamt
3d250e0476
remove an unused macro, NMOD.
2004-10-26 00:27:07 +00:00
yamt
94223b8ff0
nfs_enterdircache: initialize dc_flags of a newly allocated dircache entry.
...
provided by Greg Oster.
2004-10-03 10:51:28 +00:00
yamt
31c025d90c
nfs_readdirrpc, nfs_readdirplusrpc:
...
don't expose kernel garbage data to userland.
2004-10-03 10:17:33 +00:00
yamt
6b8cd53946
nfs_writerpc: fix PHOLD leak on error.
2004-10-01 01:08:01 +00:00
yamt
77b63b73b8
g/c NFSMINOFF, which is unused and identical with MRESETDATA.
2004-09-29 11:24:28 +00:00
yamt
ac65f2420a
nfs_readdirplusrpc: fix spurious EBUSYs.
2004-09-23 10:46:44 +00:00
skrll
f7155e40f6
There's no need to pass a proc value when using UIO_SYSSPACE with
...
vn_rdwr(9) and uiomove(9).
OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
yamt
e11d5e7c46
fix access-after-free bugs in dircache code by refcounting nfsdircache.
...
PR/26864.
2004-09-15 09:50:56 +00:00
yamt
4fd5a025bf
nfs_request: a workaround for servers doing "maproot".
...
for i/o requests which are expected not to fail due to permission
to mimic unix file open semantics (READ, WRITE, COMMIT),
try two credentials. namely, the file owner's one and open time one.
remember which credential worked in per-file basis and try it first
next time to minimize number of retries.
ideas from Chuck Silvers. PR/23716 and PR/24987.
2004-08-24 20:09:44 +00:00
yamt
bee0b74932
remove a "proc botch" debug printf. ok'ed by Jonathan Stone.
2004-08-18 23:44:47 +00:00
mycroft
45a21b76f0
Fixing age old cruft:
...
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
d_type fields(!), add a new internal flag, IMNT_DTYPE.
Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
FS-specific checks littered throughout the code. This may be used later to
make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
to implementation issues.
Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86
Clean up some crappy pointer frobnication.
2004-08-15 07:19:54 +00:00
yamt
7653f67dd6
nfs_readdirplusrpc: fix a very long-standing cache corruption bug.
...
in the case of !bigenough, don't fill d_type or dnlc with bogus data.
2004-07-20 22:02:21 +00:00
yamt
62190652f1
revert nfs_vnops.c rev.1.189.
...
it's no longer needed because cache_enter() has been changed to handle
duplicated entries by itsself.
2004-07-20 22:00:29 +00:00
yamt
e9bca9a46e
nfs_doio_read: on short read, zero out the rest of the buffer unconditionally.
...
we can't rely on n_size here because it can be changed under us.
2004-07-18 07:43:00 +00:00
yamt
1c77f27a7a
nfs_commit: use NAC_NOTRUNC when loading an attribute
...
as we're called holding pages locked.
2004-07-18 07:41:42 +00:00
yamt
72afe94686
nfs_fsinfo: when changing rsize/wsize,
...
keep mnt_fs_bshift in-sync. otherwise genfs_getpages behaves badly.
2004-07-12 12:40:30 +00:00
yamt
0f5d997ee9
- include opt_inet.h for INET.
...
- catchup to in_ifaddr -> in_ifaddrhead rename.
XXX the address on the top of in_ifaddrhead is likely 127.0.0.1.
using it to construct the verifier doesn't make much sense.
maybe it's better to use some uuid or ip_randomid-like method.
2004-07-08 11:21:35 +00:00
yamt
fad58613ba
nfs_create: after an exclusive create rpc, make sure to update
...
timestamps, which were likely used to store the verifier.
reported by Mark Davies. PR/26200
2004-07-08 11:12:14 +00:00
pk
a7c40722d8
Call inittodr() from main(). Let file system code set the recorded `last
...
update' time (if any) through the new function setrootfstime().
2004-07-05 07:28:45 +00:00
yamt
21ae434eb2
nfs_lookup: use cache_lookup_raw() so that:
...
- "intrusive" dirops now have more chances to get benefits from dnlc.
- fixes a deadlock due to vnode locking order inversion.
nfs_create and others: purge stale dnlc entries
as nfs_lookup() no longer does it automatically.
2004-06-27 08:53:03 +00:00
jonathan
5249b5a2a5
Rename MBUFTRACE helper function m_claim() to m_claimm(),
...
for consistency with M_FREE() and m_freem(). Affected files:
sys/mbuf.h
kern/uipc_socket2.c
kern/uipc_mbuf.c
net/if_ethersubr.c
netatalk/ddp_input.c
nfs/nfs_socket.c
2004-06-24 04:15:50 +00:00
yamt
3e209dd94a
nfs_lookup: maintain PDIRUNLOCK even in the case of success to make
...
layered filesystems happy.
2004-06-16 23:55:30 +00:00
yamt
ad338b9eff
nfs_searchdircache: fix a null dereference in the case that
...
offset!=0 and dircache hasn't been initialized yet.
2004-06-14 12:28:35 +00:00
yamt
e3b58482fb
nfs_doio_read: use np->n_rcred instead of curproc->p_ucred for VDIR.
...
XXX maybe it's better to use a cred passed by VOP_READDIR.
2004-06-11 12:26:31 +00:00
yamt
03db65e256
make sure that nfssvc sockets are zapped before being freed.
2004-06-10 12:59:57 +00:00