Commit Graph

25 Commits

Author SHA1 Message Date
yamt d4da6c3d2e don't forget to skip marker processes. 2009-05-12 11:42:12 +00:00
pooka 010ce4930e more <sys/buf.h> police 2008-11-16 19:34:29 +00:00
hannken 8de1a273e1 Replace the fss unmount hook with a vfs_hook.
fssvar.h:       struct device * -> device_t.
fss.c:          establish unmount hook on first attach, remove on last detach.
vfs_syscalls.c: remove the call of fss_umount_hook().
vfs_trans.c:    destroy cow handlers on unmount as fstrans_unmount() will be
                called before vfs_hooks.
2008-09-17 14:49:25 +00:00
ad 80892cd092 Use pool_cache. 2008-06-24 18:50:30 +00:00
hannken 940992e2c0 Remove a bad assertion from last commit.
Non bufcache buffers may have BC_BUSY unset.
2008-05-16 14:08:56 +00:00
hannken 961a5d4bcb Fscow_run() may recurse into itself.
Take care by adding a per-lwp recursion counter.
2008-05-16 09:01:56 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
yamt a67bae0b7b - simplify ASSERT_SLEEPABLE.
- move it from proc.h to systm.h.
- add some more checks.
- make it a little more lkm friendly.
2008-03-17 08:27:50 +00:00
hannken 35f84b8843 BO_COWDONE -> B_COWDONE: this flag is tested/modified from the thread owning
the buffer and therefore needs no protection by a mutex.

Ok: Andrew Doran <ad@netbsd.org>
2008-02-02 16:51:34 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
hannken d556dc98b0 Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE.  This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2007-12-02 13:56:15 +00:00
hannken c775e7cb24 fscow_run(): Check for NULL mount and don't run the cow handler in this case. 2007-10-08 09:09:47 +00:00
hannken c103a5683e Remove an include committed by accident.
From Chris Ross via current-users.
2007-10-07 14:48:38 +00:00
hannken 3856acafe2 Update the file system copy-on-write handler.
- Instead of hooking the handler on the specdev of a mounted file system
  hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'.  Use
  `mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2007-10-07 13:38:53 +00:00
pooka d9970c8066 Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter. 2007-07-26 22:57:36 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
hannken 64b7e5637e Fstrans_start() always returns zero, so change its type to void. 2007-05-17 07:26:21 +00:00
hannken 0453160a52 Use rwlock for fmi_shared_lock and fmi_lazy_lock.
Ok: Andrew Doran <ad@netbsd.org>
2007-05-16 16:11:56 +00:00
ad 194273271b Use mutexes/condvars. 2007-03-12 21:33:07 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
hannken 198beb0314 Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().
2007-02-16 17:23:53 +00:00
ad 9abeea588a Replace some uses of lockmgr() / simplelocks. 2007-02-15 15:40:50 +00:00
hannken 9c928583f1 newlock2: syncer_lock is now a mutex. 2007-02-10 15:51:02 +00:00
hannken 4d607243ba Change fstrans enum types to upper case.
No functional change.

From Antti Kantee <pooka@netbsd.org>
2007-01-29 15:42:50 +00:00
hannken 1b9c6382e3 New file system suspension API to replace vn_start_write and vn_finished_write.
The suspension helpers are now put into file system specific operations.
This means every file system not supporting these helpers cannot be suspended
and therefore snapshots are no longer possible.

Implemented for file systems of type ffs.

The new API is enabled on a kernel option NEWVNGATE.  This option is
not enabled by default in any kernel config.

Presented and discussed on tech-kern with much input from
Bill Studenmund <wrstuden@netbsd.org> and YAMAMOTO Takashi <yamt@netbsd.org>.

Welcome to 4.99.9 (new vfs op vfs_suspendctl).
2007-01-19 14:49:08 +00:00