Whamcloud - gitweb
LU-6199 ldiskfs: delete bad WARN_ON_ONCE from ldiskfs 04/13604/5
authorBob Glossman <bob.glossman@intel.com>
Tue, 3 Feb 2015 00:39:07 +0000 (16:39 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 10 Feb 2015 18:02:31 +0000 (18:02 +0000)
lustre needs to call certain ext4/ldiskfs entry points without locking
i_mutex in order to avoid deadlocks.  This triggers a warning check
in ext4 code new in el6.6, not present in el6.5.  Already fixed
in ldiskfs patches for future kernel versions, but wasn't fixed for
el6.6

This mod adds an ldiskfs patch to eliminate the warning.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ia375a6d851a5262c578d722e2f8f4db2ea5249b7
Reviewed-on: http://review.whamcloud.com/13604
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
ldiskfs/kernel_patches/patches/rhel6.6/ext4-remove-truncate-warning.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series

diff --git a/ldiskfs/kernel_patches/patches/rhel6.6/ext4-remove-truncate-warning.patch b/ldiskfs/kernel_patches/patches/rhel6.6/ext4-remove-truncate-warning.patch
new file mode 100644 (file)
index 0000000..a77d5b9
--- /dev/null
@@ -0,0 +1,17 @@
+Invoking ext4_truncate with i_mutex locked will cause a deadlock
+in lustre. Since lustre has own lock to provide protection we don't
+need this check at all.
+
+Index: linux-2.6.32-504.el6.x86_64/fs/ext4/inode.c
+===================================================================
+--- linux-2.6.32-504.el6.x86_64.orig/fs/ext4/inode.c
++++ linux-3.10.0-504.el6.x86_64/fs/ext4/inode.c
+@@ -3934,8 +3934,6 @@ void ext4_end_io_work(struct work_struct
+ int ext4_flush_unwritten_io(struct inode *inode)
+ {
+       int ret;
+-      WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex) &&
+-                   !(inode->i_state & I_FREEING));
+       ret = ext4_do_flush_completed_IO(inode, NULL);
+       ext4_unwritten_wait(inode);
+       return ret;
index ca8935d..fefd631 100644 (file)
@@ -48,3 +48,4 @@ rhel6.4/ext4-max-dir-size-options.patch
 rhel6.3/ext4-not-discard-preallocation-umount.patch
 rhel6.3/ext4-journal-path-opt.patch
 rhel6.3/ext4-drop-inode-from-orphan-list-if-ext4_delete_inode-fails.patch
 rhel6.3/ext4-not-discard-preallocation-umount.patch
 rhel6.3/ext4-journal-path-opt.patch
 rhel6.3/ext4-drop-inode-from-orphan-list-if-ext4_delete_inode-fails.patch
+rhel6.6/ext4-remove-truncate-warning.patch