[lkml]   [2005]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] mb_cache_shrink() frees unexpected caches
On Friday 15 July 2005 17:07, Akinobu Mita wrote:
> 2005-07-15 (Fri) 16:36 +0200 Andreas Gruenbacher wrote:
> > The cache parameter could indeed be removed. Not that it would matter
> > much...
> Currently, mbcache is used only for xattr on ext2/ext3 and reiserfs.
> In other words, only one type of mbcache is used per-filesystem.
> So any problems don't happen without the patch I sent.

Actually, reiserfs doesn't use the mbcache, so this can go:

Index: linux-2.6.12/fs/reiserfs/xattr.c
--- linux-2.6.12.orig/fs/reiserfs/xattr.c
+++ linux-2.6.12/fs/reiserfs/xattr.c
@@ -41,3 +41,2 @@
#include <linux/reiserfs_acl.h>
-#include <linux/mbcache.h>
#include <asm/uaccess.h>
> But, for example when someone use mbcache as another purpose on ext3,
> The crash will be caused by using mb_cache_shrink().
> Therefore, I think your patch should not be committed until
> mbcache will be limited to use only type per-filesystem.

Removing the cache parameter from mb_cache_shrink would break when more than
one mb_cache is used per filesystem, correct. Leaving the parameter in and
adding your patch is more "future proof", so I'm fine with it. Are you
actually using more than one mb_cache, or is this theoretical?

As you say in your follow-up mail, without your patch the cache would become
less effective, it won't crash anything, though.

Andreas Gruenbacher <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-07-16 03:47    [W:0.076 / U:2.604 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site