lkml.org 
[lkml]   [1999]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [replace-alexv-buffer.c-patch] Re: [PATCH] Several bad bugs in fs/*


On Thu, 22 Apr 1999, Andrea Arcangeli wrote:

> I think there's another subtle bug in set_blocksize() and
> invalidate_buffers(). The problem is that buffers can be moved across
> lists and can be moved across the same list while we are sleeping on a
> locked buffer. This patch address the problem. I never run it on a clean
> 2.2.6, but I am doing these things in my sligthly rewritten buffer.c. It
> address also the problem described by Alexander in a safer way because
> performances after set_blocksize run, are really not an issue, so we can
^^^^^^^^^^^^^^^^^^^^^^^
Excuse me, why? Lots of
filesystems do it in read_super(). AFAICS you've just added an overhead to
mount().

> be lazy.

> My patch looks at least safe to me, but probably is better that somebody
> will try out it before inclusion (maybe a simple pre-patch will be ok).
>
> Ah, and it fix also the buffer-dirty-in-freelist leakage.

[snip]
> @@ -653,10 +629,13 @@
> * around on the free list, and we can get in a loop if we are not careful.
> */
> for(nlist = 0; nlist < NR_LIST; nlist++) {
> + refiled:
> bh = lru_list[nlist];
> for (i = nr_buffers_type[nlist]*2 ; --i > 0 ; bh = bhnext) {
> if(!bh)
> break;
> + if (bh->b_list != nlist)
> + goto refiled;

Ahem... Busy-waiting is fun, ain't it? What did you really mean
in the chunk above?
Al


-
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-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog