Commit Graph

117 Commits

Author SHA1 Message Date
lukem cd13721ca0 add RCSIDs 2001-11-10 13:22:20 +00:00
simonb 9b90ed2100 Remove some variables that are set but never used. 2001-11-06 07:18:14 +00:00
augustss 069ab256ae Don't generate an error if setting the gid/uid doesn't actually change
the gid/uid.  Among other things, this eliminates tons of warnings when
unpacking a tar file in an msdos fs.
2001-11-03 23:49:58 +00:00
chs da3f862846 typo in previous. 2001-09-22 22:20:00 +00:00
chs 5148b779c3 check early for reads past EOF. 2001-09-22 22:14:29 +00:00
chs 64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
wiz 251b3464be heirarchy -> hierarchy 2001-08-24 10:24:45 +00:00
assar cb2d5b58af remove support for creating files and directories from msdosfs_mknod 2001-07-19 19:12:33 +00:00
wiz 2a8c778f1b retrieve, not retreive 2001-06-12 14:59:27 +00:00
chs 45701591c6 add a genfs_mmap() and change all of the disk-based filesystems
to implement VOP_MMAP() with the genfs version, in preparation for
actually using this VOP.
2001-05-28 02:50:51 +00:00
chs 060e70db41 min() -> MIN(), max() -> MAX().
fixes more problems with file offsets > 4GB.
2001-02-27 04:37:44 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
chs aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
thorpej 7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
thorpej a07f6460c8 MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-03 00:54:23 +00:00
jdolecek 057458abac msdosfs_getattr(): do not report archived files (those with ATTR_ARCHIVE unset)
as having flag SF_ARCHIVED on; this is wrong for directories, which don't
have any mode flags on msdosfs, so it's always treated as archived,
which leads to problems described in pr #8439. The semantics of the
archive flag differs between Unix and msdos/windoze, so it's better
to not set the flag at all even for regular files, to avoid surprises.

This fixes bin/8439 by Thomas Klausner.
2000-07-30 20:16:48 +00:00
jdolecek ee0bf49189 msdosfs_setattr(): silently ignore uid/gid changes, instead
of returning EINVAL
This fixes bin/9990 by Thomas Klausner.
2000-07-25 22:15:00 +00:00
jdolecek 61253f1dc8 msdosfs_rename(): fix too many vrele()'s of fdvp in some error cases;
bug and fix found on OpenBSD, though the fix is implemented very
differently here - we avoid changing correct code and only touch
what needs touching

This solves kern/10312 by Martin J. Laubach.
2000-07-25 20:56:10 +00:00
jdolecek b0fb24279c change the lf_advlock() arguments from
int     lf_advlock __P((struct lockf **,
           off_t, caddr_t, int, struct flock *, int));
to

int     lf_advlock __P((struct vop_advlock_args *, struct lockf **, off_t));

This matches common usage and is also compatible with similar change
in FreeBSD (though they use u_quad_t as last arg).
2000-07-22 15:26:11 +00:00
mrg bcc4078e32 remove include of <vm/vm.h> 2000-06-28 02:49:15 +00:00
perseant f0728fdce1 Change the sementics of the last parameter from a boolean ("waitfor") to
a set of flags ("flags").  Two flags are defined, UPDATE_WAIT and
UPDATE_DIROP.

Under the old semantics, VOP_UPDATE would block if waitfor were set,
under the assumption that directory operations should be done
synchronously.  At least LFS and FFS+softdep do not make this
assumption; FFS+softdep got around the problem by enclosing all relevant
calls to VOP_UPDATE in a "if(!DOINGSOFTDEP(vp))", while LFS simply
ignored waitfor, one of the reasons why NFS-serving an LFS filesystem
did not work properly.

Under the new semantics, the UPDATE_DIROP flag is a hint to the
fs-specific update routine that the call comes from a dirop routine, and
should be wait for, or not, accordingly.

Closes PR#8996.
2000-05-13 23:43:06 +00:00
jdolecek 40d9f8a709 msdosfs_read(): avoid integer overflow for files > 2GB, when
difference between current read position and file size
	is bigger than 2GB

This fixes problem first noted in FreeBSD PR#15639 and sent
by Martin J. Laubach in kern/9046, though the implementation
differs a bit.
2000-04-22 22:45:37 +00:00
augustss f0f9fcbe61 Remove register declarations. 2000-03-30 12:23:20 +00:00
jdolecek 07fd899a7f Add new CLUST_END and use it as parameter to pcbmap() when searching
for end cluster, instead of explicitly passing 0xffff. This fixes potential
problem for FAT32, where cluster number may be legally bigger than 0xffff.

