Commit Graph

999 Commits

Author SHA1 Message Date
yamt 3e796c5be5 reserve a MAXBSIZE-sized buffer for inodedeps for pagedaemon.
PR/24443.
2004-03-11 11:50:43 +00:00
yamt bfe5a94adc as we always replace whole buf in the case of indirdep,
simply changing b_data is enough.  eliminate M_INDIRDEP.

PR/24443.
2004-03-11 11:48:16 +00:00
dbj 8ad71c85f1 quiet tls. change botched superblock warning to use -b 16 2004-03-11 07:14:12 +00:00
keihan b220964103 s/netbsd.org/NetBSD.org/g 2004-03-10 09:56:59 +00:00
yamt 15c9d33810 calculate data checksum inline. 2004-03-09 07:43:49 +00:00
yamt 81ce5e8cc3 use correct segment size. this fixes memory corruption when using lfsv1. 2004-03-09 06:43:18 +00:00
yamt 25a0a3496e revert ufs_lookup.c rev.1.53 (MNT_ASYNC changes)
it was redundant because our bwrite() knows about MNT_ASYNC.

ok'ed by Jaromir Dolecek and Chuck Silvers.
2004-03-06 06:54:12 +00:00
uwe 20c14b226b Shut up gcc3 warning that `metalbn' might be used uninitialized.
XXX: The warning is bogus and only triggered on sh3.
2004-02-27 00:19:36 +00:00
oster 19eeec0a9c Add a missing:
pool_destroy(&lfs_dinode_pool);

to lfs_done().

Approved-by: yamt
2004-02-26 22:56:55 +00:00
yamt f9571060ef lfs_putpages: fix a simple_lock mismatch. 2004-02-26 22:41:36 +00:00
wiz 73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
jdolecek d06e4401fa make sblock_try[] const 2004-02-22 08:58:03 +00:00
yamt a57f9a6ca5 lfs_update_single: add an assertion. 2004-01-29 12:10:07 +00:00
he 11544aaa71 Let the cast to (long long) for using the result as a printf argument
apply to the whole expression, not just the first factor.
2004-01-28 20:57:15 +00:00
yamt 3e9d8d6772 use bufmem instead of bufpages to make lfs a little less broken. 2004-01-28 10:54:23 +00:00
yamt 09ec20ca66 eliminate tricky usages of VOP_STRATEGY which are (no longer?) necessary. 2004-01-28 10:53:12 +00:00
hannken d6170777cf Fix xxx_strategy() to use the vnode arg instead of bp->b_vp. 2004-01-26 10:39:29 +00:00
hannken 84b45bc333 Fix mfs_strategy() to use the vp argument.
From YAMAMOTO Takashi <yamt@netbsd.org>.
2004-01-26 10:02:31 +00:00
itojun c1675e235e avoid panic on monut_mfs. Greg Oster 2004-01-26 04:25:02 +00:00
hannken 3db4e2acd8 Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.
VOP_STRATEGY(bp) is replaced by one of two new functions:

- VOP_STRATEGY(vp, bp)  Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp)      Call the d_strategy routine of bp->b_dev for bp.

DEV_STRATEGY(bp) is used only for block-to-block device situations.
2004-01-25 18:06:48 +00:00
soren 3e41a33af7 With large average filesizes, it was possible to overflow dirsize to zero,
causing a division by zero in ffs_dirpref().

From Barry Bouwsma of Tiengen.
2004-01-13 13:38:18 +00:00
dbj 51134cc5dd change the updating note to say you may need fsck_ffs -b 32 -c 4' 2004-01-12 16:19:19 +00:00
dbj 6202d43b3b add checks for a couple of botched superblock upgrade cases
and report a warning with repair references.
2004-01-12 05:49:03 +00:00
hannken ed68c4e34c Allow vfs_write_suspend() to wait if the file system is already
suspending.

Move vfs_write_suspend() and vfs_write_resume() from kern/vfs_vnops.c
to kern/vfs_subr.c.

Change vnode write gating in ufs/ffs/ffs_softdep.c (from FreeBSD).

When vnodes are throttled in softdep_trackbufs() check for
file system suspension every 10 msecs to avoid a deadlock.
2004-01-10 17:16:38 +00:00
hannken 8308a4868d Split out softdep_flushworklist() from softdep_flushfiles() so that
it can be used to clear the work queue.

Cleanup ffs_sync() which did not synchronously wait when MNT_WAIT
was specified. Clear the work queue when MNT_WAIT is specified.

Result is a clean on-disk file system after ffs_sync(.., MNT_WAIT, ..)

From FreeBSD.
2004-01-10 16:23:36 +00:00
yamt 7266a95907 store a i/o priority hint in struct buf for buffer queue discipline. 2004-01-10 14:39:50 +00:00
dbj 01637061e3 never upgrade the superblock or set FS_FLAGS_UPDATED in fs_old_flags
add compatibility for filesystems created before FFSv2 integration
these patches are from pr port-macppc/23926 and should also fix
problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:10:22 +00:00
dbj d7fdf500a8 reintroduce compatbility defines for
fs_headswitch, fs_trkseek, fs_csmask, fs_csshift
fs_postbl, fs_rotbl, cg_blktot, cg_blks, cbtocylno, cbtorpos
2004-01-03 19:18:17 +00:00
dbj ca5ad5d61f explicitly pad struct appleufslabel and use __attribute__((__packed__))
since apple put the 64 bit uuid field on a 4 byte boundary
2004-01-02 06:57:46 +00:00
dbj 23d4eb34b2 add uuid field to apple ufs volume label 2004-01-02 05:08:57 +00:00
dbj 65a136e22d remove incorrect XXX comments I introduced a couple of days ago 2003-12-31 19:33:13 +00:00
dbj ba5b25c952 remove unused cs_numclusters field from struct csum_total
this avoids a potential future bug if it is ever used.
before this fix, fsck_ffs would check and fix this field to be zero
2003-12-31 19:19:39 +00:00
dbj c0000df464 update explanatory comment about NOCSPTRS to reflect that fs_active
is now within that region.
no functional change
2003-12-31 18:53:45 +00:00
dbj 82a1a92247 reorder ffs_sb_swap to reflect actual order in superblock
add comments regarding historical field overlap
no functional change
2003-12-31 18:40:23 +00:00
dbj 4bdc4574c7 add fs_flags to ffs_sb_swap 2003-12-31 18:32:47 +00:00
pk 70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
dbj dbba662bc8 fix bugs in ffs_cg_swap for FS_42POSTBLFMT 2003-12-30 03:30:43 +00:00
dbj cd998638bc use symbolic V_SAVE instead of value 1 when invoking vinvalbuf 2003-12-28 00:36:33 +00:00
simonb 740725d725 Fix usage of fifth argument to pool_init(). 2003-12-21 07:53:58 +00:00
yamt 009640868e set VBWAIT when waiting v_numoutput to be drained. 2003-12-17 10:38:39 +00:00
yamt ce11c3ce4e remove a redundant substitution. 2003-12-17 07:14:03 +00:00
yamt 6b95193071 - reduce code duplication.
- use boolean_t where appropriate.
2003-12-16 13:47:48 +00:00
yamt 98e9a8c373 g/c lfs_no_inactive. 2003-12-16 11:45:07 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
yamt 3ea6756a92 use b_private rather than b_saveaddr.
XXX LFS_USE_B_INVAL
2003-12-04 14:57:47 +00:00
dbj d8b416001c clarify comments, especially since ffs_isfreeblock is non-intuitive:
ffs_isblock:
    check if a block is available
      returns true if all the correponding bits in the free map are 1
     returns false if any corresponding bit in the free map is 0
  ffs_isfreeblock:
    check if a block is completely allocated
      returns true if all the corresponding bits in the free map are 0
      returns false if any corresponding bit in the free map is 1
2003-12-02 04:40:43 +00:00
dbj f31a623a56 in ffs_unmount, ignore error returned by VOP_CLOSE(devvp)
this fixes a problem where device close error would cause
unmount to fail but structures to be left partially deallocated
2003-12-01 18:57:07 +00:00
mycroft c714b3b115 Remove part of previous -- there is NO reason for directory allocation to use
arc4random().
2003-11-27 04:52:55 +00:00
yamt 5b12f94dde use FINFOSIZE macro. 2003-11-25 15:14:57 +00:00
thorpej 857f24339f Kernel portion of the fsync_range(2) system call. Written by Bill
Studenmund, and contributed by Wasabi Systems, Inc.
2003-11-15 01:19:38 +00:00