--- 2.4.23aa1/fs/buffer.c.~1~ 2003-12-13 01:32:26.000000000 +0100 +++ 2.4.23aa1/fs/buffer.c 2004-01-19 17:40:17.588756056 +0100 @@ -605,7 +605,7 @@ static void __insert_into_lru_list(struc (*bhp)->b_prev_free->b_next_free = bh; (*bhp)->b_prev_free = bh; nr_buffers_type[blist]++; - size_buffers_type[blist] += bh->b_size; + size_buffers_type[blist] += bh->b_size >> 9; } static void __remove_from_lru_list(struct buffer_head * bh) @@ -625,7 +625,7 @@ static void __remove_from_lru_list(struc bh->b_next_free = NULL; bh->b_prev_free = NULL; nr_buffers_type[blist]--; - size_buffers_type[blist] -= bh->b_size; + size_buffers_type[blist] -= bh->b_size >> 9; } } @@ -1068,7 +1068,7 @@ static int balance_dirty_state(void) { unsigned long dirty, tot, hard_dirty_limit, soft_dirty_limit; - dirty = size_buffers_type[BUF_DIRTY] >> PAGE_SHIFT; + dirty = size_buffers_type[BUF_DIRTY] >> (PAGE_SHIFT - 9); tot = nr_free_buffer_pages(); dirty *= 100; @@ -1089,7 +1089,7 @@ static int bdflush_stop(void) { unsigned long dirty, tot, dirty_limit; - dirty = size_buffers_type[BUF_DIRTY] >> PAGE_SHIFT; + dirty = size_buffers_type[BUF_DIRTY] >> (PAGE_SHIFT - 9); tot = nr_free_buffer_pages(); dirty *= 100; @@ -2921,7 +2921,7 @@ void show_buffers(void) } printk("%7s: %d buffers, %lu kbyte, %d used (last=%d), " "%d locked, %d dirty %d delay\n", - buf_types[nlist], found, size_buffers_type[nlist]>>10, + buf_types[nlist], found, size_buffers_type[nlist]>>(10-9), used, lastused, locked, dirty, delalloc); } spin_unlock(&lru_list_lock);