Also change clusteralloc() so that fillwith is not explicitly passed by caller
anymore (there is no need to use anything other than CLUST_EOFE).

Reviewed by: Wolfgang Solfrank
2000-03-27 17:40:26 +00:00
jdolecek 1d246008e0 Support async option by using delayed writes for metadata when mounted
with async. This increases the speed of my extract-archive test by about
20% on floppy, 10% on ZIP. "You've got the rope."
2000-03-27 09:44:45 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
jdolecek 88a4a819b8 When renaming a file, make sure apporpriate vnode cache entry is
purged if a file system entry is removed. Fixes part of kern/8037.

Reviewed by: Wolfgang Solfrank
Tested by: jdolecek
2000-02-01 21:33:57 +00:00
jdolecek 0e45514ac9 make compilable with MSDOSFS_DEBUG (adapt to usecount & writecount size change) 2000-02-01 10:33:18 +00:00
fvdl 0b1963121a Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O
1999-11-15 18:49:07 +00:00
jdolecek fe54414362 msdosfs_readdir(): set iovec offset correctly so that some long filename
entries won't be ignored when contents of the directory don't
fit in user buffer all at once.

Fixes kern/4492 by Rick Byers <rickb@iaw.on.ca>.
1999-11-04 23:08:57 +00:00
itohy 5de5ad21a2 Revoke revoke(2) bug. 1999-08-19 03:42:23 +00:00
jdolecek 6d72115a23 msdosfs_access(): initialize mode to ap->a_mode instead of 0. Fixes PR 7619.
The bug has been accidentaly introduced in revision 1.56.
msdosfs_setattr(): do ROFS checks as appropriate; while here optimize
	to only call deupdat() if there actually has been any change

Tested by: jdolecek
Rewieved by: wrstuden
1999-08-16 07:43:12 +00:00
wrstuden 0833711f66 Modify msdosfs_getattr() so that it will report archived files (ATTR_ARCHIVE
cleared) as mode S_ARCH1 in addition to having flags SF_ARCHIVED.
1999-08-03 22:02:21 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
cgd 16db153ba2 fix MSDOSFS_DEBUG printf arg type 1999-07-26 00:14:27 +00:00
wrstuden 379a26972f Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.
1999-07-08 01:05:58 +00:00
tron a602deb000 Silently ignore attributes modifications on directories. Fixes
PR kern/7630 by Markus Kurek.
1999-05-24 23:01:13 +00:00
abs 609ddc8c40 Remove spurious call to de_bn2cn(). A "cluster" in MSDOSFS is already
equivalent to a "block" is in FFS. Fixes vnds on MSDOSFS, and should
eliminate a 'getblk: block size invariant failed' panic.
Directly from PR7380 <elric@imrryr.org>.
1999-04-21 17:13:22 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
kleink 9ee75a4fcc Add _PC_FILESIZEBITS to pathconf vnop. 1999-03-22 19:21:07 +00:00
mycroft 86ed73efb4 Permit the access and modify time pointers passed to VOP_UPDATE to be null,
meaning the current time.
1999-03-05 20:47:06 +00:00
ws c6b24f68f0 Set the tooffset after renaming even if in root directory. 1998-09-21 15:17:42 +00:00
matthias 574106c52b create miscfs/genfs/genfs_vnops.c:genfs_enoioctl and make all the other
filesystems use it instead of a private version.
1998-08-10 08:11:10 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
kleink 12a866151b Recognize _PC_SYNC_IO. 1998-08-03 14:19:57 +00:00
kleink 933111f98f Implement support for IEEE Std 1003.1b-1993 synchronous I/O:
* in the read vnode operator, check for IO_SYNC being set in the ioflag and
  synchronously update the file's meta-data if appropriate.
* in the write vnode operator, update the appropriate checks for IO_SYNC being
  set in the ioflag to reflect that IO_DSYNC is now inclusive-or'ed into
  IO_SYNC, and require all IO_SYNC bits to be set for operations defined by
  synchronized I/O file integrity completion but not by synchronized I/O data
  integrity completion.
1998-08-02 18:57:23 +00:00
fvdl ebe551c3b3 Guess the number of needed cookies in a better way, and check for
overflow of the cookie array. Pointed out by Wolfgang Solfrank.
1998-04-21 09:37:23 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mrg dec29037df make these compile. 1998-02-12 10:12:55 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +00:00