public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] FS_MBCACHE: don't needlessly make it built-in
@ 2008-08-03 18:43 Adrian Bunk
  2008-08-17 19:04 ` Andreas Dilger
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2008-08-03 18:43 UTC (permalink / raw)
  To: sct, akpm, adilger; +Cc: linux-ext4, linux-kernel

Assume you have:
- one or more of ext2/3/4 statically built into your kernel
- none of these with extended attributes enabled and
- want to add onother one of ext2/3/4 modular and with
  extended attributes enabled

then you currently have to reboot to use it since this results in 
CONFIG_FS_MBCACHE=y.

That's not a common issue, but I just ran into it and since there's no 
reason to get a built-in mbcache in this case this patch fixes it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
8eb5eb7496002855dfcb9dda31c9390fb9d625e5 
diff --git a/fs/Kconfig b/fs/Kconfig
index d387358..4e94ee8 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -270,9 +270,10 @@ config JBD2_DEBUG
 config FS_MBCACHE
 # Meta block cache for Extended Attributes (ext2/ext3/ext4)
 	tristate
-	depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR
-	default y if EXT2_FS=y || EXT3_FS=y || EXT4DEV_FS=y
-	default m if EXT2_FS=m || EXT3_FS=m || EXT4DEV_FS=m
+	default y if EXT2_FS=y && EXT2_FS_XATTR
+	default y if EXT3_FS=y && EXT3_FS_XATTR
+	default y if EXT4DEV_FS=y && EXT4DEV_FS_XATTR
+	default m if EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR
 
 config REISERFS_FS
 	tristate "Reiserfs support"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] FS_MBCACHE: don't needlessly make it built-in
  2008-08-03 18:43 [2.6 patch] FS_MBCACHE: don't needlessly make it built-in Adrian Bunk
@ 2008-08-17 19:04 ` Andreas Dilger
  2008-08-18  3:20   ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Dilger @ 2008-08-17 19:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andreas Gruenbacher, linux-ext4

On Aug 03, 2008  21:43 +0300, Adrian Bunk wrote:
> Assume you have:
> - one or more of ext2/3/4 statically built into your kernel
> - none of these with extended attributes enabled and
> - want to add onother one of ext2/3/4 modular and with
>   extended attributes enabled
> 
> then you currently have to reboot to use it since this results in 
> CONFIG_FS_MBCACHE=y.
> 
> That's not a common issue, but I just ran into it and since there's no 
> reason to get a built-in mbcache in this case this patch fixes it.

To be honest, I'd like an option to disable MBCACHE entirely.  This
code is of no use if the EAs on an inode are not identical (i.e. if
anything other than ACLs are in use) and is also not useful if the
xattrs fit into the large inodes in ext4 (and ext3 if the filesystem
is formatted with this option).

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] FS_MBCACHE: don't needlessly make it built-in
  2008-08-17 19:04 ` Andreas Dilger
@ 2008-08-18  3:20   ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2008-08-18  3:20 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Adrian Bunk, Andreas Gruenbacher, linux-ext4

Andreas Dilger wrote:
> On Aug 03, 2008  21:43 +0300, Adrian Bunk wrote:
>> Assume you have:
>> - one or more of ext2/3/4 statically built into your kernel
>> - none of these with extended attributes enabled and
>> - want to add onother one of ext2/3/4 modular and with
>>   extended attributes enabled
>>
>> then you currently have to reboot to use it since this results in 
>> CONFIG_FS_MBCACHE=y.
>>
>> That's not a common issue, but I just ran into it and since there's no 
>> reason to get a built-in mbcache in this case this patch fixes it.
> 
> To be honest, I'd like an option to disable MBCACHE entirely.  This
> code is of no use if the EAs on an inode are not identical (i.e. if
> anything other than ACLs are in use)

or selinux....

> and is also not useful if the
> xattrs fit into the large inodes in ext4 (and ext3 if the filesystem
> is formatted with this option).

... which is now the default.

a config option sounds reasonable to me, too.  I think by the time EAs
spill out of the inode, the chance of them being identical is pretty
small?  (i.e. a single acl set, or selinux context may be common, but if
you have enough to not fit in the inode it's more likely to be a
mishmash of things?)

-Eric


> Cheers, Andreas
> --
> Andreas Dilger
> Sr. Staff Engineer, Lustre Group
> Sun Microsystems of Canada, Inc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-18  3:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 18:43 [2.6 patch] FS_MBCACHE: don't needlessly make it built-in Adrian Bunk
2008-08-17 19:04 ` Andreas Dilger
2008-08-18  3:20   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox