> trying to understand what is going on in fs/buffer.c . I have a fiew
> questions , maby sombody has time to answer them so a kernel-newbee
> can understand them....
>
> 1) a buffer is clean aslong as it is only read from
> and only becomes dirty if it is written to ?
Yes.
> 2) a clean buffer never is flushed, does that mean it
> is simply dropped if a different process requests
> physical memory and no more free-buffers are around ?
Yes.
> 3) a locked buffer is locked by the process writing to it , a buffer that was
> locked is always dirty ?
Buffer is locked when there is pending i/o on it.
> 4) if a dirty buffer is flushed is it always freed aswell ?
No.
> 5) what is the relation between clean/dirty and swaping ? can a clean buffer
> be swapped out or is it simply dropped and then reloaded if accessed at
> its VFS-address ?
No. Buffers (like all kernel memory) are not swapped.
> 6) I expected that a dirty buffer that is flushed would be put on the clean
> buffer list until the process that was using it terminated , I could not
> find where that would happen in buffer.c ?
refile_buffer does this.
> 7) are shared buffers never flushed until the last process using them exits ?
> would that not mean that shared buffers are unsafer than non-shared
> buffers with respect to dataloss on powerfailure ?
I think there are flushed but I'm not sure about it.
Mikulas Patocka
-
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/