diff options
Diffstat (limited to 'sys-cluster/lustre')
-rw-r--r-- | sys-cluster/lustre/ChangeLog | 30 | ||||
-rw-r--r-- | sys-cluster/lustre/files/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch | 446 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch (renamed from sys-cluster/lustre/files/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch) | 20 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch | 242 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch (renamed from sys-cluster/lustre/files/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch) | 6 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch (renamed from sys-cluster/lustre/files/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch) | 22 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch (renamed from sys-cluster/lustre/files/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch) | 12 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch (renamed from sys-cluster/lustre/files/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch) | 32 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch (renamed from sys-cluster/lustre/files/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch) | 20 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch (renamed from sys-cluster/lustre/files/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch) | 6 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch (renamed from sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch) | 26 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch (renamed from sys-cluster/lustre/files/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch) | 20 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch (renamed from sys-cluster/lustre/files/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch) | 2 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch (renamed from sys-cluster/lustre/files/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch) | 16 | ||||
-rw-r--r-- | sys-cluster/lustre/files/2.4/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch (renamed from sys-cluster/lustre/files/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch) | 10 | ||||
-rw-r--r-- | sys-cluster/lustre/lustre-9999.ebuild | 28 |
16 files changed, 382 insertions, 556 deletions
diff --git a/sys-cluster/lustre/ChangeLog b/sys-cluster/lustre/ChangeLog index 129d39a56..829ab18d2 100644 --- a/sys-cluster/lustre/ChangeLog +++ b/sys-cluster/lustre/ChangeLog @@ -2,5 +2,35 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 08 Oct 2012; Alexey Shvetsov <alexxy@gentoo.org> + +files/2.4/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch, + +files/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch, + +files/2.4/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch, + +files/2.4/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch, + +files/2.4/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch, + +files/2.4/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch, + +files/2.4/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch, + +files/2.4/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch, + +files/2.4/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch, + +files/2.4/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch, + +files/2.4/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch, + +files/2.4/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch, + +files/2.4/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch, + -files/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch, + -files/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch, + -files/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch, + -files/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch, + -files/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch, + -files/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch, + -files/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch, + -files/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch, + -files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch, + -files/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch, + -files/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch, + -files/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch, + -files/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch, + lustre-9999.ebuild: + [sys-cluster/lustre] Update patches + 20 Sep 2012; Alexey Shvetsov <alexxy@gentoo.org> lustre-9999.ebuild: [sys-cluster/lustre] call apply_user_patches diff --git a/sys-cluster/lustre/files/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch b/sys-cluster/lustre/files/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch deleted file mode 100644 index 04ccefe11..000000000 --- a/sys-cluster/lustre/files/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch +++ /dev/null @@ -1,446 +0,0 @@ -From 13a22da522d306d69511e439406d2f986a596adb Mon Sep 17 00:00:00 2001 -From: Liu Xuezhao <xuezhao.liu@emc.com> -Date: Sun, 22 Jul 2012 01:07:18 +0800 -Subject: [PATCH 02/13] LU-1337 vfs: kernel 3.1 kills inode->i_alloc_sem - -Kernel 3.1 kills inode->i_alloc_sem, use i_dio_count and -inode_dio_wait/inode_dio_done instead. -(kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3). - -Add HAVE_INODE_DIO_WAIT to differentiate it. -Add INODE_DIO_LOCK_WRITE/INODE_DIO_RELEASE_WRITE, - INODE_DIO_LOCK_READ/INODE_DIO_RELEASE_READ macros. - -Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> -Change-Id: Ife36e07a85c76153985a4a86ee1973262c4c0e27 ---- - lustre/autoconf/lustre-core.m4 | 22 ++++++++++++ - lustre/include/linux/lustre_compat25.h | 18 ++++++---- - lustre/llite/llite_lib.c | 4 +-- - lustre/llite/vvp_io.c | 27 ++++++-------- - lustre/llite/vvp_page.c | 1 - - lustre/obdfilter/filter.c | 65 +++++++++++++++++----------------- - lustre/obdfilter/filter_io.c | 28 ++++++++------- - lustre/obdfilter/filter_io_26.c | 10 +++--- - lustre/osc/osc_cache.c | 6 ++-- - lustre/osd-ldiskfs/osd_io.c | 1 - - 10 files changed, 102 insertions(+), 80 deletions(-) - -diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 403add5..0aef14f 100644 ---- a/lustre/autoconf/lustre-core.m4 -+++ b/lustre/autoconf/lustre-core.m4 -@@ -1850,6 +1850,27 @@ LB_LINUX_TRY_COMPILE([ - ]) - - # -+# 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait/ -+# inode_dio_done instead. -+# see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3 -+# -+AC_DEFUN([LC_INODE_DIO_WAIT], -+[AC_MSG_CHECKING([if inode->i_alloc_sem is killed and use inode_dio_wait/done.]) -+LB_LINUX_TRY_COMPILE([ -+ #include <linux/fs.h> -+],[ -+ inode_dio_wait((struct inode *)0); -+ inode_dio_done((struct inode *)0); -+],[ -+ AC_DEFINE(HAVE_INODE_DIO_WAIT, 1, -+ [inode->i_alloc_sem is killed and use inode_dio_wait/done]) -+ AC_MSG_RESULT([yes]) -+],[ -+ AC_MSG_RESULT([no]) -+]) -+]) -+ -+# - # 3.3 introduces migrate_mode.h and migratepage has 4 args - # - AC_DEFUN([LC_HAVE_MIGRATE_HEADER], -@@ -2035,6 +2056,7 @@ AC_DEFUN([LC_PROG_LINUX], - - # 3.1 - LC_LM_XXX_LOCK_MANAGER_OPS -+ LC_INODE_DIO_WAIT - - # 3.3 - LC_HAVE_MIGRATE_HEADER -diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 41b4516..bb45125 100644 ---- a/lustre/include/linux/lustre_compat25.h -+++ b/lustre/include/linux/lustre_compat25.h -@@ -269,13 +269,17 @@ static inline int mapping_has_pages(struct address_space *mapping) - (type *)( (char *)__mptr - offsetof(type,member) );}) - #endif - --#define UP_WRITE_I_ALLOC_SEM(i) up_write(&(i)->i_alloc_sem) --#define DOWN_WRITE_I_ALLOC_SEM(i) down_write(&(i)->i_alloc_sem) --#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) LASSERT(down_read_trylock(&(i)->i_alloc_sem) == 0) -- --#define UP_READ_I_ALLOC_SEM(i) up_read(&(i)->i_alloc_sem) --#define DOWN_READ_I_ALLOC_SEM(i) down_read(&(i)->i_alloc_sem) --#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0) -+#ifdef HAVE_INODE_DIO_WAIT -+# define INODE_DIO_LOCK_WRITE(i) inode_dio_wait(i) -+# define INODE_DIO_RELEASE_WRITE(i) do {} while (0) -+# define INODE_DIO_LOCK_READ(i) atomic_inc(&(i)->i_dio_count) -+# define INODE_DIO_RELEASE_READ(i) inode_dio_done(i) -+#else -+# define INODE_DIO_LOCK_WRITE(i) down_write(&(i)->i_alloc_sem) -+# define INODE_DIO_RELEASE_WRITE(i) up_write(&(i)->i_alloc_sem) -+# define INODE_DIO_LOCK_READ(i) down_read(&(i)->i_alloc_sem) -+# define INODE_DIO_RELEASE_READ(i) up_read(&(i)->i_alloc_sem) -+#endif - - #include <linux/mpage.h> /* for generic_writepages */ - -diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c -index 9980c2c..7f3ac28 100644 ---- a/lustre/llite/llite_lib.c -+++ b/lustre/llite/llite_lib.c -@@ -1439,12 +1439,12 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr) - - if (!S_ISDIR(inode->i_mode)) { - if (ia_valid & ATTR_SIZE) -- UP_WRITE_I_ALLOC_SEM(inode); -+ INODE_DIO_RELEASE_WRITE(inode); - mutex_unlock(&inode->i_mutex); - cfs_down_write(&lli->lli_trunc_sem); - mutex_lock(&inode->i_mutex); - if (ia_valid & ATTR_SIZE) -- DOWN_WRITE_I_ALLOC_SEM(inode); -+ INODE_DIO_LOCK_WRITE(inode); - } - - /* We need a steady stripe configuration for setattr to avoid -diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c -index 50a19c9..0b4cfb5 100644 ---- a/lustre/llite/vvp_io.c -+++ b/lustre/llite/vvp_io.c -@@ -295,7 +295,7 @@ static int vvp_io_setattr_iter_init(const struct lu_env *env, - */ - mutex_unlock(&inode->i_mutex); - if (cl_io_is_trunc(ios->cis_io)) -- UP_WRITE_I_ALLOC_SEM(inode); -+ INODE_DIO_RELEASE_WRITE(inode); - cio->u.setattr.cui_locks_released = 1; - return 0; - } -@@ -348,7 +348,7 @@ static int vvp_io_setattr_trunc(const struct lu_env *env, - const struct cl_io_slice *ios, - struct inode *inode, loff_t size) - { -- DOWN_WRITE_I_ALLOC_SEM(inode); -+ INODE_DIO_LOCK_WRITE(inode); - return 0; - } - -@@ -420,7 +420,7 @@ static void vvp_io_setattr_fini(const struct lu_env *env, - if (cio->u.setattr.cui_locks_released) { - mutex_lock(&inode->i_mutex); - if (cl_io_is_trunc(io)) -- DOWN_WRITE_I_ALLOC_SEM(inode); -+ INODE_DIO_LOCK_WRITE(inode); - cio->u.setattr.cui_locks_released = 0; - } - vvp_io_fini(env, ios); -@@ -689,28 +689,26 @@ static int vvp_io_fault_start(const struct lu_env *env, - - /* must return locked page */ - if (fio->ft_mkwrite) { -- /* we grab alloc_sem to exclude truncate case. -- * Otherwise, we could add dirty pages into osc cache -- * while truncate is on-going. */ -- DOWN_READ_I_ALLOC_SEM(inode); -- -- LASSERT(cfio->ft_vmpage != NULL); -- lock_page(cfio->ft_vmpage); -+ LASSERT(cfio->ft_vmpage != NULL); -+ lock_page(cfio->ft_vmpage); - } else { - result = vvp_io_kernel_fault(cfio); - if (result != 0) - return result; - } - -- vmpage = cfio->ft_vmpage; -- LASSERT(PageLocked(vmpage)); -+ vmpage = cfio->ft_vmpage; -+ LASSERT(PageLocked(vmpage)); - - if (OBD_FAIL_CHECK(OBD_FAIL_LLITE_FAULT_TRUNC_RACE)) - ll_invalidate_page(vmpage); - -+ -+ size = i_size_read(inode); - /* Though we have already held a cl_lock upon this page, but - * it still can be truncated locally. */ -- if (unlikely(vmpage->mapping == NULL)) { -+ if (unlikely((vmpage->mapping != inode->i_mapping) || -+ (page_offset(vmpage) > size))) { - CDEBUG(D_PAGE, "llite: fault and truncate race happened!\n"); - - /* return +1 to stop cl_io_loop() and ll_fault() will catch -@@ -758,7 +756,6 @@ static int vvp_io_fault_start(const struct lu_env *env, - } - } - -- size = i_size_read(inode); - last = cl_index(obj, size - 1); - LASSERT(fio->ft_index <= last); - if (fio->ft_index == last) -@@ -777,8 +774,6 @@ out: - /* return unlocked vmpage to avoid deadlocking */ - if (vmpage != NULL) - unlock_page(vmpage); -- if (fio->ft_mkwrite) -- UP_READ_I_ALLOC_SEM(inode); - #ifdef HAVE_VM_OP_FAULT - cfio->fault.ft_flags &= ~VM_FAULT_LOCKED; - #endif -diff --git a/lustre/llite/vvp_page.c b/lustre/llite/vvp_page.c -index b428744..66842a0 100644 ---- a/lustre/llite/vvp_page.c -+++ b/lustre/llite/vvp_page.c -@@ -420,7 +420,6 @@ static void vvp_transient_page_verify(const struct cl_page *page) - struct inode *inode = ccc_object_inode(page->cp_obj); - - LASSERT(!mutex_trylock(&inode->i_mutex)); -- /* LASSERT_SEM_LOCKED(&inode->i_alloc_sem); */ - } - - static int vvp_transient_page_own(const struct lu_env *env, -diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c -index 23a992e..a93501d 100644 ---- a/lustre/obdfilter/filter.c -+++ b/lustre/obdfilter/filter.c -@@ -3343,13 +3343,13 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry, - } - if (ia_valid & (ATTR_SIZE | ATTR_UID | ATTR_GID)) { - unsigned long now = jiffies; -- /* Filter truncates and writes are serialized by -- * i_alloc_sem, see the comment in -- * filter_preprw_write.*/ -- if (ia_valid & ATTR_SIZE) -- down_write(&inode->i_alloc_sem); -+ /* Filter truncates and writes are serialized. -+ * See the comment in filter_preprw_write.*/ - mutex_lock(&inode->i_mutex); -- fsfilt_check_slow(exp->exp_obd, now, "i_alloc_sem and i_mutex"); -+ if (ia_valid & ATTR_SIZE) -+ INODE_DIO_LOCK_WRITE(inode); -+ fsfilt_check_slow(exp->exp_obd, now, -+ "i_mutex and INODE_DIO_LOCK_WRITE"); - old_size = i_size_read(inode); - } - -@@ -3473,7 +3473,7 @@ out_unlock: - if (ia_valid & (ATTR_SIZE | ATTR_UID | ATTR_GID)) - mutex_unlock(&inode->i_mutex); - if (ia_valid & ATTR_SIZE) -- up_write(&inode->i_alloc_sem); -+ INODE_DIO_RELEASE_WRITE(inode); - if (fcc) - OBD_FREE(fcc, sizeof(*fcc)); - -@@ -3554,14 +3554,14 @@ int filter_setattr(const struct lu_env *env, struct obd_export *exp, - */ - if (oa->o_valid & - (OBD_MD_FLMTIME | OBD_MD_FLATIME | OBD_MD_FLCTIME)) { -- unsigned long now = jiffies; -- down_write(&dentry->d_inode->i_alloc_sem); -- fsfilt_check_slow(exp->exp_obd, now, "i_alloc_sem"); -- fmd = filter_fmd_get(exp, oa->o_id, oa->o_seq); -- if (fmd && fmd->fmd_mactime_xid < oti->oti_xid) -- fmd->fmd_mactime_xid = oti->oti_xid; -- filter_fmd_put(exp, fmd); -- up_write(&dentry->d_inode->i_alloc_sem); -+ unsigned long now = jiffies; -+ INODE_DIO_LOCK_WRITE(dentry->d_inode); -+ fsfilt_check_slow(exp->exp_obd, now, "INODE_DIO_LOCK_WRITE"); -+ fmd = filter_fmd_get(exp, oa->o_id, oa->o_seq); -+ if (fmd && fmd->fmd_mactime_xid < oti->oti_xid) -+ fmd->fmd_mactime_xid = oti->oti_xid; -+ filter_fmd_put(exp, fmd); -+ INODE_DIO_RELEASE_WRITE(dentry->d_inode); - } - - /* setting objects attributes (including owner/group) */ -@@ -4292,28 +4292,29 @@ int filter_destroy(const struct lu_env *env, struct obd_export *exp, - *fcc = oa->o_lcookie; - } - -- /* we're gonna truncate it first in order to avoid possible deadlock: -- * P1 P2 -- * open trasaction open transaction -- * down(i_zombie) down(i_zombie) -- * restart transaction -- * (see BUG 4180) -bzzz -- * -- * take i_alloc_sem too to prevent other threads from writing to the -- * file while we are truncating it. This can cause lock ordering issue -- * between page lock, i_mutex & starting new journal handle. -- * (see bug 20321) -johann -- */ -+ /* we're gonna truncate it first in order to avoid possible deadlock: -+ * P1 P2 -+ * open trasaction open transaction -+ * down(i_zombie) down(i_zombie) -+ * restart transaction -+ * (see BUG 4180) -bzzz -+ * -+ * INODE_DIO_LOCK_WRITE too to prevent other threads from writing to the -+ * file while we are truncating it. This can cause lock ordering issue -+ * between page lock, i_mutex & starting new journal handle. -+ * (see bug 20321) -johann -+ */ - now = jiffies; -- down_write(&dchild->d_inode->i_alloc_sem); -+ INODE_DIO_LOCK_WRITE(dchild->d_inode); - mutex_lock(&dchild->d_inode->i_mutex); -- fsfilt_check_slow(exp->exp_obd, now, "i_alloc_sem and i_mutex"); -+ fsfilt_check_slow(exp->exp_obd, now, -+ "INODE_DIO_LOCK_WRITE and i_mutex"); - - /* VBR: version recovery check */ - rc = filter_version_get_check(exp, oti, dchild->d_inode); - if (rc) { - mutex_unlock(&dchild->d_inode->i_mutex); -- up_write(&dchild->d_inode->i_alloc_sem); -+ INODE_DIO_RELEASE_WRITE(dchild->d_inode); - GOTO(cleanup, rc); - } - -@@ -4321,7 +4322,7 @@ int filter_destroy(const struct lu_env *env, struct obd_export *exp, - NULL, 1); - if (IS_ERR(handle)) { - mutex_unlock(&dchild->d_inode->i_mutex); -- up_write(&dchild->d_inode->i_alloc_sem); -+ INODE_DIO_RELEASE_WRITE(dchild->d_inode); - GOTO(cleanup, rc = PTR_ERR(handle)); - } - -@@ -4333,7 +4334,7 @@ int filter_destroy(const struct lu_env *env, struct obd_export *exp, - rc = fsfilt_setattr(obd, dchild, handle, &iattr, 1); - rc2 = fsfilt_commit(obd, dchild->d_inode, handle, 0); - mutex_unlock(&dchild->d_inode->i_mutex); -- up_write(&dchild->d_inode->i_alloc_sem); -+ INODE_DIO_RELEASE_WRITE(dchild->d_inode); - if (rc) - GOTO(cleanup, rc); - if (rc2) -diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c -index a946d90..3c4dcad 100644 ---- a/lustre/obdfilter/filter_io.c -+++ b/lustre/obdfilter/filter_io.c -@@ -634,7 +634,8 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, - * on mulitple inodes. That isn't all, because there still exists the - * possibility of a truncate starting a new transaction while holding the ext3 - * rwsem = write while some writes (which have started their transactions here) -- * blocking on the ext3 rwsem = read => lock inversion. -+ * blocking on the ext3 rwsem = read => lock inversion. (kernel 3.1 kills the -+ * rwsem and replaces it by i_dio_count and inode_dio_wait/done.) - * - * The handling gets very ugly when dealing with locked pages. It may be easier - * to just get rid of the locked page code (which has problems of its own) and -@@ -730,14 +731,15 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa, - - fsfilt_check_slow(obd, now, "preprw_write setup"); - -- /* Filter truncate first locks i_mutex then partially truncated -- * page, filter write code first locks pages then take -- * i_mutex. To avoid a deadlock in case of concurrent -- * punch/write requests from one client, filter writes and -- * filter truncates are serialized by i_alloc_sem, allowing -- * multiple writes or single truncate. */ -- down_read(&dentry->d_inode->i_alloc_sem); -- fsfilt_check_slow(obd, now, "i_alloc_sem"); -+ /* Filter truncate first locks i_mutex then partially truncated -+ * page, filter write code first locks pages then take -+ * i_mutex. To avoid a deadlock in case of concurrent -+ * punch/write requests from one client, filter writes and -+ * filter truncates are serialized by INODE_DIO_LOCK_READ, allowing -+ * multiple writes or single truncate. */ -+ -+ INODE_DIO_LOCK_READ(dentry->d_inode); -+ fsfilt_check_slow(obd, now, "INODE_DIO_LOCK_READ"); - - /* Don't update inode timestamps if this write is older than a - * setattr which modifies the timestamps. b=10150 */ -@@ -895,11 +897,11 @@ cleanup: - } - } - } -- case 3: -- if (rc) -- up_read(&dentry->d_inode->i_alloc_sem); -+ case 3: -+ if (rc) -+ INODE_DIO_RELEASE_READ(dentry->d_inode); - -- filter_iobuf_put(&obd->u.filter, iobuf, oti); -+ filter_iobuf_put(&obd->u.filter, iobuf, oti); - case 2: - pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - if (rc) -diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c -index 853e4f5..6d2b89f 100644 ---- a/lustre/obdfilter/filter_io_26.c -+++ b/lustre/obdfilter/filter_io_26.c -@@ -635,10 +635,10 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, - LASSERT(PageLocked(lnb->page)); - LASSERT(!PageWriteback(lnb->page)); - -- /* since write & truncate are serialized by the i_alloc_sem, -- * even partial truncate should not leave dirty pages in -- * the page cache */ -- LASSERT(!PageDirty(lnb->page)); -+ /* since write & truncate are serialized by the inode_dio_wait, -+ * even partial truncate should not leave dirty pages in -+ * the page cache */ -+ LASSERT(!PageDirty(lnb->page)); - - SetPageUptodate(lnb->page); - -@@ -867,7 +867,7 @@ cleanup: - if (fo->fo_writethrough_cache == 0 || - i_size_read(inode) > fo->fo_readcache_max_filesize) - filter_release_cache(obd, obj, nb, inode); -- up_read(&inode->i_alloc_sem); -+ INODE_DIO_RELEASE_READ(inode); - } - - RETURN(rc); -diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c -index 23dc755..b42e41c 100644 ---- a/lustre/osc/osc_cache.c -+++ b/lustre/osc/osc_cache.c -@@ -2695,9 +2695,9 @@ void osc_cache_truncate_end(const struct lu_env *env, struct osc_io *oio, - * The caller must have called osc_cache_writeback_range() to issue IO - * otherwise it will take a long time for this function to finish. - * -- * Caller must hold inode_mutex and i_alloc_sem, or cancel exclusive -- * dlm lock so that nobody else can dirty this range of file while we're -- * waiting for extents to be written. -+ * Caller must hold inode_mutex , or cancel exclusive dlm lock so that -+ * nobody else can dirty this range of file while we're waiting for -+ * extents to be written. - */ - int osc_cache_wait_range(const struct lu_env *env, struct osc_object *obj, - pgoff_t start, pgoff_t end) -diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c -index af3d6af..d266805 100644 ---- a/lustre/osd-ldiskfs/osd_io.c -+++ b/lustre/osd-ldiskfs/osd_io.c -@@ -433,7 +433,6 @@ struct page *osd_get_page(struct dt_object *dt, loff_t offset, int rw) - /* - * there are following "locks": - * journal_start -- * i_alloc_sem - * i_mutex - * page lock - --- -1.7.12 - diff --git a/sys-cluster/lustre/files/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch b/sys-cluster/lustre/files/2.4/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch index 44cc8cec3..5cc32197d 100644 --- a/sys-cluster/lustre/files/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch +++ b/sys-cluster/lustre/files/2.4/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch @@ -1,4 +1,4 @@ -From 0635f4d7cde2da46e05ba6be6d6dd26e72814ff8 Mon Sep 17 00:00:00 2001 +From 384e48e3f72883df9ea12649a4d8e76f78e8c70a Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 9 Aug 2012 10:37:39 +0800 Subject: [PATCH 01/13] LU-1337 vfs: kernel 3.1 renames lock-manager ops @@ -20,10 +20,10 @@ Change-Id: Ic86ec9db2f8262ef7ab9f5f2fb51ca79591120a4 3 files changed, 67 insertions(+), 40 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 64c14e5..403add5 100644 +index c8cc45f..3762784 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -1729,6 +1729,18 @@ EXTRA_KCFLAGS="$tmp_flags" +@@ -1713,6 +1713,18 @@ EXTRA_KCFLAGS="$tmp_flags" ]) # @@ -42,7 +42,7 @@ index 64c14e5..403add5 100644 # 2.6.39 remove unplug_fn from request_queue. # AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN], -@@ -1798,14 +1810,42 @@ LB_LINUX_TRY_COMPILE([ +@@ -1782,14 +1794,42 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -91,7 +91,7 @@ index 64c14e5..403add5 100644 ]) ]) -@@ -1848,26 +1888,6 @@ LB_LINUX_TRY_COMPILE([ +@@ -1832,26 +1872,6 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -118,7 +118,7 @@ index 64c14e5..403add5 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2008,15 +2028,18 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -1991,15 +2011,18 @@ AC_DEFUN([LC_PROG_LINUX], # 2.6.39 LC_REQUEST_QUEUE_UNPLUG_FN @@ -143,10 +143,10 @@ index 64c14e5..403add5 100644 if test x$enable_server = xyes ; then AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 172da72..41b4516 100644 +index 6a9c060..6b8d155 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -808,5 +808,9 @@ static inline bool selinux_is_enabled(void) +@@ -758,5 +758,9 @@ static inline bool selinux_is_enabled(void) } #endif @@ -157,10 +157,10 @@ index 172da72..41b4516 100644 #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ diff --git a/lustre/llite/file.c b/lustre/llite/file.c -index 96379d6..1525b07 100644 +index f793d52..d03ec76 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c -@@ -2150,15 +2150,15 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) +@@ -2155,15 +2155,15 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) } flock.l_flock.pid = file_lock->fl_pid; diff --git a/sys-cluster/lustre/files/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch b/sys-cluster/lustre/files/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch new file mode 100644 index 000000000..f1a28efbc --- /dev/null +++ b/sys-cluster/lustre/files/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch @@ -0,0 +1,242 @@ +From 47cc42154f7c0159d28dddc7cbe983056f5668a5 Mon Sep 17 00:00:00 2001 +From: Liu Xuezhao <xuezhao.liu@emc.com> +Date: Sun, 22 Jul 2012 01:07:18 +0800 +Subject: [PATCH 02/13] LU-1337 vfs: kernel 3.1 kills inode->i_alloc_sem + +Kernel 3.1 kills inode->i_alloc_sem, use i_dio_count and +inode_dio_wait/inode_dio_done instead. +(kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3). + +Add HAVE_INODE_DIO_WAIT to differentiate it. +Add INODE_DIO_LOCK_WRITE/INODE_DIO_RELEASE_WRITE, + INODE_DIO_LOCK_READ/INODE_DIO_RELEASE_READ macros. + +Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> +Change-Id: Ife36e07a85c76153985a4a86ee1973262c4c0e27 +--- + lustre/autoconf/lustre-core.m4 | 22 ++++++++++++++++++++++ + lustre/include/linux/lustre_compat25.h | 18 +++++++++++------- + lustre/llite/llite_lib.c | 4 ++-- + lustre/llite/vvp_io.c | 27 +++++++++++---------------- + lustre/llite/vvp_page.c | 1 - + lustre/osc/osc_cache.c | 6 +++--- + lustre/osd-ldiskfs/osd_io.c | 1 - + 7 files changed, 49 insertions(+), 30 deletions(-) + +diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 +index 3762784..ec3723e 100644 +--- a/lustre/autoconf/lustre-core.m4 ++++ b/lustre/autoconf/lustre-core.m4 +@@ -1834,6 +1834,27 @@ LB_LINUX_TRY_COMPILE([ + ]) + + # ++# 3.1 kills inode->i_alloc_sem, use i_dio_count and inode_dio_wait/ ++# inode_dio_done instead. ++# see kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3 ++# ++AC_DEFUN([LC_INODE_DIO_WAIT], ++[AC_MSG_CHECKING([if inode->i_alloc_sem is killed and use inode_dio_wait/done.]) ++LB_LINUX_TRY_COMPILE([ ++ #include <linux/fs.h> ++],[ ++ inode_dio_wait((struct inode *)0); ++ inode_dio_done((struct inode *)0); ++],[ ++ AC_DEFINE(HAVE_INODE_DIO_WAIT, 1, ++ [inode->i_alloc_sem is killed and use inode_dio_wait/done]) ++ AC_MSG_RESULT([yes]) ++],[ ++ AC_MSG_RESULT([no]) ++]) ++]) ++ ++# + # 3.3 introduces migrate_mode.h and migratepage has 4 args + # + AC_DEFUN([LC_HAVE_MIGRATE_HEADER], +@@ -2018,6 +2039,7 @@ AC_DEFUN([LC_PROG_LINUX], + + # 3.1 + LC_LM_XXX_LOCK_MANAGER_OPS ++ LC_INODE_DIO_WAIT + + # 3.3 + LC_HAVE_MIGRATE_HEADER +diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h +index 6b8d155..0d2a3eb 100644 +--- a/lustre/include/linux/lustre_compat25.h ++++ b/lustre/include/linux/lustre_compat25.h +@@ -247,13 +247,17 @@ static inline int mapping_has_pages(struct address_space *mapping) + (type *)( (char *)__mptr - offsetof(type,member) );}) + #endif + +-#define UP_WRITE_I_ALLOC_SEM(i) up_write(&(i)->i_alloc_sem) +-#define DOWN_WRITE_I_ALLOC_SEM(i) down_write(&(i)->i_alloc_sem) +-#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) LASSERT(down_read_trylock(&(i)->i_alloc_sem) == 0) +- +-#define UP_READ_I_ALLOC_SEM(i) up_read(&(i)->i_alloc_sem) +-#define DOWN_READ_I_ALLOC_SEM(i) down_read(&(i)->i_alloc_sem) +-#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0) ++#ifdef HAVE_INODE_DIO_WAIT ++# define INODE_DIO_LOCK_WRITE(i) inode_dio_wait(i) ++# define INODE_DIO_RELEASE_WRITE(i) do {} while (0) ++# define INODE_DIO_LOCK_READ(i) atomic_inc(&(i)->i_dio_count) ++# define INODE_DIO_RELEASE_READ(i) inode_dio_done(i) ++#else ++# define INODE_DIO_LOCK_WRITE(i) down_write(&(i)->i_alloc_sem) ++# define INODE_DIO_RELEASE_WRITE(i) up_write(&(i)->i_alloc_sem) ++# define INODE_DIO_LOCK_READ(i) down_read(&(i)->i_alloc_sem) ++# define INODE_DIO_RELEASE_READ(i) up_read(&(i)->i_alloc_sem) ++#endif + + #include <linux/mpage.h> /* for generic_writepages */ + +diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c +index 9769ec3..f2dcc92 100644 +--- a/lustre/llite/llite_lib.c ++++ b/lustre/llite/llite_lib.c +@@ -1451,12 +1451,12 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr) + + if (!S_ISDIR(inode->i_mode)) { + if (ia_valid & ATTR_SIZE) +- UP_WRITE_I_ALLOC_SEM(inode); ++ INODE_DIO_RELEASE_WRITE(inode); + mutex_unlock(&inode->i_mutex); + cfs_down_write(&lli->lli_trunc_sem); + mutex_lock(&inode->i_mutex); + if (ia_valid & ATTR_SIZE) +- DOWN_WRITE_I_ALLOC_SEM(inode); ++ INODE_DIO_LOCK_WRITE(inode); + } + + /* We need a steady stripe configuration for setattr to avoid +diff --git a/lustre/llite/vvp_io.c b/lustre/llite/vvp_io.c +index c8f041e..158c15c 100644 +--- a/lustre/llite/vvp_io.c ++++ b/lustre/llite/vvp_io.c +@@ -294,7 +294,7 @@ static int vvp_io_setattr_iter_init(const struct lu_env *env, + */ + mutex_unlock(&inode->i_mutex); + if (cl_io_is_trunc(ios->cis_io)) +- UP_WRITE_I_ALLOC_SEM(inode); ++ INODE_DIO_RELEASE_WRITE(inode); + cio->u.setattr.cui_locks_released = 1; + return 0; + } +@@ -347,7 +347,7 @@ static int vvp_io_setattr_trunc(const struct lu_env *env, + const struct cl_io_slice *ios, + struct inode *inode, loff_t size) + { +- DOWN_WRITE_I_ALLOC_SEM(inode); ++ INODE_DIO_LOCK_WRITE(inode); + return 0; + } + +@@ -419,7 +419,7 @@ static void vvp_io_setattr_fini(const struct lu_env *env, + if (cio->u.setattr.cui_locks_released) { + mutex_lock(&inode->i_mutex); + if (cl_io_is_trunc(io)) +- DOWN_WRITE_I_ALLOC_SEM(inode); ++ INODE_DIO_LOCK_WRITE(inode); + cio->u.setattr.cui_locks_released = 0; + } + vvp_io_fini(env, ios); +@@ -688,28 +688,26 @@ static int vvp_io_fault_start(const struct lu_env *env, + + /* must return locked page */ + if (fio->ft_mkwrite) { +- /* we grab alloc_sem to exclude truncate case. +- * Otherwise, we could add dirty pages into osc cache +- * while truncate is on-going. */ +- DOWN_READ_I_ALLOC_SEM(inode); +- +- LASSERT(cfio->ft_vmpage != NULL); +- lock_page(cfio->ft_vmpage); ++ LASSERT(cfio->ft_vmpage != NULL); ++ lock_page(cfio->ft_vmpage); + } else { + result = vvp_io_kernel_fault(cfio); + if (result != 0) + return result; + } + +- vmpage = cfio->ft_vmpage; +- LASSERT(PageLocked(vmpage)); ++ vmpage = cfio->ft_vmpage; ++ LASSERT(PageLocked(vmpage)); + + if (OBD_FAIL_CHECK(OBD_FAIL_LLITE_FAULT_TRUNC_RACE)) + ll_invalidate_page(vmpage); + ++ ++ size = i_size_read(inode); + /* Though we have already held a cl_lock upon this page, but + * it still can be truncated locally. */ +- if (unlikely(vmpage->mapping == NULL)) { ++ if (unlikely((vmpage->mapping != inode->i_mapping) || ++ (page_offset(vmpage) > size))) { + CDEBUG(D_PAGE, "llite: fault and truncate race happened!\n"); + + /* return +1 to stop cl_io_loop() and ll_fault() will catch +@@ -757,7 +755,6 @@ static int vvp_io_fault_start(const struct lu_env *env, + } + } + +- size = i_size_read(inode); + last = cl_index(obj, size - 1); + LASSERT(fio->ft_index <= last); + if (fio->ft_index == last) +@@ -776,8 +773,6 @@ out: + /* return unlocked vmpage to avoid deadlocking */ + if (vmpage != NULL) + unlock_page(vmpage); +- if (fio->ft_mkwrite) +- UP_READ_I_ALLOC_SEM(inode); + #ifdef HAVE_VM_OP_FAULT + cfio->fault.ft_flags &= ~VM_FAULT_LOCKED; + #endif +diff --git a/lustre/llite/vvp_page.c b/lustre/llite/vvp_page.c +index c07cb29..711d2cc 100644 +--- a/lustre/llite/vvp_page.c ++++ b/lustre/llite/vvp_page.c +@@ -420,7 +420,6 @@ static void vvp_transient_page_verify(const struct cl_page *page) + struct inode *inode = ccc_object_inode(page->cp_obj); + + LASSERT(!mutex_trylock(&inode->i_mutex)); +- /* LASSERT_SEM_LOCKED(&inode->i_alloc_sem); */ + } + + static int vvp_transient_page_own(const struct lu_env *env, +diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c +index 23dc755..b42e41c 100644 +--- a/lustre/osc/osc_cache.c ++++ b/lustre/osc/osc_cache.c +@@ -2695,9 +2695,9 @@ void osc_cache_truncate_end(const struct lu_env *env, struct osc_io *oio, + * The caller must have called osc_cache_writeback_range() to issue IO + * otherwise it will take a long time for this function to finish. + * +- * Caller must hold inode_mutex and i_alloc_sem, or cancel exclusive +- * dlm lock so that nobody else can dirty this range of file while we're +- * waiting for extents to be written. ++ * Caller must hold inode_mutex , or cancel exclusive dlm lock so that ++ * nobody else can dirty this range of file while we're waiting for ++ * extents to be written. + */ + int osc_cache_wait_range(const struct lu_env *env, struct osc_object *obj, + pgoff_t start, pgoff_t end) +diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c +index ef045a5..db0999a 100644 +--- a/lustre/osd-ldiskfs/osd_io.c ++++ b/lustre/osd-ldiskfs/osd_io.c +@@ -433,7 +433,6 @@ struct page *osd_get_page(struct dt_object *dt, loff_t offset, int rw) + /* + * there are following "locks": + * journal_start +- * i_alloc_sem + * i_mutex + * page lock + +-- +1.7.12 + diff --git a/sys-cluster/lustre/files/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch b/sys-cluster/lustre/files/2.4/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch index 19e29ffb2..a88773f5c 100644 --- a/sys-cluster/lustre/files/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch +++ b/sys-cluster/lustre/files/2.4/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch @@ -1,4 +1,4 @@ -From 1bece6cbb7d810ef085d00ac4c664bbb37c8bc7b Mon Sep 17 00:00:00 2001 +From 665d06b414f6df191c00fa48978d640714eef6e0 Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 26 Jul 2012 15:38:30 +0800 Subject: [PATCH 03/13] LU-1337 vfs: kernel 3.1 changes open_to_namei_flags @@ -22,10 +22,10 @@ Change-Id: I408685040688bae574d04cf288abb6ca967607df 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index bb45125..914069a 100644 +index 0d2a3eb..ab9a7de 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -816,5 +816,20 @@ static inline bool selinux_is_enabled(void) +@@ -766,5 +766,20 @@ static inline bool selinux_is_enabled(void) # define lm_compare_owner fl_compare_owner #endif diff --git a/sys-cluster/lustre/files/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch b/sys-cluster/lustre/files/2.4/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch index deaf4ad54..a9ef35739 100644 --- a/sys-cluster/lustre/files/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch +++ b/sys-cluster/lustre/files/2.4/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch @@ -1,4 +1,4 @@ -From 734984d6c88784cde03d17e115dd6478a67daa58 Mon Sep 17 00:00:00 2001 +From 45331d1b634b8c79e753cc4f75659b09315b3037 Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Mon, 27 Aug 2012 17:19:22 +0800 Subject: [PATCH 04/13] LU-1337 vfs: provides ll_get_acl to ->i_op->get_acl @@ -22,10 +22,10 @@ Change-Id: Ica96adac03c1792e2e8b668b959457a4ffec9a43 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 0aef14f..a2d8efc 100644 +index ec3723e..5a039e2 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -1783,6 +1783,9 @@ LB_LINUX_TRY_COMPILE([ +@@ -1767,6 +1767,9 @@ LB_LINUX_TRY_COMPILE([ # # 3.1 generic_permission taken 2 parameters. # see kernel commit 2830ba7f34ebb27c4e5b8b6ef408cd6d74860890 @@ -36,10 +36,10 @@ index 0aef14f..a2d8efc 100644 AC_DEFUN([LC_GENERIC_PERMISSION], [AC_MSG_CHECKING([if generic_permission take 2 or 4 arguments]) diff --git a/lustre/llite/file.c b/lustre/llite/file.c -index 1525b07..bf9ba2f 100644 +index d03ec76..f9c99a6 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c -@@ -2536,16 +2536,29 @@ int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, +@@ -2541,16 +2541,29 @@ int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, } #endif @@ -72,7 +72,7 @@ index 1525b07..bf9ba2f 100644 struct posix_acl *acl; int rc; ENTRY; -@@ -2554,9 +2567,7 @@ lustre_check_acl(struct inode *inode, int mask) +@@ -2559,9 +2572,7 @@ lustre_check_acl(struct inode *inode, int mask) if (flags & IPERM_FLAG_RCU) return -ECHILD; # endif @@ -83,7 +83,7 @@ index 1525b07..bf9ba2f 100644 if (!acl) RETURN(-EAGAIN); -@@ -2608,7 +2619,7 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd) +@@ -2613,7 +2624,7 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd) return lustre_check_remote_perm(inode, mask); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1); @@ -92,7 +92,7 @@ index 1525b07..bf9ba2f 100644 RETURN(rc); } -@@ -2703,6 +2714,9 @@ struct inode_operations ll_file_inode_operations = { +@@ -2708,6 +2719,9 @@ struct inode_operations ll_file_inode_operations = { #ifdef HAVE_LINUX_FIEMAP_H .fiemap = ll_fiemap, #endif @@ -103,10 +103,10 @@ index 1525b07..bf9ba2f 100644 /* dynamic ioctl number support routins */ diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h -index 0c9f6d6..a1c02e5 100644 +index ab60e58..8222dca 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h -@@ -748,6 +748,8 @@ int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, +@@ -742,6 +742,8 @@ int ll_getattr_it(struct vfsmount *mnt, struct dentry *de, struct lookup_intent *it, struct kstat *stat); int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat); struct ll_file_data *ll_file_data_get(void); @@ -115,7 +115,7 @@ index 0c9f6d6..a1c02e5 100644 #ifdef HAVE_GENERIC_PERMISSION_4ARGS int ll_inode_permission(struct inode *inode, int mask, unsigned int flags); #else -@@ -757,6 +759,7 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd); +@@ -751,6 +753,7 @@ int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd); int ll_inode_permission(struct inode *inode, int mask); # endif #endif diff --git a/sys-cluster/lustre/files/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch b/sys-cluster/lustre/files/2.4/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch index 3630fc24f..9d005cc54 100644 --- a/sys-cluster/lustre/files/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch +++ b/sys-cluster/lustre/files/2.4/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch @@ -1,4 +1,4 @@ -From b489d154ef9a88421939b20b146361122a4704d6 Mon Sep 17 00:00:00 2001 +From 399a9f6df970eeb694cf294ae41d14165d8143bf Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 9 Aug 2012 10:18:32 +0800 Subject: [PATCH 05/13] LU-1337 block: kernel 3.2 make_request_fn returns void @@ -16,10 +16,10 @@ Change-Id: I49a27873c1754addc9fef7c5f50cbf84592adf05 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index a2d8efc..420d81e 100644 +index 5a039e2..0c99beb 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -1874,6 +1874,27 @@ LB_LINUX_TRY_COMPILE([ +@@ -1858,6 +1858,27 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -47,7 +47,7 @@ index a2d8efc..420d81e 100644 # 3.3 introduces migrate_mode.h and migratepage has 4 args # AC_DEFUN([LC_HAVE_MIGRATE_HEADER], -@@ -2061,6 +2082,9 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2044,6 +2065,9 @@ AC_DEFUN([LC_PROG_LINUX], LC_LM_XXX_LOCK_MANAGER_OPS LC_INODE_DIO_WAIT @@ -58,10 +58,10 @@ index a2d8efc..420d81e 100644 LC_HAVE_MIGRATE_HEADER LC_MIGRATEPAGE_4ARGS diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 914069a..2d0dd0e 100644 +index ab9a7de..60accf0 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -831,5 +831,13 @@ static inline int ll_namei_to_lookup_intent_flag(int flag) +@@ -781,5 +781,13 @@ static inline int ll_namei_to_lookup_intent_flag(int flag) return flag; } diff --git a/sys-cluster/lustre/files/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch b/sys-cluster/lustre/files/2.4/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch index 4866ce2dd..3bfbf0c0b 100644 --- a/sys-cluster/lustre/files/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch +++ b/sys-cluster/lustre/files/2.4/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch @@ -1,4 +1,4 @@ -From 7fefbc7487f55b0edaa7a85f0e5b9fea68d5ff15 Mon Sep 17 00:00:00 2001 +From 3bc75da8909baae42bdf586c9f09c7e091039bdf Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 9 Aug 2012 10:31:10 +0800 Subject: [PATCH 06/13] LU-1337 vfs: kernel 3.2 protects inode->i_nlink @@ -24,10 +24,10 @@ Change-Id: Ie958cb308291ecc48d409a1282fed7ea3549a561 6 files changed, 41 insertions(+), 11 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 420d81e..84f1678 100644 +index 0c99beb..17bd744 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -1895,6 +1895,27 @@ LB_LINUX_TRY_COMPILE([ +@@ -1879,6 +1879,27 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -55,7 +55,7 @@ index 420d81e..84f1678 100644 # 3.3 introduces migrate_mode.h and migratepage has 4 args # AC_DEFUN([LC_HAVE_MIGRATE_HEADER], -@@ -2084,6 +2105,7 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2067,6 +2088,7 @@ AC_DEFUN([LC_PROG_LINUX], # 3.2 LC_HAVE_VOID_MAKE_REQUEST_FN @@ -64,10 +64,10 @@ index 420d81e..84f1678 100644 # 3.3 LC_HAVE_MIGRATE_HEADER diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 2d0dd0e..7ead133 100644 +index 60accf0..9cf5b1b 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -839,5 +839,13 @@ static inline int ll_namei_to_lookup_intent_flag(int flag) +@@ -789,5 +789,13 @@ static inline int ll_namei_to_lookup_intent_flag(int flag) # define LL_MRF_RETURN(rc) RETURN(rc) #endif @@ -104,10 +104,10 @@ index 14fb634..b507408 100644 } diff --git a/lustre/llite/file.c b/lustre/llite/file.c -index bf9ba2f..8840295 100644 +index f9c99a6..545bbd6 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c -@@ -2315,7 +2315,7 @@ ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits, +@@ -2320,7 +2320,7 @@ ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits, static int ll_inode_revalidate_fini(struct inode *inode, int rc) { if (rc == -ENOENT) { /* Already unlinked. Just update nlink * and return success */ @@ -117,10 +117,10 @@ index bf9ba2f..8840295 100644 * case of obscure races, so no need to to validate * size. */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c -index 7f3ac28..07efcfc 100644 +index f2dcc92..350c4a7 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c -@@ -1218,7 +1218,7 @@ int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data, +@@ -1230,7 +1230,7 @@ int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data, if (rc) { ptlrpc_req_finished(request); if (rc == -ENOENT) { @@ -129,7 +129,7 @@ index 7f3ac28..07efcfc 100644 /* Unlinked special device node? Or just a race? * Pretend we done everything. */ if (!S_ISREG(inode->i_mode) && -@@ -1724,7 +1724,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) +@@ -1736,7 +1736,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) if (body->valid & OBD_MD_FLFLAGS) inode->i_flags = ll_ext_to_inode_flags(body->flags); if (body->valid & OBD_MD_FLNLINK) @@ -139,10 +139,10 @@ index 7f3ac28..07efcfc 100644 inode->i_rdev = old_decode_dev(body->rdev); diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c -index 1c37bd9..ec9dfb6 100644 +index 66600be..a1a442f 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c -@@ -1518,7 +1518,7 @@ static int osd_inode_setattr(const struct lu_env *env, +@@ -1528,7 +1528,7 @@ static int osd_inode_setattr(const struct lu_env *env, if (bits & LA_GID) inode->i_gid = attr->la_gid; if (bits & LA_NLINK) @@ -151,7 +151,7 @@ index 1c37bd9..ec9dfb6 100644 if (bits & LA_RDEV) inode->i_rdev = attr->la_rdev; -@@ -2076,7 +2076,7 @@ static int osd_object_destroy(const struct lu_env *env, +@@ -2061,7 +2061,7 @@ static int osd_object_destroy(const struct lu_env *env, LASSERT(osd_inode_unlinked(inode) || inode->i_nlink == 1); cfs_spin_lock(&obj->oo_guard); @@ -160,7 +160,7 @@ index 1c37bd9..ec9dfb6 100644 cfs_spin_unlock(&obj->oo_guard); inode->i_sb->s_op->dirty_inode(inode); } else { -@@ -2283,11 +2283,11 @@ static int osd_object_ref_add(const struct lu_env *env, +@@ -2268,11 +2268,11 @@ static int osd_object_ref_add(const struct lu_env *env, * do not actually care whether this flag is set or not. */ cfs_spin_lock(&obj->oo_guard); @@ -174,7 +174,7 @@ index 1c37bd9..ec9dfb6 100644 } LASSERT(inode->i_nlink <= LDISKFS_LINK_MAX); cfs_spin_unlock(&obj->oo_guard); -@@ -2333,12 +2333,12 @@ static int osd_object_ref_del(const struct lu_env *env, struct dt_object *dt, +@@ -2318,12 +2318,12 @@ static int osd_object_ref_del(const struct lu_env *env, struct dt_object *dt, cfs_spin_lock(&obj->oo_guard); LASSERT(inode->i_nlink > 0); diff --git a/sys-cluster/lustre/files/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch b/sys-cluster/lustre/files/2.4/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch index 43cc7842d..f6d02d91b 100644 --- a/sys-cluster/lustre/files/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch +++ b/sys-cluster/lustre/files/2.4/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch @@ -1,4 +1,4 @@ -From 87c734aec5ec3a73c8eeab425f501568b05874ba Mon Sep 17 00:00:00 2001 +From c54e22039b459aa7da4d7874e3e15d9e4354fd2e Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 19 Jul 2012 17:43:16 +0800 Subject: [PATCH 07/13] LU-1337 vfs: 3.3 changes @@ -22,10 +22,10 @@ Change-Id: I7564506cf4365c8da113a81058f68b9ef8b092a4 5 files changed, 87 insertions(+), 6 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 84f1678..15f58ab 100644 +index 17bd744..99f6ec6 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -1954,6 +1954,61 @@ LB_LINUX_TRY_COMPILE([ +@@ -1938,6 +1938,61 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -87,7 +87,7 @@ index 84f1678..15f58ab 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2110,6 +2165,8 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2093,6 +2148,8 @@ AC_DEFUN([LC_PROG_LINUX], # 3.3 LC_HAVE_MIGRATE_HEADER LC_MIGRATEPAGE_4ARGS @@ -97,10 +97,10 @@ index 84f1678..15f58ab 100644 # if test x$enable_server = xyes ; then diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 7ead133..070ad83 100644 +index 9cf5b1b..87f611b 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -847,5 +847,11 @@ static inline void set_nlink(struct inode *inode, unsigned int nlink) +@@ -797,5 +797,11 @@ static inline void set_nlink(struct inode *inode, unsigned int nlink) } #endif @@ -113,10 +113,10 @@ index 7ead133..070ad83 100644 #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h -index a1c02e5..a942134 100644 +index 8222dca..13ecdd6 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h -@@ -830,7 +830,11 @@ void ll_umount_begin(struct vfsmount *vfsmnt, int flags); +@@ -824,7 +824,11 @@ void ll_umount_begin(struct vfsmount *vfsmnt, int flags); void ll_umount_begin(struct super_block *sb); #endif int ll_remount_fs(struct super_block *sb, int *flags, char *data); @@ -129,10 +129,10 @@ index a1c02e5..a942134 100644 struct super_block *); void lustre_dump_dentry(struct dentry *, int recur); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c -index 07efcfc..18246ac 100644 +index 350c4a7..ab3fe64 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c -@@ -2294,12 +2294,21 @@ void ll_finish_md_op_data(struct md_op_data *op_data) +@@ -2310,12 +2310,21 @@ void ll_finish_md_op_data(struct md_op_data *op_data) OBD_FREE_PTR(op_data); } diff --git a/sys-cluster/lustre/files/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch b/sys-cluster/lustre/files/2.4/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch index 5b22c94a9..c2423b2e6 100644 --- a/sys-cluster/lustre/files/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch +++ b/sys-cluster/lustre/files/2.4/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch @@ -1,4 +1,4 @@ -From 3d5f9b7679cfc5bb0a1c21c232478c17cfeb77e2 Mon Sep 17 00:00:00 2001 +From e871c9406129c66531597413b61948ea3df2679a Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Mon, 16 Jul 2012 11:08:56 +0800 Subject: [PATCH 08/13] LU-1337 kernel: remove unnecessary includings of @@ -51,7 +51,7 @@ index 9fc64e6..5ff5771 100644 #include <linux/completion.h> diff --git a/libcfs/libcfs/linux/linux-proc.c b/libcfs/libcfs/linux/linux-proc.c -index 5294e08..e9c5018 100644 +index b093d12..9078fc6 100644 --- a/libcfs/libcfs/linux/linux-proc.c +++ b/libcfs/libcfs/linux/linux-proc.c @@ -50,7 +50,6 @@ @@ -147,7 +147,7 @@ index 2549bad..5310b14 100644 #include <linux/fs.h> diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c -index 310cf45..76e259d 100644 +index 8079d29..8254cf3 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -45,7 +45,6 @@ diff --git a/sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch b/sys-cluster/lustre/files/2.4/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch index 9e4311797..205bc482f 100644 --- a/sys-cluster/lustre/files/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch +++ b/sys-cluster/lustre/files/2.4/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch @@ -1,4 +1,4 @@ -From 9e6789a41f3b1afd1a8a2575a4abbc49f0b10727 Mon Sep 17 00:00:00 2001 +From cef0397a3c092bd39266b07b5579e72b5ae46d8e Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Thu, 9 Aug 2012 10:34:49 +0800 Subject: [PATCH 09/13] LU-1337 vfs: kernel 3.4 touch_atime switchs to 1 @@ -17,10 +17,10 @@ Change-Id: I1a0478459538376761b96e1dc65328eeeef60d0f 2 files changed, 31 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 15f58ab..3b3115c 100644 +index 99f6ec6..9ff79f4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -2009,6 +2009,25 @@ EXTRA_KCFLAGS="$tmp_flags" +@@ -1993,6 +1993,25 @@ EXTRA_KCFLAGS="$tmp_flags" ]) # @@ -46,7 +46,7 @@ index 15f58ab..3b3115c 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2168,6 +2187,9 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2151,6 +2170,9 @@ AC_DEFUN([LC_PROG_LINUX], LC_SUPEROPS_USE_DENTRY LC_INODEOPS_USE_UMODE_T @@ -57,20 +57,20 @@ index 15f58ab..3b3115c 100644 if test x$enable_server = xyes ; then AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c -index f985625..f418631 100644 +index 3965d20..e8e9d56 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c -@@ -500,6 +500,9 @@ int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) - int hash64 = sbi->ll_flags & LL_SBI_64BIT_HASH; - struct page *page; +@@ -484,6 +484,9 @@ int ll_dir_read(struct inode *inode, __u64 *_pos, void *cookie, struct ll_dir_chain chain; + int done = 0; + int rc = 0; +#ifdef HAVE_TOUCH_ATIME_1ARG + struct path path; +#endif - int done; - int rc; ENTRY; -@@ -627,7 +630,13 @@ int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) + + ll_dir_chain_init(&chain); +@@ -623,7 +626,13 @@ static int ll_readdir(struct file *filp, void *cookie, filldir_t filldir) filp->f_pos = pos; } filp->f_version = inode->i_version; @@ -82,8 +82,8 @@ index f985625..f418631 100644 touch_atime(filp->f_vfsmnt, filp->f_dentry); +#endif - ll_dir_chain_fini(&chain); - + out: + if (!rc) -- 1.7.12 diff --git a/sys-cluster/lustre/files/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch b/sys-cluster/lustre/files/2.4/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch index 6f727170e..366687651 100644 --- a/sys-cluster/lustre/files/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch +++ b/sys-cluster/lustre/files/2.4/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch @@ -1,4 +1,4 @@ -From 9d5b2096640f5a9ed1d9307748cc79a35def59fb Mon Sep 17 00:00:00 2001 +From c9240c44062908b87b9f9af94da5ea5afa0ec46f Mon Sep 17 00:00:00 2001 From: Liu Xuezhao <xuezhao.liu@emc.com> Date: Mon, 16 Jul 2012 17:05:04 +0800 Subject: [PATCH 10/13] LU-1337 vfs: kernel 3.4 converts d_alloc_root to @@ -19,10 +19,10 @@ Change-Id: I7ff1f0eff25495b655e650997016377ca0a200aa 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 3b3115c..bc92b4f 100644 +index 9ff79f4..e563921 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -2028,6 +2028,25 @@ LB_LINUX_TRY_COMPILE([ +@@ -2012,6 +2012,25 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -48,7 +48,7 @@ index 3b3115c..bc92b4f 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2189,6 +2208,7 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2172,6 +2191,7 @@ AC_DEFUN([LC_PROG_LINUX], # 3.4 LC_TOUCH_ATIME_1ARG @@ -57,10 +57,10 @@ index 3b3115c..bc92b4f 100644 # if test x$enable_server = xyes ; then diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index 070ad83..b1d3056 100644 +index 87f611b..321892a 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -853,5 +853,19 @@ static inline void set_nlink(struct inode *inode, unsigned int nlink) +@@ -803,5 +803,19 @@ static inline void set_nlink(struct inode *inode, unsigned int nlink) # define ll_umode_t int #endif @@ -81,10 +81,10 @@ index 070ad83..b1d3056 100644 #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c -index 18246ac..f125461 100644 +index ab3fe64..1db4903 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c -@@ -539,7 +539,12 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, +@@ -543,7 +543,12 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, NULL); cl_sb_init(sb); @@ -99,10 +99,10 @@ index 18246ac..f125461 100644 sb->s_root->d_op = &ll_d_root_ops; #else diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c -index b2ec636..c2481bf 100644 +index 4c82860..7277709 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c -@@ -1609,14 +1609,13 @@ static int server_fill_super_common(struct super_block *sb) +@@ -2276,14 +2276,13 @@ static int server_fill_super_common(struct super_block *sb) /* apparently we need to be a directory for the mount to finish */ root->i_mode = S_IFDIR; diff --git a/sys-cluster/lustre/files/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch b/sys-cluster/lustre/files/2.4/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch index 7f20e90b1..09054052a 100644 --- a/sys-cluster/lustre/files/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch +++ b/sys-cluster/lustre/files/2.4/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch @@ -1,4 +1,4 @@ -From 2c89f077618a5017fb61b57a8d358a5fb9542a5f Mon Sep 17 00:00:00 2001 +From 84a0d64c068f65dd073e13f6fcf55d11ed8a21a7 Mon Sep 17 00:00:00 2001 From: Peng Tao <tao.peng@emc.com> Date: Wed, 22 Aug 2012 16:55:22 +0800 Subject: [PATCH 11/13] LU-1337 kernel: v3.5 defines INVALID_UID diff --git a/sys-cluster/lustre/files/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch b/sys-cluster/lustre/files/2.4/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch index 3289fded2..3fa2ddb22 100644 --- a/sys-cluster/lustre/files/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch +++ b/sys-cluster/lustre/files/2.4/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch @@ -1,4 +1,4 @@ -From 9e05a2ac1524f4d7d3aa3f5cc6f278ee3e460b17 Mon Sep 17 00:00:00 2001 +From 2ab84dda5f7de4bd2bd00256ee8cdbd329633811 Mon Sep 17 00:00:00 2001 From: Peng Tao <tao.peng@emc.com> Date: Wed, 22 Aug 2012 17:57:04 +0800 Subject: [PATCH 12/13] LU-1337 llite: kernel 3.5 renames end_writeback to @@ -16,10 +16,10 @@ Change-Id: I2435e820092085c0fb55539818f4bad9e48ff386 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index bc92b4f..3f47dab 100644 +index e563921..66555cc 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -2047,6 +2047,25 @@ LB_LINUX_TRY_COMPILE([ +@@ -2031,6 +2031,25 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -45,7 +45,7 @@ index bc92b4f..3f47dab 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2210,6 +2229,9 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2193,6 +2212,9 @@ AC_DEFUN([LC_PROG_LINUX], LC_TOUCH_ATIME_1ARG LC_HAVE_D_MAKE_ROOT @@ -56,10 +56,10 @@ index bc92b4f..3f47dab 100644 if test x$enable_server = xyes ; then AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h -index b1d3056..b2bba25 100644 +index 321892a..e9ff0e2 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h -@@ -866,6 +866,9 @@ static inline struct dentry *d_make_root(struct inode *root_inode) +@@ -816,6 +816,9 @@ static inline struct dentry *d_make_root(struct inode *root_inode) return res; } #endif @@ -70,10 +70,10 @@ index b1d3056..b2bba25 100644 #endif /* __KERNEL__ */ #endif /* _COMPAT25_H */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c -index f125461..ccbaad0 100644 +index 1db4903..26659f4 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c -@@ -1881,10 +1881,8 @@ void ll_delete_inode(struct inode *inode) +@@ -1892,10 +1892,8 @@ void ll_delete_inode(struct inode *inode) #ifdef HAVE_SBOPS_EVICT_INODE ll_clear_inode(inode); diff --git a/sys-cluster/lustre/files/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch b/sys-cluster/lustre/files/2.4/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch index 28f02823c..d65c9b31b 100644 --- a/sys-cluster/lustre/files/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch +++ b/sys-cluster/lustre/files/2.4/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch @@ -1,4 +1,4 @@ -From c3b73bfe1e157ec42be9015d231da66808483554 Mon Sep 17 00:00:00 2001 +From 7e571b57b0a1e3c676deb2cf958dbc193be1c91b Mon Sep 17 00:00:00 2001 From: Peng Tao <tao.peng@emc.com> Date: Thu, 23 Aug 2012 13:55:46 +0800 Subject: [PATCH 13/13] LU-1337 kernel: 3.5 kernel encode_fh passes in parent @@ -14,10 +14,10 @@ Change-Id: I6d7223b934bfe4151371744ad72bdab6b170c700 2 files changed, 36 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index 3f47dab..dbf7233 100644 +index 66555cc..2f0aeee 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 -@@ -2066,6 +2066,35 @@ LB_LINUX_TRY_COMPILE([ +@@ -2050,6 +2050,35 @@ LB_LINUX_TRY_COMPILE([ ]) # @@ -53,7 +53,7 @@ index 3f47dab..dbf7233 100644 # LC_PROG_LINUX # # Lustre linux kernel checks -@@ -2231,6 +2260,7 @@ AC_DEFUN([LC_PROG_LINUX], +@@ -2214,6 +2243,7 @@ AC_DEFUN([LC_PROG_LINUX], # 3.5 LC_HAVE_CLEAR_INODE @@ -62,7 +62,7 @@ index 3f47dab..dbf7233 100644 # if test x$enable_server = xyes ; then diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c -index 809a564..ba4f9f1 100644 +index 1f18337..515f5b3 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -173,11 +173,17 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren diff --git a/sys-cluster/lustre/lustre-9999.ebuild b/sys-cluster/lustre/lustre-9999.ebuild index 80ef89cf2..624a23a06 100644 --- a/sys-cluster/lustre/lustre-9999.ebuild +++ b/sys-cluster/lustre/lustre-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=5_pre1 +EAPI=5 WANT_AUTOCONF="2.5" WANT_AUTOMAKE="1.9" @@ -25,19 +25,19 @@ RDEPEND="${DEPEND}" BUILD_PARAMS="-C ${KV_DIR} SUBDIRS=${S}" PATCHES=( -"${FILESDIR}/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch" -"${FILESDIR}/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch" -"${FILESDIR}/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch" -"${FILESDIR}/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch" -"${FILESDIR}/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch" -"${FILESDIR}/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch" -"${FILESDIR}/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch" -"${FILESDIR}/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch" -"${FILESDIR}/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch" -"${FILESDIR}/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch" -"${FILESDIR}/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch" -"${FILESDIR}/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch" -"${FILESDIR}/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch" +"${FILESDIR}/2.4/0001-LU-1337-vfs-kernel-3.1-renames-lock-manager-ops.patch" +"${FILESDIR}/2.4/0002-LU-1337-vfs-kernel-3.1-kills-inode-i_alloc_sem.patch" +"${FILESDIR}/2.4/0003-LU-1337-vfs-kernel-3.1-changes-open_to_namei_flags.patch" +"${FILESDIR}/2.4/0004-LU-1337-vfs-provides-ll_get_acl-to-i_op-get_acl.patch" +"${FILESDIR}/2.4/0005-LU-1337-block-kernel-3.2-make_request_fn-returns-voi.patch" +"${FILESDIR}/2.4/0006-LU-1337-vfs-kernel-3.2-protects-inode-i_nlink.patch" +"${FILESDIR}/2.4/0007-LU-1337-vfs-3.3-changes-super_operations-inode_opera.patch" +"${FILESDIR}/2.4/0008-LU-1337-kernel-remove-unnecessary-includings-of-syst.patch" +"${FILESDIR}/2.4/0009-LU-1337-vfs-kernel-3.4-touch_atime-switchs-to-1-argu.patch" +"${FILESDIR}/2.4/0010-LU-1337-vfs-kernel-3.4-converts-d_alloc_root-to-d_ma.patch" +"${FILESDIR}/2.4/0011-LU-1337-kernel-v3.5-defines-INVALID_UID.patch" +"${FILESDIR}/2.4/0012-LU-1337-llite-kernel-3.5-renames-end_writeback-to-cl.patch" +"${FILESDIR}/2.4/0013-LU-1337-kernel-3.5-kernel-encode_fh-passes-in-parent.patch" ) pkg_setup() { |