mfs - no more WRITE_IMMED
This commit is contained in:
parent
26de8dd299
commit
b653422883
|
@ -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)*/
|
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(). */
|
/* 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 ONE_SHOT 0200 /* set if block not likely to be needed soon */
|
||||||
|
|
||||||
#define INODE_BLOCK 0 /* inode block */
|
#define INODE_BLOCK 0 /* inode block */
|
||||||
|
|
|
@ -263,14 +263,6 @@ int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
|
||||||
rear->b_next = bp;
|
rear->b_next = bp;
|
||||||
rear = 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
|
|
Loading…
Reference in a new issue