Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/ufs/lfs Pull-up of changes made to the trunk on Sun...
details: https://anonhg.NetBSD.org/src/rev/9cc3b499f5b3
branches: netbsd-1-4
changeset: 468211:9cc3b499f5b3
user: perseant <perseant%NetBSD.org@localhost>
date: Tue Apr 13 21:33:54 1999 +0000
description:
Pull-up of changes made to the trunk on Sunday [1.9->1.10], to wit:
Take out the `#ifdef USE_UFSHASH'; use ufs_hashlock to lock the inode free
list instead of free_lock.
Fix inode reporting in lfs_statfs (the meaning of f_files and f_ffree was
reversed).
Fix "lfs_ifind: dinode xxx not found" panic. When inodes were freed, then
immediately reloaded, their dinodes were located in an inode block which
was not on disk at the advertized location, nor in the cache (although it
would be flushed to disk next segment write). Fix this by using getblk()
instead of lfs_newbuf() for inode blocks.
Better checking for held inode locks in lfs_fastvget, for a number of
error conditions. Also change the default setting of lfs_clean_vnhead to
0, which seems to make the locking problems go away (although this is
difficult to test as I can't reliably reproduce them).
Make sure that the wakeup occurs for vnodes that lfs_update might be
sleeping on (nodes which are not marked IN_MODIFIED/IN_CLEANING, but which
have dirty buffers), by marking them with the appropriate flag if
dirtybuffers were added while the write was in progress.
Fix block counting during file truncation, if not truncating to zero.
Disallow threshold-initiated cache flush when dirops are active. Also,
make SET_ENDOP use lfs_check instead of inlining most of it.
Improve the debugging printfs in the cleaner syscalls (in particular, make
it obvious that they're coming from lfs).
Check the superblock version field, and refuse to mount the filesystem if
the version number is higher than we know about. This allows, e.g.,
changes in the format of the ifile, segment size restrictions and
boundaries, etc., which would not affect existing fields in the
superblock, but which would drastically affect the filesystem, to be
smoothly integrated at a later date.
diffstat:
sys/ufs/lfs/lfs_bio.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 78d6d5796e8a -r 9cc3b499f5b3 sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c Tue Apr 13 21:33:54 1999 +0000
+++ b/sys/ufs/lfs/lfs_bio.c Tue Apr 13 21:33:54 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_bio.c,v 1.9 1999/03/25 22:26:52 perseant Exp $ */
+/* $NetBSD: lfs_bio.c,v 1.9.2.1 1999/04/13 21:33:55 perseant Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -341,7 +341,8 @@
int flags;
{
int error;
-
+ struct lfs *fs;
+
error = 0;
if (incore(vp, blkno))
return (0);
@@ -351,10 +352,19 @@
if (VTOI(vp)->i_number == LFS_IFILE_INUM)
return 0;
+ /* If dirops are active, can't flush. Wait for SET_ENDOP */
+ fs = VTOI(vp)->i_lfs;
+ if (fs->lfs_dirops)
+ return 0;
+
if (locked_queue_count > LFS_MAX_BUFS
- || locked_queue_bytes > LFS_MAX_BYTES)
+ || locked_queue_bytes > LFS_MAX_BYTES
+ || fs->lfs_dirvcount > LFS_MAXDIROP)
{
- lfs_flush(VTOI(vp)->i_lfs, flags);
+ ++fs->lfs_writer;
+ lfs_flush(fs, flags);
+ if(--fs->lfs_writer==0)
+ wakeup(&fs->lfs_dirops);
}
while (locked_queue_count > LFS_WAIT_BUFS
|| locked_queue_bytes > LFS_WAIT_BYTES)
Home |
Main Index |
Thread Index |
Old Index