Whamcloud - gitweb
LU-4416 osd-ldiskfs: add check for 3 arg ext4_journal_start 64/10164/13
authorJeff Mahoney <jeffm@suse.com>
Mon, 2 Jun 2014 13:05:57 +0000 (09:05 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 3 Jul 2014 04:37:38 +0000 (04:37 +0000)
Linux 3.9 added a type argument to ext4_journal_start_sb. The
ldiskfs patches shouldn't need to define whether the
implementation uses this version.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia764126b27ebc766d39d1778278bdd8835f5a6ef
Reviewed-on: http://review.whamcloud.com/10164
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build-ldiskfs.m4
lustre/osd-ldiskfs/osd_scrub.c

index e34e75a..39cb853 100644 (file)
@@ -68,6 +68,23 @@ ext_pblock, [
 ]) # LB_EXT_PBLOCK
 
 #
 ]) # LB_EXT_PBLOCK
 
 #
+# LB_EXT4_JOURNAL_START_3ARGS
+#
+# 3.9 added a type argument to ext4_journal_start and friends
+#
+AC_DEFUN([LB_EXT4_JOURNAL_START_3ARGS], [
+LB_CHECK_COMPILE([if ext4_journal_start takes 3 arguments],
+ext4_journal_start, [
+       #include <linux/fs.h>
+       #include "$EXT4_SRC_DIR/ext4_jbd2.h"
+],[
+       ext4_journal_start(NULL, 0, 0);
+],[
+       AC_DEFINE(JOURNAL_START_HAS_3ARGS, 1, [ext4_journal_start takes 3 arguments])
+])
+]) # LB_EXT4_JOURNAL_START_3ARGS
+
+#
 # LDISKFS_AC_PATCH_PROGRAM
 #
 # Determine which program should be used to apply the patches to
 # LDISKFS_AC_PATCH_PROGRAM
 #
 # Determine which program should be used to apply the patches to
@@ -144,6 +161,7 @@ AS_IF([test x$enable_ldiskfs != xno],[
        LDISKFS_AC_PATCH_PROGRAM
        LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
        LB_EXT_PBLOCK
        LDISKFS_AC_PATCH_PROGRAM
        LB_EXT_FREE_BLOCKS_WITH_BUFFER_HEAD
        LB_EXT_PBLOCK
+       LB_EXT4_JOURNAL_START_3ARGS
        AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [posix acls for ldiskfs])
        AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [fs security for ldiskfs])
        AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [extened attributes for ldiskfs])
        AC_DEFINE(CONFIG_LDISKFS_FS_POSIX_ACL, 1, [posix acls for ldiskfs])
        AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [fs security for ldiskfs])
        AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [extened attributes for ldiskfs])
index 031ae90..edffbe4 100644 (file)
@@ -108,7 +108,7 @@ static int osd_scrub_refresh_mapping(struct osd_thread_info *info,
 
        /* DTO_INDEX_INSERT is enough for other two ops:
         * delete/update, but save stack. */
 
        /* DTO_INDEX_INSERT is enough for other two ops:
         * delete/update, but save stack. */
-       th = ldiskfs_journal_start_sb(osd_sb(dev),
+       th = osd_journal_start_sb(osd_sb(dev), LDISKFS_HT_MISC,
                                osd_dto_credits_noquota[DTO_INDEX_INSERT]);
        if (IS_ERR(th)) {
                rc = PTR_ERR(th);
                                osd_dto_credits_noquota[DTO_INDEX_INSERT]);
        if (IS_ERR(th)) {
                rc = PTR_ERR(th);