Commit Graph

637 Commits

Author SHA1 Message Date
yamt 4811ccb6a0 correct a KASSERT. 2003-05-16 17:16:05 +00:00
yamt 19bdd5d1e5 acquire vmobjlock when touch pg->flags. 2003-05-15 14:34:06 +00:00
yamt de31ef25cd simple lock for nfs iod. 2003-05-07 16:18:53 +00:00
yamt a4ae58105f indent. 2003-05-07 16:18:17 +00:00
yamt 8a4e0a8444 use hashdone to free hashinit'ed memory. 2003-05-07 13:16:35 +00:00
yamt c573c77372 - indent.
- fix a comment typo (mus -> must)
- remove an unneeded caddr_t cast.
2003-05-07 13:10:44 +00:00
yamt 469a401cf5 remove nfsm_srvstrsiz as it's no longer used. 2003-05-06 13:52:36 +00:00
yamt 6f30440f90 keep things not needed by userland in #ifdef _KERNEL.
(e.g. prototypes for in-kernel functions)
2003-05-05 13:21:00 +00:00
yamt 777190167d fix handling of the case that readsize == 0. 2003-05-04 11:40:22 +00:00
yamt ca9e55bd66 use uvm page loanout mechanism for nfsd READ procedure processing.
reviewed by Frank van der Linden and Chuck Silvers.
tested by Wojciech Puchar.
2003-05-03 18:36:26 +00:00
yamt 92a566bbbd tweak nfsm_adj to pay attention to read only mbufs. 2003-05-03 18:07:42 +00:00
yamt 3698fcc62e - check page's offset in the object as well. (pointed by Chuck Silvers.)
- remove false assertion.
2003-05-03 17:27:20 +00:00
yamt 455e4333eb - if writerpc ends with a stable result, no need to commit them anymore.
- add comments.
2003-05-03 16:46:39 +00:00
yamt a74480a1a6 more comment. 2003-05-03 16:35:22 +00:00
yamt 8c5ba805e5 better handling of write verifier change. 2003-05-03 16:28:57 +00:00
drochner 9e95dcb696 Change some subordinate functions to take a "struct nfsnode" argument
instead of "struct vnode". This saves a number of pointer dereferences;
it sums up to about half a kB for me. And it paves the way for future
fixes.
While cleaning up, eliminate a write-only member of "struct nfsreq"
and a pointless assignment in the NFS_V2_ONLY case.
2003-04-24 21:21:04 +00:00
yamt 8178e19cb6 fix a use of an uninitialized variable. 2003-04-18 15:19:02 +00:00
christos 80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
yamt 503590c138 sync a comment with reality. 2003-04-16 14:51:55 +00:00
yamt 0012a58814 fix indent. 2003-04-15 13:51:11 +00:00
yamt 63de87c34b remove line-wrapping that is no longer needed. 2003-04-15 13:48:40 +00:00
yamt dcf4c9093f fix a typo in the previous. 2003-04-12 14:41:28 +00:00
yamt 1505b097fa set b_resid correctly. 2003-04-12 14:38:57 +00:00
yamt 9ad479d8c2 split nfs_doio to nfs_doio_{phys,read,write} to avoid too deep indents. 2003-04-12 14:26:58 +00:00
yamt 043759a005 - do FILESYNC writes if we're freeing the page or the page doesn't
belong to us.  otherwise, data will be lost on server crash.
- use b_bcount instead of b_bufsize to determine
  how many pages we should deal with.

based on a patch from Chuck Silvers.
discussed on tech-kern.
2003-04-12 06:53:09 +00:00
yamt 65e3d14a8a rename a very confusing variable name.
(must_commit -> stalewriteverf)
2003-04-09 14:30:30 +00:00
yamt b90af31ce6 when commit failed and fall to write, re-set 'off' and 'cnt'
because it can be changed in 'needcommit' path.
2003-04-09 14:27:58 +00:00
yamt 2cca2b5641 update a comment to follow the previous change. 2003-04-09 14:24:32 +00:00
yamt 9b96b4ab78 make per-iod datas together. 2003-04-09 14:22:33 +00:00
yamt 0dff798bde rename nm_verf to nm_writeverf because it's confusing with nm_verf{str,len}. 2003-04-09 14:21:24 +00:00
yamt d16c4c058f return rtmax bytes if we get READ requests larger than rtmax. 2003-04-03 15:19:12 +00:00
yamt 8cc1df8614 use m_copydata and m_split instead of similar inlined ones. 2003-04-03 15:14:51 +00:00
yamt a14f444335 use queue manipulation macros. 2003-04-02 15:14:19 +00:00
yamt 4f8b9f357f add an assertion. 2003-04-01 11:59:03 +00:00
yamt 1f94d18621 rename fvdl_debug to NFS_DEBUG_COMMIT.
ok'ed by fvdl.
2003-03-31 14:47:03 +00:00
yamt 0d3c7b7285 adapt to file interlock. 2003-03-31 14:43:59 +00:00
yamt 9fe1125599 reply FSINFO rtmax and wtmax for DGRAM properly. 2003-03-28 15:24:58 +00:00
yamt b44d2a5667 i forgot to check this in with the previous (reply ENAMETOOLONG properly). 2003-03-28 15:13:35 +00:00
yamt 2d45e41adb reply ENAMETOOLONG properly instead of discarding request as BADRPC.
my own PR20791.
2003-03-28 13:05:47 +00:00
yamt 8a890efe2b if rsize was explicitly specified by mount_nfs,
prefer it to rtpref from nfsd.  the same for wsize and wtpref.

ok'ed by fvdl.
2003-03-28 12:33:17 +00:00
jdolecek 7337bd06a3 nfs_kqfilter(): add the knote to v_klist only if guaranteed to return success 2003-03-27 19:58:26 +00:00
jdolecek c2793620f8 fix typo in comment 2003-02-27 09:01:09 +00:00
matt d283628c8e Fix typo. 2003-02-26 07:33:57 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
jdolecek f8595b9782 add missing dot in comment 2003-02-18 14:37:08 +00:00
perseant b397c875ae Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.
2003-02-17 23:48:08 +00:00
drochner 7707c16daa Don't remove the nfsnode from the hash chain in nfs_inactive.
It will never get back... it will not be found in nfs_nget, a new
nfsnode+vnode is allocated instead, which causes a node leak, and
also makes the mountpointness of the vnode to be forgotten, breaking
filesystem crossing lookups through this vnode.
2003-02-15 18:00:25 +00:00
fvdl 2be3d82860 Move purging the dircache and removing a vnode from the nqnfs timer queue
into nfs_inactive, this is a better place for it.

This doesn't actually solve the actual problem, which appears to be a race
condition with unmounting and vnode recycling somewhere, but it fixes
it in the sense that nfs_reclaim will not reference a bad v_mount anymore.
2003-02-12 14:50:52 +00:00
christos 49d7e33c00 move the MALLOC decl for DIROFFS to nfs_subs.c 2003-02-10 17:31:01 +00:00
christos e4d4f01d2b protect <sys/mallocvar.h> ifdef _KERNEL 2003-02-02 02:34:53 +00:00