Re: [PATCH, RFC] add fsck to util-linux
On Wed, Sep 26, 2007 at 06:59:46AM -0400, Theodore Tso wrote: It looks like you pulled fsck from the master branch of e2fsprogs git; there is one slight bug fix in the maint branch that hasn't been merged into master yet, commit ed773a263829493e4e4bf612dbec2380cf09349f: I'll pick that up. BTW, I don't like this syntax in the fstab file AT ALL, but it is in use in the wild by at least some Fedora users, and it's not documented in the fstab man page. I'd suggest using a filesystem type of bind, rather than ext3, as the officially blessed way of specifying it in fstab, but it badly needs to be documented in the fstab and/or mount man pages. The above patch should probably get included, though, and backwards compatibility for allowing bind to be specified in the mount options, and with a warning message that the specifying bind in the options field has been deprecated. The syntax is indeed horrible. Is it supported by upstream util-linux? For future code movement, I don't mind fsck moving over, but I would like to manage moving over blkid to util-linux-ng myself, as I have some pretty strong feelings about the right way to do things. I am quite willing to add some low-level interfaces so that fsid can use the same fs probing logic, and I'm willing to add some code so that the high-level interfaces of libblkid, if the /dev/disk/by-* links are present and the user isn't asking for information which isn't in the blkid cache, will use the symlinks instead. However, I really don't want to encode a dependency on udev being there, and I think it should be possible to make the fallback be transparent instead of being a compile-time option. I've started looking into this, and I think at least for the detect which filesystem we have part libblkid is complete overkill. libvolume_id has a really nice lowlevel API for that that is much more suitable. So if it was up to me I'd do the following: - move libvolume_id out of udev - make mount/fsck use libvolume_id unconditionally for detecting the filesystem type. There's absolute no reason to use anything in libblkid for this, and caching the result doesn't help us at all as we're going to touch the disk anyway as part of the mount/fsck. - make libblkid use libvolume_id internally for filesystem detection note that the latter might aswell be a static inclusion of the code, I haven't looked at the details yet. Another note on moving the libraries into util-linux vs a standalone package: At least in xfs land people do upgrade xfsprogs frequently and sometimes independent os the distro because new features get added quite a bit, including new filesystem features that require support. Having to upgrade util-linux for that is not very helpful. So I'm not so sure about moving this to util-linux - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, RFC] add fsck to util-linux
On 9/26/07, Theodore Tso [EMAIL PROTECTED] wrote: On Tue, Sep 25, 2007 at 04:37:35PM +0100, Christoph Hellwig wrote: This adds fsck from latest e2fsprogs git to util-linux. There are only tiny changes to integrate it into the build system and nls setup of util-linux and fixing up the trailing whitespaces quilt is complaining about. I've not yet converted it to the fsprobe helpers as the discussion on those libs is still ongoing and I haven't read up on the fsprobe library either. It looks like you pulled fsck from the master branch of e2fsprogs git; there is one slight bug fix in the maint branch that hasn't been merged into master yet, commit ed773a263829493e4e4bf612dbec2380cf09349f: fsck: Ignore /etc/fstab entries for bind mounts If a user specifies a bind mount with a non-zero fsck pass number, for example: /foo/barext3bind,defaults 1 3 print a warning and ignore the fstab entry. Addresses-Red-Hat-Bugzilla: #151533 Signed-off-by: Eric Sandeen [EMAIL PROTECTED] Signed-off-by: Theodore Ts'o [EMAIL PROTECTED] BTW, I don't like this syntax in the fstab file AT ALL, but it is in use in the wild by at least some Fedora users, and it's not documented in the fstab man page. I'd suggest using a filesystem type of bind, rather than ext3, as the officially blessed way of specifying it in fstab, but it badly needs to be documented in the fstab and/or mount man pages. The above patch should probably get included, though, and backwards compatibility for allowing bind to be specified in the mount options, and with a warning message that the specifying bind in the options field has been deprecated. So with the above patch included, Acked-by: Theodore Ts'o [EMAIL PROTECTED] For future code movement, I don't mind fsck moving over, but I would like to manage moving over blkid to util-linux-ng myself, as I have some pretty strong feelings about the right way to do things. I am quite willing to add some low-level interfaces so that fsid can use the same fs probing logic, and I'm willing to add some code so that the high-level interfaces of libblkid, if the /dev/disk/by-* links are present and the user isn't asking for information which isn't in the blkid cache, will use the symlinks instead. However, I really don't want to encode a dependency on udev being there, and I think it should be possible to make the fallback be transparent instead of being a compile-time option. I really don't want to see something like: the user isn't asking for information which isn't in the blkid cache thing near the code udev has to call. The cache must be part of the high-level blkid functions, and nothing like this should come near the plain probing functions. The compile-time udev switch and the udev symlink logic is already in the util-linux fsprobe wrapper, and there is no need to move that into blkid now, especially not by trying to make anything transparent. The low-level functions need to handle 64bit probing offset and size values, so we can probe partitioned devices. We also need all filesytem types, all raid metadata probing, and filesystem version number and classification information in the final library, so that udev is able to switch over. A low-level probe must be able to return: the classification (filesystem, other, raid, crypto) the filesystem name string (ext3, vfat, xfs, ...) the version of the filesystem (1.3, FAT32, 0.9, ...) a label string (unicode validated and translated to utf8) the raw bytes and the length of the label a UUID string (some raid sets have free-text UUID's today) the raw UUID string and the length And we need to be able to call the sets of raid probing and filesystem probing functions independent from each other, so that we are able to skip all raid probing. I like to see the ~40 volume_id filesystem/raid probing files merged, and the content of probe.c replaced with calls to these files, while preserving the current probing order of blkid. Thanks, Kay - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
2.6.23-rc7-ext4-1 patchset released
I've just released the 2.6.23-rc7-ext4-1; it's largely identical to 2.6.23-rc6-ext4-1 except that I've synchronized patches and patch names with patches that Andrew had pulled into 2.6.23-rc7-mm1. It's available in the standard place: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git 2.6.23-rc8-ext4-1 http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=summary and ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.23-rc8-ext4-1 - Ted - sparse-fix.patch + # n.b. in rc7-mm1 as ext4-fix-sparse-warnings.patch + fix-sparse-warnings.patch + # pulled in from rc7-mm1 + remove-obsolete-fragments.patch - ext4_uninit_blockgroup. + # n.b., this is in the rc7-mm1 patchset as + #next4-uninitialized-block-groups.patch + #and ext4-uninitialized-block-groups-fix.patch + uninitialized-block-groups.patch - flex_bg_kernel.patch + # n.b. in rc7-mm1 as ext4-flex_bg_kernel.patch + flex_bg-kernel-support-v2.patch + fs-jbd2-journalc-kmalloc-memset-conversion-to-kzalloc.patch + # n.b. in the rc7-mm1 tree as introduce-ext4_find_next_bit.patch generic-find-next-le-bit - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Threaded e2fsck proof of concept
The below patch is a proof of concept that e2fsck can get a performance improvement on file systems with more than one disk underneath. On my test case, a 500GB file system with 150GB in use and 10+1 RAID underneath, elapsed time is reduced by 40-50%. I see no performance improvement in the single disk case. Only the reading of inode tables and indirect blocks in pass 1 is multi-threaded; most likely multithreading passes 2 and 5 will help too. The actual data processing is still all single-threaded, which is convenient. Designing multithreaded readahead for the long term is another question. The Lustre folks are working on a sys_readahead() based patch. True aio() is the obvious solution, but won't work for older kernels. Pthreads works for all kernels but is clumsy. Coming up with a design for readahead that allows these different implementations is probably a good idea. Finally, if you are planning on testing these patches: * Use -n! You are crazy to let this write to your file system. * Use about 2 * number_disks threads. (Doesn't work without -t n of some sort.) * The striping logic is probably bogus. Try something like -A 10. Thanks to EMC for making this patch possible. Share and enjoy! -VAL --- e2fsprogs-1.40.2.orig/e2fsck/Makefile.in +++ e2fsprogs-1.40.2/e2fsck/Makefile.in @@ -119,16 +119,16 @@ e2fsck: [EMAIL PROTECTED]@ e2fsck.static: $(OBJS) $(STATIC_DEPLIBS) @echo LD $@ @$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \ - $(STATIC_LIBS) + $(STATIC_LIBS) -lpthread e2fsck.shared: $(OBJS) $(DEPLIBS) @echo LD $@ - @$(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) + @$(LD) $(ALL_LDFLAGS) -o e2fsck.shared $(OBJS) $(LIBS) -lpthread e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS) @echo LD $@ @$(LD) $(ALL_LDFLAGS) -g -pg -o e2fsck.profiled $(PROFILED_OBJS) \ - $(PROFILED_LIBS) + $(PROFILED_LIBS) -lpthread tst_refcount: ea_refcount.c @echo LD $@ --- e2fsprogs-1.40.2.orig/e2fsck/e2fsck.h +++ e2fsprogs-1.40.2/e2fsck/e2fsck.h @@ -25,6 +25,7 @@ #ifdef HAVE_SETJMP_H #include setjmp.h #endif +#include pthread.h #if EXT2_FLAT_INCLUDES #include ext2_fs.h @@ -334,6 +335,17 @@ struct e2fsck_struct { profile_t profile; /* +* Multithreaded readahead variables +*/ + unsigned int read_threads; + unsigned int stripe_size; + struct readahead_state *readahead; + /* Used to signal the main thread when a bg is ready */ + pthread_mutex_t mutex_ready; + pthread_cond_t buffer_ready; + /* Have to count groups left at the ctx level, not scan level */ + dgrp_t groups_left; + /* * For the use of callers of the e2fsck functions; not used by * e2fsck functions themselves. */ --- e2fsprogs-1.40.2.orig/e2fsck/pass1.c +++ e2fsprogs-1.40.2/e2fsck/pass1.c @@ -96,9 +96,64 @@ struct process_inode_block { struct ext2_inode inode; }; -struct scan_callback_struct { +/* + * XXX Complete and total interface violation + * + * We need to skip around between block groups based on when they're + * done with readahead, rather than processing them sequentially. + * Probably just using the fs-get_blocks hook or something similar + * will work and will cut a few hundred lines of code. For now, mess + * around with libext2fs's private structures. + * + */ + +struct ext2_struct_inode_scan { + errcode_t magic; + ext2_filsys fs; + ext2_ino_t current_inode; + blk_t current_block; + dgrp_t current_group; + ext2_ino_t inodes_left; + blk_t blocks_left; + dgrp_t groups_left; + blk_t inode_buffer_blocks; + char * inode_buffer; + int inode_size; + char * ptr; + int bytes_left; + char*temp_buffer; + errcode_t (*done_group)(ext2_filsys fs, + ext2_inode_scan scan, + dgrp_t group, + void * priv_data); + void * done_group_data; + int bad_block_ptr; + int scan_flags; + int reserved[6]; +}; + +/* + * Per thread readahead state. + */ + +struct readahead_state { + ext2_filsys fs; + ext2_inode_scan scan; e2fsck_tctx; - char*block_buf; + pthread_t pthread; + unsigned intthread; + int bg_readahead_done; + pthread_mutex_t mutex; + pthread_cond_t pause; + blk_t *ind_blks_queue;
Re: [PATCH, RFC] add fsck to util-linux
On Wed, Sep 26, 2007 at 01:05:33PM +0100, Christoph Hellwig wrote: BTW, I don't like this syntax in the fstab file AT ALL, but it is in use in the wild by at least some Fedora users, and it's not documented in the fstab man page. I'd suggest using a filesystem type of bind, rather than ext3, as the officially blessed way of specifying it in fstab, but it badly needs to be documented in the fstab and/or mount man pages. The above patch should probably get included, though, and backwards compatibility for allowing bind to be specified in the mount options, and with a warning message that the specifying bind in the options field has been deprecated. The syntax is indeed horrible. Is it supported by upstream util-linux? Sure, it's supported. mount(8) supports the bind as standard mount option (since util-linux 2.10). There is not difference between options from fstab and command line. I've started looking into this, and I think at least for the detect which filesystem we have part libblkid is complete overkill. libvolume_id has a really nice lowlevel API for that that is much more suitable. It depends.. for example I think that call blindly all probing functions is overkill. The libblkid is firstly trying to recognize FS type by magic string. So if it was up to me I'd do the following: - move libvolume_id out of udev - make mount/fsck use libvolume_id unconditionally for detecting the filesystem type. There's absolute no reason to use anything in unconditionally ... absolute no reason... Too strong words, especially when there are distributions that depend on some features from libblkid (for example device-mapper support). libblkid for this, and caching the result doesn't help us at all as we're going to touch the disk anyway as part of the mount/fsck. I agree that the cache should be optional, rather than mandatory. For example for FS type detection is it overkill, but for LABEL/UUID translation is it good thing (especially on systems without /dev/disk/by-*). Another note on moving the libraries into util-linux vs a standalone package: At least in xfs land people do upgrade xfsprogs frequently and sometimes independent os the distro because new features get added quite a bit, including new filesystem features that require support. Having to upgrade util-linux for that is not very helpful. So I'm not so sure about moving this to util-linux I think we can always change this concept in dependence on feedback from distributors/developers. Karel -- Karel Zak [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] JBD/ext34 cleanups: convert to kzalloc
On Fri, 21 Sep 2007 16:13:56 -0700 Mingming Cao [EMAIL PROTECTED] wrote: Convert kmalloc to kzalloc() and get rid of the memset(). I split this into separate ext3/jbd and ext4/jbd2 patches. It's generally better to raise separate patches, please - the ext3 patches I'll merge directly but the ext4 patches should go through (and be against) the ext4 devel tree. I fixed lots of rejects against the already-pending changes to these filesystems. You forgot to remove the memsets in both start_this_handle()s. - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] JBD/ext34 cleanups: convert to kzalloc
On Wed, 2007-09-26 at 12:54 -0700, Andrew Morton wrote: On Fri, 21 Sep 2007 16:13:56 -0700 Mingming Cao [EMAIL PROTECTED] wrote: Convert kmalloc to kzalloc() and get rid of the memset(). I split this into separate ext3/jbd and ext4/jbd2 patches. It's generally better to raise separate patches, please - the ext3 patches I'll merge directly but the ext4 patches should go through (and be against) the ext4 devel tree. Sure. The patches(including ext3/jbd and ext4/jbd2) were merged into ext4 devel tree already, I will remove the ext3/jbd part out of the ext4 devel tree. I fixed lots of rejects against the already-pending changes to these filesystems. You forgot to remove the memsets in both start_this_handle()s. Thanks for catching this. Mingming - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
+ jbd-config_jbd_debug-cannot-create-proc-entry-fix.patch added to -mm tree
The patch titled jbd-config_jbd_debug-cannot-create-proc-entry-fix has been added to the -mm tree. Its filename is jbd-config_jbd_debug-cannot-create-proc-entry-fix.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this -- Subject: jbd-config_jbd_debug-cannot-create-proc-entry-fix From: Andrew Morton [EMAIL PROTECTED] - use `#ifdef foo' instead of `#if defined(foo)' - CONFIG_JBD_DEBUG depends on CONFIG_DEBUG_FS so we don't need to duplicate that logic in the .c file ifdefs - Make journal_enable_debug __read_mostly just for the heck of it - Make jbd_debugfs_dir and jbd_debug static - debugfs_remove(NULL) is legal: remove unneeded tests - jbd_create_debugfs_entry is a better name than create_jbd_debugfs_entry - ditto remove_jbd_debugfs_entry - C functions are preferred over macros Cc: Jose R. Santos [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Cc: Jan Kara [EMAIL PROTECTED] Cc: Jose R. Santos [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- diff -puN fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry-fix fs/jbd/journal.c --- a/fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry-fix +++ a/fs/jbd/journal.c @@ -1853,16 +1853,15 @@ void journal_put_journal_head(struct jou /* * debugfs tunables */ -#if defined(CONFIG_JBD_DEBUG) -u8 journal_enable_debug; -EXPORT_SYMBOL(journal_enable_debug); -#endif +#ifdef CONFIG_JBD_DEBUG -#if defined(CONFIG_JBD_DEBUG) defined(CONFIG_DEBUG_FS) +u8 journal_enable_debug __read_mostly; +EXPORT_SYMBOL(journal_enable_debug); -struct dentry *jbd_debugfs_dir, *jbd_debug; +static struct dentry *jbd_debugfs_dir; +static struct dentry *jbd_debug; -static void __init create_jbd_debugfs_entry(void) +static void __init jbd_create_debugfs_entry(void) { jbd_debugfs_dir = debugfs_create_dir(jbd, NULL); if (jbd_debugfs_dir) @@ -1871,18 +1870,21 @@ static void __init create_jbd_debugfs_en journal_enable_debug); } -static void __exit remove_jbd_debugfs_entry(void) +static void __exit jbd_remove_debugfs_entry(void) { - if (jbd_debug) - debugfs_remove(jbd_debug); - if (jbd_debugfs_dir) - debugfs_remove(jbd_debugfs_dir); + debugfs_remove(jbd_debug); + debugfs_remove(jbd_debugfs_dir); } #else -#define create_jbd_debugfs_entry() do {} while (0) -#define remove_jbd_debugfs_entry() do {} while (0) +static inline void jbd_create_debugfs_entry(void) +{ +} + +static inline void jbd_remove_debugfs_entry(void) +{ +} #endif @@ -1940,7 +1942,7 @@ static int __init journal_init(void) ret = journal_init_caches(); if (ret != 0) journal_destroy_caches(); - create_jbd_debugfs_entry(); + jbd_create_debugfs_entry(); return ret; } @@ -1951,7 +1953,7 @@ static void __exit journal_exit(void) if (n) printk(KERN_EMERG JBD: leaked %d journal_heads!\n, n); #endif - remove_jbd_debugfs_entry(); + jbd_remove_debugfs_entry(); journal_destroy_caches(); } _ Patches currently in -mm which might be from [EMAIL PROTECTED] are missing-null-termination-in-one-wire-uevent.patch acpi-suspend-move-acpi_sleep_prepare-outside-of-config_suspend.patch acpi-suspend-fix-acpi_sleep-states.patch fix-oops-in-platform-uevent.patch slow-down-printk-during-boot.patch slow-down-printk-during-boot-fix-2.patch acpi-add-reboot-mechanism.patch acpi-suppress-uninitialized-var-warning.patch git-alsa.patch working-3d-dri-intel-agpko-resume-for-i815-chip.patch git-arm.patch git-cifs-build-fix.patch powerpc-proper-defconfig-for-crosscompiles-fix.patch revert-gregkh-driver-warn-when-statically-allocated-kobjects-are-used.patch fix-gregkh-driver-kobject-remove-the-static-array-for-the-name.patch fix-2--gregkh-driver-drivers-clean-up-direct-setting-of-the-name-of-a-kset.patch fix-gregkh-driver-drivers-clean-up-direct-setting-of-the-name-of-a-kset.patch git-dvb.patch git-dvb-fixup-2.patch git-dvb-build-fix.patch git-hwmon-fixup.patch git-infiniband.patch infiniband-work-around-gcc-slub-problem.patch git-input.patch git-input-fixup.patch adbhid-produce-all-capslock-key-events.patch console-keyboard-events-and-accessibility-fix.patch console-keyboard-events-and-accessibility-fix-2.patch first-stab-at-elantech-touchpad-driver-for-26226-testers-fix.patch git-jg-misc-fix.patch git-jg-warning-fixes.patch git-kbuild.patch git-kbuild-fixup.patch git-kvm.patch git-libata-all.patch ide-arm-hack.patch git-mips.patch git-mmc.patch git-mmc-fixup2.patch mmc-fix-gregkh-driver-driver-core-change-add_uevent_var-to-use-a-struct.patch gregkh-driver-driver-core-change-add_uevent_var-to-use-a-struct-vs-git-mmc.patch git-mtd.patch git-mtd-vs-powerpc.patch git-net.patch
Re: jbd : config_jbd_debug cannot create /proc entry
On Tue, 25 Sep 2007 16:36:08 +0200 Jan Kara [EMAIL PROTECTED] wrote: On Tue, 25 Sep 2007 07:49:38 -0500 Jose R. Santos [EMAIL PROTECTED] wrote: On Tue, 25 Sep 2007 13:50:46 +0200 Jan Kara [EMAIL PROTECTED] wrote: Jan Kara wrote: -#define create_jbd_proc_entry() do {} while (0) -#define remove_jbd_proc_entry() do {} while (0) +static ctl_table fs_table[] = { +{ +.ctl_name = -1, /* Don't want it */ shouldn't this be CTL_UNNUMBERED ? Oh, it should be. I didn't notice we have this :) Thanks for notifying me. Attached is a fixed version. This was fixed in JBD2 by moving the jbd-debug file to debugfs: http://lkml.org/lkml/2007/7/11/334 Since this code is already in the kernel, we should keep it consistent. OK. Here's a quick patch to fix this. Adapted from the JBD2 patch. Let me know what you think. Looks fine - exactly what I've just done here :). hm. I found rather a lot of issues. If this patch is derived from the JBD2 patch then perhaps the JBD2 patch needs some looking at. Signed-off-by: Jose R. Santos [EMAIL PROTECTED] You can add Signed-off-by: Jan Kara [EMAIL PROTECTED] I suspect you might be getting your signed-off-bys and acked-bys mixed up. (If not this patch, then the previous one). Please see Documentation/SubmittingPatches section 13 for the difference. Jose, please review and if possible runtime test these proposed changes? From: Andrew Morton [EMAIL PROTECTED] - use `#ifdef foo' instead of `#if defined(foo)' - CONFIG_JBD_DEBUG depends on CONFIG_DEBUG_FS so we don't need to duplicate that logic in the .c file ifdefs - Make journal_enable_debug __read_mostly just for the heck of it - Make jbd_debugfs_dir and jbd_debug static - debugfs_remove(NULL) is legal: remove unneeded tests - jbd_create_debugfs_entry is a better name than create_jbd_debugfs_entry - ditto remove_jbd_debugfs_entry - C functions are preferred over macros Cc: Jose R. Santos [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Cc: Jan Kara [EMAIL PROTECTED] Cc: Jose R. Santos [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- diff -puN fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry-fix fs/jbd/journal.c --- a/fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry-fix +++ a/fs/jbd/journal.c @@ -1853,16 +1853,15 @@ void journal_put_journal_head(struct jou /* * debugfs tunables */ -#if defined(CONFIG_JBD_DEBUG) -u8 journal_enable_debug; -EXPORT_SYMBOL(journal_enable_debug); -#endif +#ifdef CONFIG_JBD_DEBUG -#if defined(CONFIG_JBD_DEBUG) defined(CONFIG_DEBUG_FS) +u8 journal_enable_debug __read_mostly; +EXPORT_SYMBOL(journal_enable_debug); -struct dentry *jbd_debugfs_dir, *jbd_debug; +static struct dentry *jbd_debugfs_dir; +static struct dentry *jbd_debug; -static void __init create_jbd_debugfs_entry(void) +static void __init jbd_create_debugfs_entry(void) { jbd_debugfs_dir = debugfs_create_dir(jbd, NULL); if (jbd_debugfs_dir) @@ -1871,18 +1870,21 @@ static void __init create_jbd_debugfs_en journal_enable_debug); } -static void __exit remove_jbd_debugfs_entry(void) +static void __exit jbd_remove_debugfs_entry(void) { - if (jbd_debug) - debugfs_remove(jbd_debug); - if (jbd_debugfs_dir) - debugfs_remove(jbd_debugfs_dir); + debugfs_remove(jbd_debug); + debugfs_remove(jbd_debugfs_dir); } #else -#define create_jbd_debugfs_entry() do {} while (0) -#define remove_jbd_debugfs_entry() do {} while (0) +static inline void jbd_create_debugfs_entry(void) +{ +} + +static inline void jbd_remove_debugfs_entry(void) +{ +} #endif @@ -1940,7 +1942,7 @@ static int __init journal_init(void) ret = journal_init_caches(); if (ret != 0) journal_destroy_caches(); - create_jbd_debugfs_entry(); + jbd_create_debugfs_entry(); return ret; } @@ -1951,7 +1953,7 @@ static void __exit journal_exit(void) if (n) printk(KERN_EMERG JBD: leaked %d journal_heads!\n, n); #endif - remove_jbd_debugfs_entry(); + jbd_remove_debugfs_entry(); journal_destroy_caches(); } _ - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
+ jbd-config_jbd_debug-cannot-create-proc-entry.patch added to -mm tree
The patch titled jbd: config_jbd_debug cannot create /proc entry has been added to the -mm tree. Its filename is jbd-config_jbd_debug-cannot-create-proc-entry.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this -- Subject: jbd: config_jbd_debug cannot create /proc entry From: Jose R. Santos [EMAIL PROTECTED] The jbd-debug file used to be located in /proc/sys/fs/jbd-debug, but create_proc_entry() does not do lookups on file names that are more that one directory deep. This causes the entry creation to fail and hence, no proc file is created. Instead of fixing this on procfs might as well move the jbd2-debug file to debugfs which would be the preferred location for this kind of tunable. The new location is now /sys/kernel/debug/jbd/jbd-debug. Signed-off-by: Jose R. Santos [EMAIL PROTECTED] Acked-by: Jan Kara [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- diff -puN fs/Kconfig~jbd-config_jbd_debug-cannot-create-proc-entry fs/Kconfig --- a/fs/Kconfig~jbd-config_jbd_debug-cannot-create-proc-entry +++ a/fs/Kconfig @@ -219,7 +219,7 @@ config JBD config JBD_DEBUG bool JBD (ext3) debugging support - depends on JBD + depends on JBD DEBUG_FS help If you are using the ext3 journaled file system (or potentially any other file system/device using JBD), this option allows you to @@ -228,10 +228,10 @@ config JBD_DEBUG debugging output will be turned off. If you select Y here, then you will be able to turn on debugging - with echo N /proc/sys/fs/jbd-debug, where N is a number between - 1 and 5, the higher the number, the more debugging output is - generated. To turn debugging off again, do - echo 0 /proc/sys/fs/jbd-debug. + with echo N /sys/kernel/debug/jbd/jbd-debug, where N is a + number between 1 and 5, the higher the number, the more debugging + output is generated. To turn debugging off again, do + echo 0 /sys/kernel/debug/jbd/jbd-debug. config JBD2 tristate diff -puN fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry fs/jbd/journal.c --- a/fs/jbd/journal.c~jbd-config_jbd_debug-cannot-create-proc-entry +++ a/fs/jbd/journal.c @@ -35,6 +35,7 @@ #include linux/kthread.h #include linux/poison.h #include linux/proc_fs.h +#include linux/debugfs.h #include asm/uaccess.h #include asm/page.h @@ -1850,63 +1851,38 @@ void journal_put_journal_head(struct jou } /* - * /proc tunables + * debugfs tunables */ #if defined(CONFIG_JBD_DEBUG) -int journal_enable_debug; +u8 journal_enable_debug; EXPORT_SYMBOL(journal_enable_debug); #endif -#if defined(CONFIG_JBD_DEBUG) defined(CONFIG_PROC_FS) +#if defined(CONFIG_JBD_DEBUG) defined(CONFIG_DEBUG_FS) -static struct proc_dir_entry *proc_jbd_debug; +struct dentry *jbd_debugfs_dir, *jbd_debug; -static int read_jbd_debug(char *page, char **start, off_t off, - int count, int *eof, void *data) +static void __init create_jbd_debugfs_entry(void) { - int ret; - - ret = sprintf(page + off, %d\n, journal_enable_debug); - *eof = 1; - return ret; -} - -static int write_jbd_debug(struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - char buf[32]; - - if (count ARRAY_SIZE(buf) - 1) - count = ARRAY_SIZE(buf) - 1; - if (copy_from_user(buf, buffer, count)) - return -EFAULT; - buf[ARRAY_SIZE(buf) - 1] = '\0'; - journal_enable_debug = simple_strtoul(buf, NULL, 10); - return count; -} - -#define JBD_PROC_NAME sys/fs/jbd-debug - -static void __init create_jbd_proc_entry(void) -{ - proc_jbd_debug = create_proc_entry(JBD_PROC_NAME, 0644, NULL); - if (proc_jbd_debug) { - /* Why is this so hard? */ - proc_jbd_debug-read_proc = read_jbd_debug; - proc_jbd_debug-write_proc = write_jbd_debug; - } + jbd_debugfs_dir = debugfs_create_dir(jbd, NULL); + if (jbd_debugfs_dir) + jbd_debug = debugfs_create_u8(jbd-debug, S_IRUGO, + jbd_debugfs_dir, + journal_enable_debug); } -static void __exit remove_jbd_proc_entry(void) +static void __exit remove_jbd_debugfs_entry(void) { - if (proc_jbd_debug) - remove_proc_entry(JBD_PROC_NAME, NULL); + if (jbd_debug) + debugfs_remove(jbd_debug); + if (jbd_debugfs_dir) + debugfs_remove(jbd_debugfs_dir); } #else -#define create_jbd_proc_entry() do {} while (0) -#define remove_jbd_proc_entry() do {} while (0) +#define create_jbd_debugfs_entry()
+ jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug.patch added to -mm tree
The patch titled JBD: Fix JBD warnings when compiling with CONFIG_JBD_DEBUG has been added to the -mm tree. Its filename is jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this -- Subject: JBD: Fix JBD warnings when compiling with CONFIG_JBD_DEBUG From: Jose R. Santos [EMAIL PROTECTED] Note from Mingming's JBD2 fix: Noticed all warnings are occurs when the debug level is 0. Then found the jbd2: Move jbd2-debug file to debugfs patch http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f49d5d019afa4e94253bfc92f0daca3badb990b changed the jbd2_journal_enable_debug from int type to u8, makes the jbd_debug comparision is always true when the debugging level is 0. Thus the compile warning occurs. Thought about changing the jbd2_journal_enable_debug data type back to int, but can't, because the jbd2-debug is moved to debug fs, where calling debugfs_create_u8() to create the debugfs entry needs the value to be u8 type. Even if we changed the data type back to int, the code is still buggy, kernel should not print jbd2 debug message if the jbd2_journal_enable_debug is set to 0. But this is not the case. The fix is change the level of debugging to 1. The same should fixed in ext3/JBD, but currently ext3 jbd-debug via /proc fs is broken, so we probably should fix it all together. Signed-off-by: Jose R. Santos [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- diff -puN fs/ext3/inode.c~jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug fs/ext3/inode.c --- a/fs/ext3/inode.c~jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug +++ a/fs/ext3/inode.c @@ -2954,7 +2954,7 @@ int ext3_write_inode(struct inode *inode return 0; if (ext3_journal_current_handle()) { - jbd_debug(0, called recursively, non-PF_MEMALLOC!\n); + jbd_debug(1, called recursively, non-PF_MEMALLOC!\n); dump_stack(); return -EIO; } diff -puN fs/jbd/recovery.c~jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug fs/jbd/recovery.c --- a/fs/jbd/recovery.c~jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug +++ a/fs/jbd/recovery.c @@ -250,10 +250,10 @@ int journal_recover(journal_t *journal) if (!err) err = do_one_pass(journal, info, PASS_REPLAY); - jbd_debug(0, JBD: recovery, exit status %d, + jbd_debug(1, JBD: recovery, exit status %d, recovered transactions %u to %u\n, err, info.start_transaction, info.end_transaction); - jbd_debug(0, JBD: Replayed %d and revoked %d/%d blocks\n, + jbd_debug(1, JBD: Replayed %d and revoked %d/%d blocks\n, info.nr_replays, info.nr_revoke_hits, info.nr_revokes); /* Restart the log at the next transaction ID, thus invalidating @@ -297,7 +297,7 @@ int journal_skip_recovery(journal_t *jou #ifdef CONFIG_JBD_DEBUG int dropped = info.end_transaction - be32_to_cpu(sb-s_sequence); #endif - jbd_debug(0, + jbd_debug(1, JBD: ignoring %d transaction%s from the journal.\n, dropped, (dropped == 1) ? : s); journal-j_transaction_sequence = ++info.end_transaction; _ Patches currently in -mm which might be from [EMAIL PROTECTED] are jbd-config_jbd_debug-cannot-create-proc-entry.patch jbd-config_jbd_debug-cannot-create-proc-entry-fix.patch jbd-fix-jbd-warnings-when-compiling-with-config_jbd_debug.patch ext4-flex_bg-kernel-support-v2.patch - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, RFC] add fsck to util-linux
On Sep 26, 2007 13:05 +0100, Christoph Hellwig wrote: On Wed, Sep 26, 2007 at 06:59:46AM -0400, Theodore Tso wrote: BTW, I don't like this syntax in the fstab file AT ALL, but it is in use in the wild by at least some Fedora users, and it's not documented in the fstab man page. I'd suggest using a filesystem type of bind, rather than ext3, as the officially blessed way of specifying it in fstab, but it badly needs to be documented in the fstab and/or mount man pages. The above patch should probably get included, though, and backwards compatibility for allowing bind to be specified in the mount options, and with a warning message that the specifying bind in the options field has been deprecated. The syntax is indeed horrible. Is it supported by upstream util-linux? I think the issue is that if a filesystem is put into /etc/fstab with type = bind then it will show up in /etc/mtab as bind and if the original filesystem is unmounted the mount output will not show the correct type anymore (I tested this with bind and reiserfs on an ext3 filesystem). Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc. - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH, RFC] add fsck to util-linux
On Wed, Sep 26, 2007 at 01:05:33PM +0100, Christoph Hellwig wrote: - make mount/fsck use libvolume_id unconditionally for detecting the filesystem type. There's absolute no reason to use anything in libblkid for this, and caching the result doesn't help us at all as we're going to touch the disk anyway as part of the mount/fsck. - make libblkid use libvolume_id internally for filesystem detection No, that's not true, since on a non-udev system (and there are those, including a number of kernel hackers, who don't use udev for a number of reasons --- like not trusting the sysfs/udev breakages, and who want a static /dev) you need an efficient way to do lookup by UUID or by LABEL without needing to search every single device. If you have a some large storage box with 30,000 LUN's, you don't want to search them all at boot time, whether you are using udev, especially if you are only mounting a small subset of the images on demand. So there will be circumstances where you really will want to use the cache, and *not* want to use /dev/disk/by-* as the lookup mechanism. - Ted - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Ext4 patch queue updated(2.6.23-rc8)
http://repo.or.cz/w/ext4-patch-queue.git Changes + Add large block support back, updated patches to fix rec_len overflow issue with 64k blk size from Jan Kara split ext234_enlarge_blocksize.patch to three patches, one for each filesystem type Fix compile warning with jbd-stats-through-procfs split jbd_kmalloc_kzalloc.patch into two patches for ext3/jbd and ext4/jbd2 to sync with what in mm tree +Add jbd2-fix-commit-code-to-properly-abort-journal.patch from Jan kara +Added New patch set :Introduce le32_t and le16_t, from Aneesh - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
- ext4-uninitialized-block-groups-fix.patch removed from -mm tree
The patch titled Ext4: Uninitialized Block Groups (fix) has been removed from the -mm tree. Its filename was ext4-uninitialized-block-groups-fix.patch This patch was dropped because it was merged into mainline or a subsystem tree -- Subject: Ext4: Uninitialized Block Groups (fix) From: Avantika Mathur [EMAIL PROTECTED] Andreas Dilger wrote: On Sep 18, 2007 20:03 -0700, Andrew Morton wrote: On Tue, 18 Sep 2007 17:25:31 -0700 Avantika Mathur [EMAIL PROTECTED] wrote: +#if !defined(CONFIG_CRC16) +/** CRC table for the CRC-16. The poly is 0x8005 (x16 + x15 + x2 + 1) */ +__u16 const crc16_table[256] = { me + 0x, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, That's rather sad. A plain old depends on would be better. My bad. We wrote this patch and it had to run on older kernels that might not even have lib/crc16.c (it was added around 2.6.15 or so, so e.g. RHEL4 doesn't have it). I forgot to remove it from the upstream submission, and since it didn't cause problems nobody else complained... The incremental patch below removes the local crc16 code, and also resolves an issue with properly updating bg_itable_unused when an inode is allocated in an unused block groups. Cc: Andreas Dilger [EMAIL PROTECTED] Cc: Avantika Mathur [EMAIL PROTECTED] Cc: Mingming Cao [EMAIL PROTECTED] Cc: Aneesh Kumar K.V [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- fs/Kconfig |1 fs/ext4/ialloc.c |8 ++- fs/ext4/super.c | 51 - 3 files changed, 9 insertions(+), 51 deletions(-) diff -puN fs/ext4/ialloc.c~ext4-uninitialized-block-groups-fix fs/ext4/ialloc.c --- a/fs/ext4/ialloc.c~ext4-uninitialized-block-groups-fix +++ a/fs/ext4/ialloc.c @@ -632,12 +632,18 @@ got: if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) { if (gdp-bg_flags cpu_to_le16(EXT4_BG_INODE_UNINIT)) { gdp-bg_flags = cpu_to_le16(~EXT4_BG_INODE_UNINIT); - free = EXT4_INODES_PER_GROUP(sb); + free = 0; } else { free = EXT4_INODES_PER_GROUP(sb) - le16_to_cpu(gdp-bg_itable_unused); } + /* +* Check the relative inode number against the last used +* relative inode number in this group. if it is greater +* we need to update the bg_itable_unused count +* +*/ if (ino free) gdp-bg_itable_unused = cpu_to_le16(EXT4_INODES_PER_GROUP(sb) - ino); diff -puN fs/ext4/super.c~ext4-uninitialized-block-groups-fix fs/ext4/super.c --- a/fs/ext4/super.c~ext4-uninitialized-block-groups-fix +++ a/fs/ext4/super.c @@ -37,6 +37,7 @@ #include linux/quotaops.h #include linux/seq_file.h #include linux/log2.h +#include linux/crc16.h #include asm/uaccess.h @@ -1337,56 +1338,6 @@ static int ext4_setup_super(struct super return res; } -#if !defined(CONFIG_CRC16) -/** CRC table for the CRC-16. The poly is 0x8005 (x16 + x15 + x2 + 1) */ -__u16 const crc16_table[256] = { - 0x, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, -
- introduce-ext4_find_next_bit.patch removed from -mm tree
The patch titled Introduce ext4_find_next_bit has been removed from the -mm tree. Its filename was introduce-ext4_find_next_bit.patch This patch was dropped because it was merged into mainline or a subsystem tree -- Subject: Introduce ext4_find_next_bit From: Aneesh Kumar K.V [EMAIL PROTECTED] Also add generic_find_next_le_bit This gets used by the ext4 multi block allocator patches. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- include/asm-generic/bitops/ext2-non-atomic.h |2 include/asm-generic/bitops/le.h |4 + include/asm-powerpc/bitops.h |4 + include/linux/ext4_fs.h |1 lib/find_next_bit.c | 44 + 5 files changed, 55 insertions(+) diff -puN include/asm-generic/bitops/ext2-non-atomic.h~introduce-ext4_find_next_bit include/asm-generic/bitops/ext2-non-atomic.h --- a/include/asm-generic/bitops/ext2-non-atomic.h~introduce-ext4_find_next_bit +++ a/include/asm-generic/bitops/ext2-non-atomic.h @@ -14,5 +14,7 @@ generic_find_first_zero_le_bit((unsigned long *)(addr), (size)) #define ext2_find_next_zero_bit(addr, size, off) \ generic_find_next_zero_le_bit((unsigned long *)(addr), (size), (off)) +#define ext2_find_next_bit(addr, size, off) \ + generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) #endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */ diff -puN include/asm-generic/bitops/le.h~introduce-ext4_find_next_bit include/asm-generic/bitops/le.h --- a/include/asm-generic/bitops/le.h~introduce-ext4_find_next_bit +++ a/include/asm-generic/bitops/le.h @@ -20,6 +20,8 @@ #define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr) #define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset) +#define generic_find_next_le_bit(addr, size, offset) \ + find_next_bit(addr, size, offset) #elif defined(__BIG_ENDIAN) @@ -42,6 +44,8 @@ extern unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset); +extern unsigned long generic_find_next_le_bit(const unsigned long *addr, + unsigned long size, unsigned long offset); #else #error Please fix asm/byteorder.h diff -puN include/asm-powerpc/bitops.h~introduce-ext4_find_next_bit include/asm-powerpc/bitops.h --- a/include/asm-powerpc/bitops.h~introduce-ext4_find_next_bit +++ a/include/asm-powerpc/bitops.h @@ -310,6 +310,8 @@ static __inline__ int test_le_bit(unsign unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset); +unsigned long generic_find_next_le_bit(const unsigned long *addr, + unsigned long size, unsigned long offset); /* Bitmap functions for the ext2 filesystem */ #define ext2_set_bit(nr,addr) \ @@ -329,6 +331,8 @@ unsigned long generic_find_next_zero_le_ #define ext2_find_next_zero_bit(addr, size, off) \ generic_find_next_zero_le_bit((unsigned long*)addr, size, off) +#define ext2_find_next_bit(addr, size, off) \ + generic_find_next_le_bit((unsigned long *)addr, size, off) /* Bitmap functions for the minix filesystem. */ #define minix_test_and_set_bit(nr,addr) \ diff -puN include/linux/ext4_fs.h~introduce-ext4_find_next_bit include/linux/ext4_fs.h --- a/include/linux/ext4_fs.h~introduce-ext4_find_next_bit +++ a/include/linux/ext4_fs.h @@ -492,6 +492,7 @@ do { \ #define ext4_test_bit ext2_test_bit #define ext4_find_first_zero_bit ext2_find_first_zero_bit #define ext4_find_next_zero_bitext2_find_next_zero_bit +#define ext4_find_next_bit ext2_find_next_bit /* * Maximal mount counts between two filesystem checks diff -puN lib/find_next_bit.c~introduce-ext4_find_next_bit lib/find_next_bit.c --- a/lib/find_next_bit.c~introduce-ext4_find_next_bit +++ a/lib/find_next_bit.c @@ -178,4 +178,48 @@ found_middle_swap: EXPORT_SYMBOL(generic_find_next_zero_le_bit); +unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned + long size, unsigned long offset) +{ + const unsigned long *p = addr + BITOP_WORD(offset); + unsigned long result = offset ~(BITS_PER_LONG - 1); + unsigned long tmp; + + if (offset = size) + return size; + size -= result; + offset = (BITS_PER_LONG - 1UL); + if (offset) { + tmp = ext2_swabp(p++); + tmp = (~0UL offset); + if (size BITS_PER_LONG) + goto found_first; + if (tmp) + goto found_middle; +
Re: jbd : config_jbd_debug cannot create /proc entry
On Wed, 26 Sep 2007 14:35:39 -0700 Andrew Morton [EMAIL PROTECTED] wrote: On Tue, 25 Sep 2007 16:36:08 +0200 Jan Kara [EMAIL PROTECTED] wrote: On Tue, 25 Sep 2007 07:49:38 -0500 Jose R. Santos [EMAIL PROTECTED] wrote: On Tue, 25 Sep 2007 13:50:46 +0200 Jan Kara [EMAIL PROTECTED] wrote: Jan Kara wrote: -#define create_jbd_proc_entry() do {} while (0) -#define remove_jbd_proc_entry() do {} while (0) +static ctl_table fs_table[] = { + { +.ctl_name = -1, /* Don't want it */ shouldn't this be CTL_UNNUMBERED ? Oh, it should be. I didn't notice we have this :) Thanks for notifying me. Attached is a fixed version. This was fixed in JBD2 by moving the jbd-debug file to debugfs: http://lkml.org/lkml/2007/7/11/334 Since this code is already in the kernel, we should keep it consistent. OK. Here's a quick patch to fix this. Adapted from the JBD2 patch. Let me know what you think. Looks fine - exactly what I've just done here :). hm. I found rather a lot of issues. If this patch is derived from the JBD2 patch then perhaps the JBD2 patch needs some looking at. Some of the changes do apply to the JBD2 patch. I'll send a cleanup patch. Signed-off-by: Jose R. Santos [EMAIL PROTECTED] You can add Signed-off-by: Jan Kara [EMAIL PROTECTED] I suspect you might be getting your signed-off-bys and acked-bys mixed up. (If not this patch, then the previous one). Please see Documentation/SubmittingPatches section 13 for the difference. Jose, please review and if possible runtime test these proposed changes? Agree with all the changes and they worked as expected on my system. From: Andrew Morton [EMAIL PROTECTED] - use `#ifdef foo' instead of `#if defined(foo)' - CONFIG_JBD_DEBUG depends on CONFIG_DEBUG_FS so we don't need to duplicate that logic in the .c file ifdefs - Make journal_enable_debug __read_mostly just for the heck of it - Make jbd_debugfs_dir and jbd_debug static - debugfs_remove(NULL) is legal: remove unneeded tests - jbd_create_debugfs_entry is a better name than create_jbd_debugfs_entry - ditto remove_jbd_debugfs_entry - C functions are preferred over macros Cc: Jose R. Santos [EMAIL PROTECTED] Cc: linux-ext4@vger.kernel.org Cc: Jan Kara [EMAIL PROTECTED] Cc: Jose R. Santos [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Acked-by: Jose R. Santos [EMAIL PROTECTED] -JRS - To unsubscribe from this list: send the line unsubscribe linux-ext4 in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html