From: Ben Gras Date: Mon, 11 Oct 2010 15:35:43 +0000 (+0000) Subject: mfs - no more WRITE_IMMED X-Git-Tag: v3.2.0~784 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=b65342288303677edfb25adff05955883a85d0a2;p=minix.git mfs - no more WRITE_IMMED --- diff --git a/servers/mfs/buf.h b/servers/mfs/buf.h index 72754fb9e..3d86da3e1 100644 --- a/servers/mfs/buf.h +++ b/servers/mfs/buf.h @@ -52,7 +52,6 @@ EXTERN struct buf *rear; /* points to most recently used free block */ EXTERN unsigned int bufs_in_use;/* # bufs currently in use (not on free list)*/ /* When a block is released, the type of usage is passed to put_block(). */ -#define WRITE_IMMED 0100 /* block should be written to disk now */ #define ONE_SHOT 0200 /* set if block not likely to be needed soon */ #define INODE_BLOCK 0 /* inode block */ diff --git a/servers/mfs/cache.c b/servers/mfs/cache.c index 6e3d522b3..5bcb80154 100644 --- a/servers/mfs/cache.c +++ b/servers/mfs/cache.c @@ -263,14 +263,6 @@ int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */ rear->b_next = bp; rear = bp; } - - /* Some blocks are so important (e.g., inodes, indirect blocks) that they - * should be written to the disk immediately to avoid messing up the file - * system in the event of a crash. - */ - if ((block_type & WRITE_IMMED) && bp->b_dirt==DIRTY && bp->b_dev != NO_DEV) { - rw_block(bp, WRITING); - } } /*===========================================================================*