From b65342288303677edfb25adff05955883a85d0a2 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 11 Oct 2010 15:35:43 +0000 Subject: [PATCH] mfs - no more WRITE_IMMED --- servers/mfs/buf.h | 1 - servers/mfs/cache.c | 8 -------- 2 files changed, 9 deletions(-) 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); - } } /*===========================================================================*