--- 2.2.14pre16/fs/buffer.c.~1~ Tue Dec 28 00:46:02 1999 +++ 2.2.14pre16/fs/buffer.c Tue Dec 28 00:51:00 1999 @@ -817,7 +817,9 @@ printk("Attempt to refile free buffer\n"); return; } - if (buffer_dirty(buf)) + if (buffer_protected(buf)) + dispose = BUF_PROTECTED; + else if (buffer_dirty(buf)) dispose = BUF_DIRTY; else if (buffer_locked(buf)) dispose = BUF_LOCKED; @@ -831,7 +833,7 @@ /* This buffer is dirty, maybe we need to start flushing. * If too high a percentage of the buffers are dirty... */ - if (nr_buffers_type[BUF_DIRTY] > too_many) + if ((nr_buffers_type[BUF_DIRTY]+nr_buffers_type[BUF_PROTECTED]) > too_many) wakeup_bdflush(1); /* If this is a loop device, and @@ -1503,7 +1505,7 @@ int found = 0, locked = 0, dirty = 0, used = 0, lastused = 0; int protected = 0; int nlist; - static char *buf_types[NR_LIST] = {"CLEAN","LOCKED","DIRTY"}; + static char *buf_types[NR_LIST] = {"CLEAN","LOCKED","DIRTY","PROTECTED",}; printk("Buffer memory: %8ldkB\n",buffermem>>10); printk("Buffer heads: %6d\n",nr_buffer_heads); --- 2.2.14pre16/include/linux/fs.h.~1~ Tue Dec 28 00:46:03 1999 +++ 2.2.14pre16/include/linux/fs.h Tue Dec 28 00:52:11 1999 @@ -759,7 +759,8 @@ #define BUF_CLEAN 0 #define BUF_LOCKED 1 /* Buffers scheduled for write */ #define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */ -#define NR_LIST 3 +#define BUF_PROTECTED 3 /* Ramdisk persistent storage */ +#define NR_LIST 4 void mark_buffer_uptodate(struct buffer_head * bh, int on);