Commit Graph

1476 Commits

Author SHA1 Message Date
pooka
1bff00ecec Destroy extattr lock when destroying extattrs associated with the
mountpoint.  Make stopping extattrs always succesful to facilitate
always being able to free resources.
2008-01-25 10:49:32 +00:00
pooka
04177824be spec_node_init() mfs device vnode.
fixes PR kern/37867 by Steve Woodford
2008-01-25 10:30:20 +00:00
ad
927229e57b quotaoff: ignore clean vnodes. Fixes PR kern/37818. 2008-01-24 22:55:21 +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
hannken
0409981d90 si_mount_dtor(): destroy si_vnlock before free. 2008-01-24 17:29:56 +00:00
hannken
ca2bbf9908 Fix a typo from the vmlocking2 merge: vmark() the right vnode. 2008-01-24 16:26:44 +00:00
pooka
c40d447080 Sprinkle comments about um_lock status on function entry and exit.
No functional change.
2008-01-21 23:36:26 +00:00
ad
42c90ece4c Fix dodgy tests of v_usecount. 2008-01-17 10:39:14 +00:00
ad
abb6491738 mfs_close: remove a broken assertion. 2008-01-17 10:24:05 +00:00
christos
20f21ddc4a fix locking botch; vunmark() needs the mountvnode lock, and the loop invariant
is to exit with the mountvnode lock held.
2008-01-15 21:30:46 +00:00
ad
08c770b434 Initialize caches at IPL_SOFTBIO (not IPL_NONE) so that we are allocating
from kmem_map.
2008-01-12 00:34:10 +00:00
ad
dd68496f43 Fix hangs on 'biolock' when creating a directory under / with softdep. 2008-01-09 18:20:54 +00:00
ad
0b52913dee Go back to freeing on disk inodes in the inactive routine. It would be
better not to do this, but it rules out potential side effects with softdep.
2008-01-09 16:15:22 +00:00
ad
52603a7d6d Fix 'panic: softdep_update_inodeblock: update failed'. 2008-01-07 16:56:27 +00:00
tnn
51f964a289 softdep_freefile: don't acquire ufsmount lock twice. 2008-01-07 05:20:25 +00:00
ad
e01dd1a1f8 Use pool_cache. 2008-01-03 19:28:48 +00:00
pooka
8e7631e799 make the UFS_EXTATTR case build 2008-01-03 02:23:27 +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
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +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
dsl
7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
dyoung
c9b4d7e0b1 Call genfs_node_init a little earlier to avoid a vput()ing an
uninitialized node, later, which leads to a kernel panic.  Patch
by Antti Kantee.
2007-12-20 16:18:57 +00:00
he
cd15efd05d Fix a use of lfs_truncate() inside an #ifdef notyet (so no resulting change);
lfs_truncate() has lost its lwp argument.
2007-12-12 18:36:10 +00:00
he
8b0afebe4f Make this build again, as part of sys/lkm/dev/vnd/:
- lfs_truncate() has lost its lwp argument.
- Cast from void* to char* before doing pointer arithmetic.
2007-12-12 18:35:21 +00:00
lukem
2b0e4fae39 Move __KERNEL_RCSID() so that it's always available if this file is
compiled, even if DEBUG isn't defined.
(This matches the behaviour of various other source files that
provide functions only if DEBUG is enabled.)
2007-12-12 03:49:03 +00:00
ad
e38a5a204c Fix a stray brelse() that got missed. 2007-12-12 03:10:47 +00:00
lukem
85a77245b2 defflag LFS_KERNEL_RFW (in opt_lfs.h).
Note: lfs_rfw.c doesn't compile if you define the option; locking API fallout?
2007-12-12 02:56:03 +00:00
lukem
961afe5035 use __KERNEL_RCSID() instead of __RCSID() 2007-12-11 12:16:34 +00:00
pooka
db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +00:00
ad
5870896633 Grab ump->um_lock in another spot. 2007-12-08 15:23:32 +00:00
ad
c27abd2a99 Add some comments. 2007-12-08 15:21:19 +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
tsutsui
581d311161 Use e2fs_first_dblock in superblock to read/write group descriptor blocks. 2007-12-01 16:57:26 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
tsutsui
e2199739d6 Misc cosmetics. 2007-11-26 15:46:48 +00:00
tsutsui
da1f43d88f Account e2fs_reserved_ngdb blocks accordingly in ext2fs_statvfs(). 2007-11-26 15:41:03 +00:00
dholland
9c31b45f5e Change the fs_clean member of the ffs superblock to be unsigned
(uint8_t instead of int8_t) - this prevents an ugly sign-extension
printing bug as well as formally undefined behavior when you mount an
unclean fs enough times.

From (my own) PR kern/28134; I've been carrying this patch for three
years, long enough to forget about it, and it's had no ill effects in
that time.

reviewed: pooka
2007-11-23 18:00:46 +00:00
pooka
2b2c7bcc21 Update comments: ufs_{rename,mkdir,rmdir} haven't been system calls
since 4.3BSD.
2007-11-23 14:18:01 +00:00
yamt
a3dbd70683 lfs_mountroot: use vfs_destroy. 2007-11-22 10:51:44 +00:00
tsutsui
d1112c275c Misc cosmetics. 2007-11-17 08:51:51 +00:00
tsutsui
b95d1c0be7 Some KNF and cosmetics. 2007-11-17 08:34:38 +00:00
tsutsui
bf39da4423 Also bswap recently added e2fs_reserved_ngdb in e2fs_sb_bswap(). 2007-11-17 03:43:18 +00:00
tsutsui
0192f3ddfc Add some definitions for resizefs features. 2007-11-15 12:59:17 +00:00
tsutsui
bed6c72507 - add some more constant definitions
- add some comments
- typo and some cosmetics
2007-11-13 13:50:18 +00:00
rmind
f499d5e662 Use PRI_BIO for kthreads instead of PINOD. Fixes a missed case of priority
inversion, which caused LFS to fire some assertions.

Reported by Kurt Schreiner on <current-users>.
2007-11-10 18:53:57 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
hannken
75bdfc0dac Avoid doing bawrite to initialize inode block while holding cylinder
group block buffer busy.  If filesystem has any active snapshots, bawrite
can come back trying to allocate new snapshot data block from the same
cylinder group and cause deadlock.

From FreeBSD Rev. 1.117
2007-11-01 06:31:59 +00:00
hannken
df70316e3f Ffs_blkfree() and ffs_freefile() take a devvp that may be a regular file whencalled from snapshot creation. Be sure to use the right mount.
Ok: Andrew Doran <ad@netbsd.org>
2007-10-18 17:39:04 +00:00
ad
fd7e1bf0d1 Sync with ffs: fix ufs_ihashlock / ufs_hash_lock deadlock.
From Sverre Froyen.
2007-10-17 17:34:25 +00:00
ad
4c92a21547 Remove LOCK_ASSERT(!simple_lock_held(&foo)); 2007-10-11 19:53:37 +00:00