rpms/kernel/devel linux-2.6-ext4-ENOSPC-debug.patch, NONE, 1.1 kernel.spec, 1.1302, 1.1303

Eric Sandeen sandeen at fedoraproject.org
Mon Feb 16 21:16:40 UTC 2009


Author: sandeen

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14000

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ext4-ENOSPC-debug.patch 
Log Message:
* Mon Feb 16 2009 Eric Sandeen <sandeen at redhat.com>
- Add ext4 debug patch for ENOSPC issue


linux-2.6-ext4-ENOSPC-debug.patch:

--- NEW FILE linux-2.6-ext4-ENOSPC-debug.patch ---
Author: Theodore Ts'o <tytso at mit.edu>
Date:   Mon Feb 16 13:51:16 2009 -0500

    ext4: Add fallback for find_group_flex
    
    This is a workaround for find_group_flex() which badly needs to be
    replaced.  One of its problems (besides ignoring the Orlov algorithm)
    is that it is a bit hyperactive about returning failure under
    suspicious circumstances.  This can lead to spurious ENOSPC failures.
    Work around this for now by retrying the search using
    find_group_other() if find_group_flex() returns -1.  If
    find_group_other() succeeds when find_group_flex(), log a warning
    message.  I can't quite find the motivation to spend effort working on
    fixing find_group_flex() given that I want to replace it all anyway
    (and in fact work on the replacement code is underway), so we may
    leave the workaround for as long as find_group_flex() stays in the
    kernel...
    
    Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index a200059..21080ab 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -715,6 +715,13 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
 
 	if (sbi->s_log_groups_per_flex) {
 		ret2 = find_group_flex(sb, dir, &group);
+		if (ret2 == -1) {
+			ret2 = find_group_other(sb, dir, &group);
+			if (ret2 == 0)
+				printk(KERN_NOTICE "ext4: find_group_flex "
+				       "failed, fallback succeeded dir %lu\n",
+				       dir->i_ino);
+		}
 		goto got_group;
 	}


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1302
retrieving revision 1.1303
diff -u -r1.1302 -r1.1303
--- kernel.spec	16 Feb 2009 20:38:23 -0000	1.1302
+++ kernel.spec	16 Feb 2009 21:16:09 -0000	1.1303
@@ -623,6 +623,7 @@
 Patch580: linux-2.6-sparc-selinux-mprotect-checks.patch
 
 Patch590: linux-2.6-ext4-write-cyclic-fix.patch
+Patch591: linux-2.6-ext4-ENOSPC-debug.patch
 
 Patch600: linux-2.6-defaults-alsa-hda-beep-off.patch
 
@@ -1058,6 +1059,7 @@
 
 # ext4
 ApplyPatch linux-2.6-ext4-write-cyclic-fix.patch
+ApplyPatch linux-2.6-ext4-ENOSPC-debug.patch
 
 # xfs
 
@@ -1751,6 +1753,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Mon Feb 16 2009 Eric Sandeen <sandeen at redhat.com>
+- Add ext4 debug patch for ENOSPC issue
+
 * Mon Feb 16 2009 Kristian Høgsberg <krh at redhat.com>
 - Flip the switch on intel KMS.
 




More information about the fedora-extras-commits mailing list