> 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/