Commit Graph

725 Commits

Author SHA1 Message Date
hannken
bb874d13b8 Free the on disk inodes in the reclaim routine. 2010-08-04 10:43:53 +00:00
hannken
c84e81cad1 Add vm page flag PG_MARKER and use it to tag dummy marker pages
in genfs_do_putpages() and uao_put().
Use 'v_uobj.uo_npages' to check for an empty memq.
Put some assertions where these marker pages may not appear.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>
2010-07-29 10:54:50 +00:00
hannken
fb62bef947 Make holding v_interlock mandatory for callers of vget().
Announced some time ago on tech-kern.
2010-07-21 17:52:09 +00:00
hannken
245651a23d Remove vlockmgr(). Generic vnode lock operations now use a rwlock located
in the vnode.  All LK_* flags move from sys/lock.h to sys/vnode.h.  Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.
2010-07-01 13:00:54 +00:00
hannken
07c29bfbcb Undo last commit and don't try to lock vnodes in lfs_unmark_dirop()
as we may deadlock trying to write the superblock.

Should fix PR #43503 Can't create device nodes on LFS.
2010-06-25 10:03:52 +00:00
hannken
1423e65b26 Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
hannken
f6c438ba23 Clean up vnode lock operations:
- VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
   LK_SHARED and LK_NOWAIT.  LK_INTERLOCK is no longer allowed as it
   makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
  LK_EXCLOTHER.  Mark this operation as "diagnostic only".
  Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.
2010-06-24 07:54:46 +00:00
pooka
242bf1c3e7 Stop exposing fifofs internals and leave only fifo_vnodeop_p visible. 2010-03-29 13:11:32 +00:00
pooka
5de34505ef load lfs syscalls in modload 2010-03-02 19:34:49 +00:00
pooka
96798ffe71 /*
* XXX: Get extra reference to LFS vfsops.  This prevents unload,
 * but also prevents kernel panic due to text being unloaded
 * from below lfs_writerd.  When lfs_writerd can exit, remove
 * this!!!
 */
2010-03-02 19:30:34 +00:00
eeh
836736c39d Fix root filesystem support. 2010-02-18 01:14:00 +00:00
mlelstv
7974872552 Three changes in a single commit.
- drop the notion of frags (LFS fragments) vs fsb (FFS fragments)
  The code uses a complicated unity function that just makes the
  code difficult to understand.

- support larger sector sizes. Fix disk address computations
  to use DEV_BSIZE in the kernel as required by device drivers
  and to use sector sizes in userland.

- Fix several locking bugs in lfs_bio.c and lfs_subr.c.
2010-02-16 23:20:30 +00:00
bouyer
be891954ad - ufs_balloc_range(): on error, only PG_RELEASED the pages that were
allocated to extend the file to the new size. Releasing all pages
  may release pages that contains previously-written data not yet flushed
  to disk. Should fix PR kern/35704
- {ffs,lfs,ext2fs}_truncate(): Even if the inode's size is the same as
  the new length, call uvm_vnp_setsize(). *_truncate() may have been
  called by *_write() in the error path (e.g. block allocation failure
  because of quota of file system full), and at this point v_writesize
  has been set to the desired size of the file and not reverted to the
  old size. Not adjusting v_writesize to the real size cause
  genfs_do_io() to write to disk past the real end of the file.
