Commit Graph

857 Commits

Author SHA1 Message Date
ad
928a6b2096 PR kern/38135 vfs_busy/vfs_trybusy confusion
The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.
2008-04-30 12:49:16 +00:00
ad
e3610f1886 kern/38135 vfs_busy/vfs_trybusy confusion
The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.
2008-04-29 23:51:04 +00:00
ad
baa3395f8f PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.
2008-04-29 18:18:08 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
matt
9a1bbaab37 Convert to ansi definitions from old-style definitons. 2008-02-27 19:59:48 +00:00
matt
8014191a2e Convert to ansi definitions from old-style definitons. 2008-02-27 19:43:36 +00:00
ad
1a710239b8 A port of FreeBSD's updated unionfs. This is a work in progress. In
particular, unionfs_lookup() needs a lot of attention.
2008-02-18 16:44:22 +00:00
dholland
81117ea33b Restore a fragment of a comment that apparently got lost in a merge slipup
in 1998.
2008-02-09 17:49:39 +00:00
jmmv
5a8838cb59 u_int is not a C99 standard type, so spell it out completely as
unsigned int.
2008-02-06 11:23:53 +00:00
jmmv
565f731b68 Drop trailing whitespace. 2008-02-06 11:22:12 +00:00
ad
648f07789f Do genfs_node_init() earlier. PR kern/36162. 2008-02-05 15:18:36 +00:00
ad
1eba00507a Limit kva usage to 8TB and the number of inodes to 2G. Should fix
PR kern/37951.
2008-02-05 15:02:45 +00:00
ad
22c6a20ebd Lock v_knlist with the vnode interlock. PR kern/37881. 2008-02-05 14:19:52 +00:00
ad
d7b9a25622 Remove debugging code that's no longer needed. 2008-01-31 13:13:20 +00:00
tnn
d1e420ee23 - Needs sys/atomic.h for atomic_inc_uint()
- Quench compiler warning about signed/unsigned mismatch when building LKM
2008-01-31 08:23:04 +00:00
ad
2290e4283f Expunge references to lockmgr. 2008-01-30 14:16:42 +00:00
ad
9ef95126d8 Replace crufty use of lockmgr. 2008-01-30 14:08:00 +00:00
ad
e556d15453 Make it compile. I'll leave it to pooka to figure out what is the correct
thing here because I don't understand what this code is doing.
2008-01-30 11:57:24 +00:00
ad
25153c3ec9 PR kern/37706 (forced unmount of file systems is unsafe):
- Do reference counting for 'struct mount'. Each vnode associated with a
  mount takes a reference, and in turn the mount takes a reference to the
  vfsops.
- Now that mounts are reference counted, replace the overcomplicated mount
  locking inherited from 4.4BSD with a recursable rwlock.
2008-01-30 11:46:59 +00:00
ad
3490efcc63 Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.
2008-01-30 09:50:19 +00:00
pooka
81de436273 init genfs_node before potential vput() 2008-01-29 18:22:24 +00:00
pooka
13d9236c46 Nuke #ifdef __OtherOS__ clutter to make maintaining slightly easier. 2008-01-29 18:21:10 +00:00
pooka
feea4545b8 For code clarity typedef void *puffs_cookie_t.
No functional change.
2008-01-28 21:06:36 +00:00
dholland
717e1785a5 Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.
2008-01-28 14:31:15 +00:00
ad
b9839de884 Replace use of lockmgr(). 2008-01-27 21:58:39 +00:00
ad
29426ebab2 - Fix several problems with the inode hash.
- Replace use of lockmgr().
2008-01-26 14:25:38 +00:00
ad
e49174fa0c - Fix probelms with inode hash: make MPSAFE, don't allocate with held locks.
- Replace use of lockmgr().
2008-01-25 20:49:15 +00:00
ad
de81194d0c - Make new vnode construction MPSAFE.
- Replace use of lockmgr().
2008-01-25 20:29:28 +00:00
ad
1997a1e1f4 Remove VOP_LEASE. Discussed on tech-kern. 2008-01-25 14:32:11 +00:00
ad
703069c0e9 specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.
2008-01-24 17:32:52 +00:00
pooka
661097a9a5 Remove bogus KASSERT: we can't make any assumptions about a dirent's
node in unmount since it might have been freed already.

fixes PR kern/37667.  per discussion with ad & simonb.
2008-01-17 18:22:52 +00:00
ad
42c90ece4c Fix dodgy tests of v_usecount. 2008-01-17 10:39:14 +00:00
ad
6d827ae10e Correct previous. 2008-01-17 10:28:24 +00:00
ad
33b917a83d smbfs_reclaim: fix a broken assertion. 2008-01-17 10:25:01 +00:00
ad
bf01c1fd6b union_putpages: fix a locking botch. 2008-01-16 10:10:18 +00:00
christos
d4fda54fa5 PR/37696: Paul Ripke: add large read / readahead support (Introduce run-length
detection to msdosfs_bmap(), from FreeBSD)
2008-01-05 18:42:14 +00:00
ad
0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
pooka
933a1a1af1 Politely refuse to mount a file system which says its FAT size is
zero - our implementation can't handle it (how sensible handling
a case like that would be is a whole other debate).

fixes panic reported by Jukka Salmi on current-users
2008-01-04 14:58:16 +00:00
pooka
89943d2ace fix vmlocking2 fallout: fstrans_mount/unmount 2008-01-03 18:09:35 +00:00
pooka
34fa5dc385 struct vop_foo_args comment police: a_l has ceased to be 2008-01-03 02:18:20 +00:00
pooka
d53e261066 valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok
2008-01-03 01:26:28 +00:00
pooka
4f32bae2c1 More type-punning workarounds. Curiously the kernel compilation
flags cause gcc to not complain.
2008-01-02 22:37:19 +00:00
pooka
b8121d8a80 silence gcc about break type-punning 2008-01-02 22:33:10 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
pooka
a5ee2954b8 namespace a bit: vfsops -> puffs_vfsop_x() and vops -> puffs_vnop_x() 2007-12-30 23:04:12 +00:00
reinoud
a661982b31 Use uvm_vnp_setwritesize() on file extending to instruct UVM to NOT read-in
the newly added space first. This significantly speeds up write speed for
msdosfs and making it at par with ffs wich already had this patched.

Speed increase measured on my IDE disc from 2Mb/sec to 32 Mb/sec
2007-12-28 17:46:48 +00:00
perry
b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00