lkml.org 
[lkml]   [1999]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bforget and protected buffers
On Tue, 27 Apr 1999, Chuck Lever wrote:

>see the buffer_busy macro defined later in fs/buffer.c for use by
>try_to_free_buffers(). this will prevent protected ramdisk buffers from
>being reclaimed, although they can still appear on the free list if
>someone decides to add bforget() calls to the ramdisk logic... presumably
>if ramdisk decides to bforget a buffer, it doesn't care about it's
>contents.
>
>now, if you add this to bforget():
>
> buf->b_state = 0;
>
>that defeats the buffer_busy check in try_to_free_buffers(), so maybe the
>check should be made explicitly in bforget() if you add this line.

Even if you don't add the buf->b_state = 0 by hand in bforgot, you'll get
b_state set to 0 by getblk a bit after.

Andrea Arcangeli



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2011 Jasper Spaans