2010-02-07 17:12:40 +00:00
pooka
c3183f3251 The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change
2010-01-08 11:35:07 +00:00
eeh
9d21c97885 Fix some more hangs and deadlocks. 2009-12-07 04:12:10 +00:00
eeh
bfd5cc9df2 This should fix a deadlock. 2009-11-17 22:49:24 +00:00
pooka
8454e30192 Create unwind log in global variable instead of automatic variable.
memory leak spotted by njoly's valgrind run
2009-11-17 17:08:57 +00:00
pooka
2e098f1f4e ... actually, define compat only for the kernel. Userlandia should
see only one version of the interfaces.
2009-11-05 17:16:36 +00:00
pooka
5207b24e34 Include compat/sys/time_types.h instead of compat/sys/time.h.
Fixes lint drama with interface name collisions.
2009-11-05 16:59:55 +00:00
pooka
c584ccaa0d Include compat code by default. 2009-11-05 11:54:49 +00:00
christos
2ef9c80a16 compile without COMPAT_50 2009-10-30 00:53:29 +00:00
eeh
f50f807334 Fix up numoutput accounting. 2009-10-29 18:20:11 +00:00
christos
fc0e85c95e PR/42246: NAKAJIMA Yoshihiro: provide COMPAT_50 for LFS 2009-10-29 17:10:32 +00:00
tsutsui
e7713433d4 Move declaration of ufs_hashlock into <ufs/ufs_extern.h> from each c source. 2009-09-13 05:17:36 +00:00
wiz
8b28c44203 Add missing parenthesis in #ifdef LFS_USE_B_INVAL.
From Henning Petersen in PR 41841.
2009-08-07 13:58:38 +00:00
pooka
b828513eea Compensate v_numoutput & nestbuf for lfs's rather peculiar I/O habits. 2009-08-05 15:39:57 +00:00
pooka
e7780eca66 remember to nestiobuf_done() too 2009-08-05 14:37:01 +00:00
pooka
307631b2c8 Use nestiobuf instead of homerolled equivalent. 2009-08-05 14:09:26 +00:00
dholland
22ba08b022 minor knf 2009-07-19 04:16:23 +00:00
dholland
0b98e26158 typo in comment 2009-07-19 03:39:14 +00:00
dholland
effcf1af5c Convert 67 namei call sites to use namei_simple, in these functions:
check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
2009-06-29 05:08:15 +00:00
elad
13385da3e6 Replace KAUTH_GENERIC_ISSUSER with a better alternative. 2009-05-07 20:32:51 +00:00
elad
88003af1dc Use genfs_can_mount(). 2009-05-07 20:32:23 +00:00
ad
2f5f36b538 Turn up the volume on the warning message a bit. 2009-04-04 10:33:59 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
dc56dbbd97 ansify function definitions 2009-03-15 21:23:31 +00:00
ad
59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
yamt
4f322c072e one more change which i forgot to commit with
UVM_PAGE_HASH_PENALTY -> UVM_PAGE_TREE_PENALTY rename.
noticed by Andreas Wrede.
2009-01-16 05:15:29 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
ad
2f839a2253 These depend on ffs. 2008-11-13 11:10:41 +00:00
ad
bed0008a9a Remove #ifdef LFS from the ufs code. 2008-11-13 11:09:45 +00:00
rumble
4c59ea5a60 Fix lkm fallout from previous sysctl changes. This largely duplicates
sysctl creation code, but lkms are going away soon(ish) anyway.

Spotted by Chris Gilbert.
2008-06-28 15:50:20 +00:00
rumble
28f5ebd853 Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.
2008-06-28 01:34:05 +00:00
gmcgarry
838d34e828 fcntl(4) says the command is type int. lfs_fcntl() comment says u_long. The implementation says int. Synchronise comment with documentation and cast to int before comparison. 2008-06-24 10:47:32 +00:00
ad
06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
ad
3a8db3158e Use atomics to maintain v_usecount. 2008-06-02 16:25:34 +00:00
nakayama
b70810493a s/log file system/log-structured file system/ 2008-05-24 18:14:24 +00:00
ad
9e6de4df51 Don't moan about LFS unless the mount succeeds. 2008-05-20 16:26:04 +00:00
ad
a0fd5bc68d Until these get fixed or replaced:
WARNING: the foo file system is experimental and may be unstable
2008-05-18 13:56:12 +00:00
hannken
5d2bff060a Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2008-05-16 09:21:59 +00:00