Commit Graph

81 Commits

Author SHA1 Message Date
jdolecek 174534705d use DTYPE_VND (the one intended) rather than bogus DTYPE_VNODE
for the GEMDOS disklabel check
indent the if condition so that the intent is clearly visible
discussed with Leo Weppelman
2002-03-25 20:42:40 +00:00
jdolecek e971d6b60f msdosfs_mountfs(): drop some excessive braces in the GEMDOS-related section
no change in functionality
2002-03-24 16:30:11 +00:00
jdolecek 163a8c2246 make compilable with MSDOSFS_DEBUG (again), supply missing \n in
msdosfs_inactive() printf
2002-01-08 20:11:00 +00:00
augustss 7b38035ee9 Add some minimal validation of the fsinfo. 2001-12-22 19:45:54 +00:00
lukem cd13721ca0 add RCSIDs 2001-11-10 13:22:20 +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
chs adf5d360a7 add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
chs 3a5e4f901b in *_sync(), don't skip vnodes which have (potentially dirty) pages. 2000-12-10 19:36:31 +00:00
chs aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
fvdl db4108490a Adapt for VOP_FSYNC parameter change. 2000-09-19 22:01:59 +00:00
jdolecek 2deec9c018 add a comment regarding FATMIRROR bit usage and restructure the code
slighly to make the check more explicit
2000-04-03 18:12:12 +00:00
simonb f80823211a Delete redundant decl of rootvp - it's in <sys/systm.h>. 2000-03-30 02:27:35 +00:00
jdolecek 89015c4648 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
2000-03-16 18:08:17 +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
enami fee96e1746 Check if the type of device node isn't VBAD before touching v_specinfo. If
the device vnode is revoked, the field is NULL and touching it causes null
pointer derefercence.
1999-10-20 14:32:09 +00:00
wrstuden e682a080e9 In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().
1999-10-16 23:53:26 +00:00
wrstuden 976aedb7ac Adjust mountroot routines to vrele rootvp in case of mount error. Closes
PR 7977 by Neil Carson, <neil@brini.com>.
1999-07-17 01:08:28 +00:00
tron c8126918cb Fix too tight check for maximum supported partition size. Now partitions
upto 128GB (instead of 4GB) are allowed.
1999-03-07 13:57:20 +00:00
wrstuden 862a56e88b Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
thorpej 7cc905f5c8 Add some braces to make egcs happy (ambiguous else warning). 1998-08-18 06:27:01 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
jonathan d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
scottr 7171cca4b8 Protect various config(8)-generated files from inclusion while
building LKMs.  Fixes PR 5557.
1998-06-09 07:46:31 +00:00
scottr d48f258f90 Use the newly-defined opt_quota.h. 1998-06-08 04:27:50 +00:00
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej b5bf2ed6d0 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
ws 4e4c231c15 PR4393: additional fixes of format strings for unsigned parameters
PR4394: be more consistent with other MSDOSFS_DEBUG messages
PR4395: fix generation numbers as in the PR, and fix short name for e.g. x.aaaa
PR4396: easier fix then given in the PR
All PRs by Rick Byers.  Thanks Rick for pointing these out
1997-11-17 15:36:17 +00:00
christos ceedd58536 PR/4394: Rick Byers: MSDOSFS_DEBUG kernel panics during mount. 1997-11-16 21:50:10 +00:00
christos 96a8d9af7b PR/4393: Rick Byers: MSDOSFS_DEBUG kernel does not compile. 1997-11-16 21:47:27 +00:00
briggs aead314eea Use bcmp instead of memcmp since we haven't switched to using memcmp elsewhere
in the kernel.
1997-10-18 02:54:57 +00:00
ws 9c1b7cfa37 Add support for FAT32
Don't panic if renaming a file to itself
Don't try to keep access times, there is no place for them
While being here, fix some minor bugs with VFAT handling
1997-10-17 11:23:29 +00:00
christos 9c227f4705 Add msdosfs_mountroot; we still have a problem with locking by proc 0,
but it does not seem to affect things.
1997-07-28 23:41:04 +00:00
mycroft f14deb8a73 Need stat.h. 1997-05-08 16:53:06 +00:00
cgd 90688fce27 Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
1996-12-22 10:10:12 +00:00
christos 17f5b2a175 backout previous kprintf changes 1996-10-13 04:10:34 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
thorpej c761c7d3ca Shut up whining compiler so this will build on a SPARC again (-Wall). 1996-03-20 00:45:40 +00:00
ws f331e77b53 Deal correctly with boundary between 12 bit and 16 bit cluster numbers 1996-02-11 22:48:14 +00:00
christos 01b73223a6 msdog prototype changes 1996-02-09 19:13:39 +00:00
fvdl e1829fbf01 Fix error in previous change: don't use the local FS mount data before
it's actually allocated. Pass mount arguments to msdosfs_mountfs instead,
and use them (as in iso_mountfs for example).
1996-01-21 16:35:29 +00:00
leo 85ea3b1702 Instead of using '#ifdef atari' to handle the differences of Gemdosfs and
Msdosfs, use a flag that can be set by mount_msdos. This is definitely
more flexible.
1996-01-19 14:28:05 +00:00
ws debbf2f60e - Add support for Win'95 separate creation/modification/access timestamps
- Re-introduce lowercase filenames for non-Win'95-filesystems
1995-11-29 15:08:32 +00:00
ws 29fff9256a Don't forward credentials to bread, it makes nfs panic
(Of course, nfs shouldn't rely on the credentials not being referenced)
Don't give directory entry to deget, it could result in a deadlock
Use device blocks, not clusters for logical block numbers
1995-11-05 18:47:48 +00:00
ws 9c20d7c675 Win95 ignores case on lookup 1995-10-30 19:06:15 +00:00
ws a96f4bc2fc Add support for Win'95 long filenames 1995-10-15 15:34:19 +00:00
ws 6820273c34 Don't allow setattr on msdos directories (fixes pr kern/1436)
Correct handling of rmdir'ing open directories
Correct implementation of rename (includes renaming of directories)
Handle root directories that are not multiple clusters in size
1995-09-09 19:38:00 +00:00