From 6c55653ed07c4e4c98efdad7693a9543a41d591b Mon Sep 17 00:00:00 2001 From: Bob Glossman Date: Mon, 2 Feb 2015 16:39:07 -0800 Subject: [PATCH] LU-6199 ldiskfs: delete bad WARN_ON_ONCE from ldiskfs 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 Change-Id: Ia375a6d851a5262c578d722e2f8f4db2ea5249b7 Reviewed-on: http://review.whamcloud.com/13604 Tested-by: Jenkins Reviewed-by: Yang Sheng Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- .../patches/rhel6.6/ext4-remove-truncate-warning.patch | 17 +++++++++++++++++ .../kernel_patches/series/ldiskfs-2.6-rhel6.6.series | 1 + 2 files changed, 18 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/rhel6.6/ext4-remove-truncate-warning.patch 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 index 0000000..a77d5b9 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel6.6/ext4-remove-truncate-warning.patch @@ -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; diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series index ca8935d..fefd631 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series @@ -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.6/ext4-remove-truncate-warning.patch -- 1.8.3.1