From 30f9697637c09e593bfbbc8ccbc7993ccfdeac36 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Mon, 15 Dec 2014 16:24:24 +0800 Subject: [PATCH] LU-6030 ldiskfs: cleanup ldiskfs_journal_dirty_metadata ldiskfs_journal_dirty_meatdata only exist in ext3 code. In the ext4 ldiskfs_handle_dirty_metadata instead of it. As we won't support ext3 any more, Cleanup its usage from ldiskfs & osd. Signed-off-by: Yang Sheng Change-Id: I7a1f65bd41fb552cb099831fc0254926ae5c2df3 Reviewed-on: http://review.whamcloud.com/13067 Tested-by: Jenkins Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- .../patches/rhel6.3/ext4-back-dquot-to.patch | 9 +- .../patches/rhel6.3/ext4-large-eas.patch | 2 +- .../kernel_patches/patches/rhel6.3/ext4-misc.patch | 13 --- .../patches/rhel6.4/ext4-back-dquot-to.patch | 103 +++++++++++++++++++++ .../kernel_patches/patches/rhel6.4/ext4-misc.patch | 13 --- .../sles11sp2/ext4-extents-mount-option.patch | 88 ++++++++++-------- .../patches/sles11sp2/ext4-large-eas.patch | 2 +- .../patches/sles11sp2/ext4-misc.patch | 9 -- .../series/ldiskfs-2.6-rhel6.4.series | 2 +- .../series/ldiskfs-2.6-rhel6.5.series | 2 +- .../series/ldiskfs-2.6-rhel6.6.series | 2 +- .../series/ldiskfs-2.6-sles11.series | 2 +- lustre/osd-ldiskfs/osd_compat.c | 2 +- lustre/osd-ldiskfs/osd_handler.c | 8 +- lustre/osd-ldiskfs/osd_iam.c | 15 +-- lustre/osd-ldiskfs/osd_iam_lfix.c | 7 +- lustre/osd-ldiskfs/osd_iam_lvar.c | 7 +- lustre/osd-ldiskfs/osd_io.c | 2 +- 18 files changed, 180 insertions(+), 108 deletions(-) create mode 100644 ldiskfs/kernel_patches/patches/rhel6.4/ext4-back-dquot-to.patch diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-back-dquot-to.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-back-dquot-to.patch index d95021e..e0bf364 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-back-dquot-to.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-back-dquot-to.patch @@ -70,18 +70,13 @@ Index: linux-stage/fs/ext4/inode.c if (ext4_should_order_data(inode)) ext4_begin_ordered_truncate(inode, 0); -@@ -230,12 +231,15 @@ void ext4_delete_inode(struct inode *ino +@@ -230,7 +231,10 @@ void ext4_delete_inode(struct inode *ino if (is_bad_inode(inode)) goto no_delete; +- handle = ext4_journal_start(inode, blocks_for_truncate(inode)+3); + if (!IS_NOQUOTA(inode)) + extra_credits += 2 * EXT4_QUOTA_DEL_BLOCKS(inode->i_sb); - /* - * Protect us against freezing - iput() caller didn't have to have any - * protection against it - */ - sb_start_intwrite(inode->i_sb); -- handle = ext4_journal_start(inode, blocks_for_truncate(inode)+3); + handle = ext4_journal_start(inode, + blocks_for_truncate(inode) + extra_credits); if (IS_ERR(handle)) { diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch index 6c7802c..3a37504 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-large-eas.patch @@ -292,7 +292,7 @@ Index: linux-stage/fs/ext4/xattr.c + + memcpy(bh->b_data, buf, csize); + set_buffer_uptodate(bh); -+ ext4_journal_dirty_metadata(handle, bh); ++ ext4_handle_dirty_metadata(handle, ea_inode, bh); + + buf += csize; + wsize += csize; diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-misc.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-misc.patch index f84dda6..c198df6 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-misc.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-misc.patch @@ -65,19 +65,6 @@ Index: linux-stage/fs/ext4/ext4_jbd2.c return err; } +EXPORT_SYMBOL(__ext4_handle_dirty_metadata); -Index: linux-stage/fs/ext4/ext4_jbd2.h -=================================================================== ---- linux-stage.orig/fs/ext4/ext4_jbd2.h 2011-05-20 10:59:29.000000000 +0300 -+++ linux-stage/fs/ext4/ext4_jbd2.h 2011-05-20 11:00:01.000000000 +0300 -@@ -35,6 +35,8 @@ - (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ - ? 27U : 8U) - -+#define ext4_journal_dirty_metadata(handle, bh) \ -+ ext4_handle_dirty_metadata(handle, NULL, bh) - /* Extended attribute operations touch at most two data buffers, - * two bitmap buffers, and two group summaries, in addition to the inode - * and the superblock, which are already accounted for. */ Index: linux-stage/fs/ext4/extents.c =================================================================== --- linux-stage.orig/fs/ext4/extents.c diff --git a/ldiskfs/kernel_patches/patches/rhel6.4/ext4-back-dquot-to.patch b/ldiskfs/kernel_patches/patches/rhel6.4/ext4-back-dquot-to.patch new file mode 100644 index 0000000..d95021e --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel6.4/ext4-back-dquot-to.patch @@ -0,0 +1,103 @@ +Index: linux-stage/fs/ext4/super.c +=================================================================== +--- linux-stage.orig/fs/ext4/super.c ++++ linux-stage/fs/ext4/super.c +@@ -1117,9 +1117,53 @@ static ssize_t ext4_quota_read(struct su + static ssize_t ext4_quota_write(struct super_block *sb, int type, + const char *data, size_t len, loff_t off); + ++static int ext4_dquot_initialize(struct inode *inode, int type) ++{ ++ handle_t *handle; ++ int ret, err; ++ ++ if (IS_NOQUOTA(inode)) ++ return 0; ++ ++ /* We may create quota structure so we need to reserve enough blocks */ ++ handle = ext4_journal_start(inode, 2*EXT4_QUOTA_INIT_BLOCKS(inode->i_sb)); ++ if (IS_ERR(handle)) ++ return PTR_ERR(handle); ++ ret = dquot_initialize(inode, type); ++ err = ext4_journal_stop(handle); ++ if (!ret) ++ ret = err; ++ return ret; ++} ++ ++static int ext4_dquot_drop(struct inode *inode) ++{ ++ handle_t *handle; ++ int ret, err; ++ ++ if (IS_NOQUOTA(inode)) ++ return 0; ++ ++ /* We may delete quota structure so we need to reserve enough blocks */ ++ handle = ext4_journal_start(inode, 2*EXT4_QUOTA_DEL_BLOCKS(inode->i_sb)); ++ if (IS_ERR(handle)) { ++ /* ++ * We call dquot_drop() anyway to at least release references ++ * to quota structures so that umount does not hang. ++ */ ++ dquot_drop(inode); ++ return PTR_ERR(handle); ++ } ++ ret = dquot_drop(inode); ++ err = ext4_journal_stop(handle); ++ if (!ret) ++ ret = err; ++ return ret; ++} ++ + static const struct dquot_operations ext4_quota_operations = { +- .initialize = dquot_initialize, +- .drop = dquot_drop, ++ .initialize = ext4_dquot_initialize, ++ .drop = ext4_dquot_drop, + .alloc_space = dquot_alloc_space, + .reserve_space = dquot_reserve_space, + .claim_space = dquot_claim_space, +Index: linux-stage/fs/ext4/inode.c +=================================================================== +--- linux-stage.orig/fs/ext4/inode.c ++++ linux-stage/fs/ext4/inode.c +@@ -222,6 +222,7 @@ void ext4_delete_inode(struct inode *ino + { + handle_t *handle; + int err; ++ int extra_credits = 3; + + if (ext4_should_order_data(inode)) + ext4_begin_ordered_truncate(inode, 0); +@@ -230,12 +231,15 @@ void ext4_delete_inode(struct inode *ino + if (is_bad_inode(inode)) + goto no_delete; + ++ if (!IS_NOQUOTA(inode)) ++ extra_credits += 2 * EXT4_QUOTA_DEL_BLOCKS(inode->i_sb); + /* + * Protect us against freezing - iput() caller didn't have to have any + * protection against it + */ + sb_start_intwrite(inode->i_sb); +- handle = ext4_journal_start(inode, blocks_for_truncate(inode)+3); ++ handle = ext4_journal_start(inode, ++ blocks_for_truncate(inode) + extra_credits); + if (IS_ERR(handle)) { + ext4_std_error(inode->i_sb, PTR_ERR(handle)); + /* +@@ -266,10 +270,10 @@ void ext4_delete_inode(struct inode *ino + * enough credits left in the handle to remove the inode from + * the orphan list and set the dtime field. + */ +- if (!ext4_handle_has_enough_credits(handle, 3)) { +- err = ext4_journal_extend(handle, 3); ++ if (!ext4_handle_has_enough_credits(handle, extra_credits)) { ++ err = ext4_journal_extend(handle, extra_credits); + if (err > 0) +- err = ext4_journal_restart(handle, 3); ++ err = ext4_journal_restart(handle, extra_credits); + if (err != 0) { + ext4_warning(inode->i_sb, + "couldn't extend journal (err %d)", err); diff --git a/ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch b/ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch index 24b7128..21ea811 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.4/ext4-misc.patch @@ -65,19 +65,6 @@ Index: linux-stage/fs/ext4/ext4_jbd2.c return err; } +EXPORT_SYMBOL(__ext4_handle_dirty_metadata); -Index: linux-stage/fs/ext4/ext4_jbd2.h -=================================================================== ---- linux-stage.orig/fs/ext4/ext4_jbd2.h -+++ linux-stage/fs/ext4/ext4_jbd2.h -@@ -35,6 +35,8 @@ - (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ - ? 27U : 8U) - -+#define ext4_journal_dirty_metadata(handle, bh) \ -+ ext4_handle_dirty_metadata(handle, NULL, bh) - /* Extended attribute operations touch at most two data buffers, - * two bitmap buffers, and two group summaries, in addition to the inode - * and the superblock, which are already accounted for. */ Index: linux-stage/fs/ext4/extents.c =================================================================== --- linux-stage.orig/fs/ext4/extents.c diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch index 5174912..5c1f182 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch @@ -1,7 +1,8 @@ -diff -u -r linux-stage.orig/fs/ext4/ext4.h linux-stage/fs/ext4/ext4.h ---- linux-stage.orig/fs/ext4/ext4.h 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/ext4.h 2012-12-31 15:14:03.000000000 -0500 -@@ -912,6 +912,7 @@ +Index: linux-3.0.101-0.5/fs/ext4/ext4.h +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/ext4.h ++++ linux-3.0.101-0.5/fs/ext4/ext4.h +@@ -911,6 +911,7 @@ struct ext4_inode_info { #define EXT4_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ #define EXT4_MOUNT_NO_AUTO_DA_ALLOC 0x10000 /* No auto delalloc mapping */ #define EXT4_MOUNT_BARRIER 0x20000 /* Use block barriers */ @@ -9,58 +10,62 @@ diff -u -r linux-stage.orig/fs/ext4/ext4.h linux-stage/fs/ext4/ext4.h #define EXT4_MOUNT_QUOTA 0x80000 /* Some quota option set */ #define EXT4_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ #define EXT4_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ -diff -u -r linux-stage.orig/fs/ext4/ext4_jbd2.h linux-stage/fs/ext4/ext4_jbd2.h ---- linux-stage.orig/fs/ext4/ext4_jbd2.h 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/ext4_jbd2.h 2012-12-31 15:07:34.000000000 -0500 +Index: linux-3.0.101-0.5/fs/ext4/ext4_jbd2.h +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/ext4_jbd2.h ++++ linux-3.0.101-0.5/fs/ext4/ext4_jbd2.h @@ -33,7 +33,7 @@ - + #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb) \ (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ - ? 27U : 8U) + || test_opt(sb, EXTENTS) ? 27U : 8U) - - #define ext4_journal_dirty_metadata(handle, bh) \ - ext4_handle_dirty_metadata(handle, NULL, bh) -diff -u -r linux-stage.orig/fs/ext4/extents.c linux-stage/fs/ext4/extents.c ---- linux-stage.orig/fs/ext4/extents.c 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/extents.c 2012-12-31 15:07:34.000000000 -0500 -@@ -2733,7 +2733,7 @@ + + /* Extended attribute operations touch at most two data buffers, + * two bitmap buffers, and two group summaries, in addition to the inode +Index: linux-3.0.101-0.5/fs/ext4/extents.c +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/extents.c ++++ linux-3.0.101-0.5/fs/ext4/extents.c +@@ -2751,7 +2751,7 @@ void ext4_ext_init(struct super_block *s * possible initialization would be here */ - + - if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { + if (test_opt(sb, EXTENTS)) { #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS) printk(KERN_INFO "EXT4-fs: file extents enabled"); #ifdef AGGRESSIVE_TEST -@@ -2760,7 +2760,7 @@ +@@ -2778,7 +2778,7 @@ void ext4_ext_init(struct super_block *s */ void ext4_ext_release(struct super_block *sb) { - if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) + if (!test_opt(sb, EXTENTS)) return; - + #ifdef EXTENTS_STATS -diff -u -r linux-stage.orig/fs/ext4/ialloc.c linux-stage/fs/ext4/ialloc.c ---- linux-stage.orig/fs/ext4/ialloc.c 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/ialloc.c 2012-12-31 15:07:34.000000000 -0500 -@@ -1057,7 +1057,7 @@ +Index: linux-3.0.101-0.5/fs/ext4/ialloc.c +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/ialloc.c ++++ linux-3.0.101-0.5/fs/ext4/ialloc.c +@@ -1054,7 +1054,7 @@ got: if (err) goto fail_free_drop; - + - if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { + if (test_opt(sb, EXTENTS)) { /* set extent flag only for directory, file and normal symlink*/ if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) { ext4_set_inode_flag(inode, EXT4_INODE_EXTENTS); -diff -u -r linux-stage.orig/fs/ext4/migrate.c linux-stage/fs/ext4/migrate.c ---- linux-stage.orig/fs/ext4/migrate.c 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/migrate.c 2012-12-31 15:07:34.000000000 -0500 -@@ -469,13 +469,10 @@ +Index: linux-3.0.101-0.5/fs/ext4/migrate.c +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/migrate.c ++++ linux-3.0.101-0.5/fs/ext4/migrate.c +@@ -469,13 +469,10 @@ int ext4_ext_migrate(struct inode *inode unsigned long max_entries; __u32 goal; - + - /* - * If the filesystem does not support extents, or the inode - * already is extent-based, error out. @@ -73,12 +78,13 @@ diff -u -r linux-stage.orig/fs/ext4/migrate.c linux-stage/fs/ext4/migrate.c + * if mounted with noextents we don't allow the migrate + */ return -EINVAL; - + if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0) -diff -u -r linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c ---- linux-stage.orig/fs/ext4/super.c 2012-12-31 15:07:27.000000000 -0500 -+++ linux-stage/fs/ext4/super.c 2012-12-31 15:15:49.000000000 -0500 -@@ -1078,6 +1078,8 @@ +Index: linux-3.0.101-0.5/fs/ext4/super.c +=================================================================== +--- linux-3.0.101-0.5.orig/fs/ext4/super.c ++++ linux-3.0.101-0.5/fs/ext4/super.c +@@ -1128,6 +1128,8 @@ static int ext4_show_options(struct seq_ seq_puts(seq, ",journal_async_commit"); else if (test_opt(sb, JOURNAL_CHECKSUM)) seq_puts(seq, ",journal_checksum"); @@ -87,15 +93,15 @@ diff -u -r linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c if (test_opt(sb, I_VERSION)) seq_puts(seq, ",i_version"); if (!test_opt(sb, DELALLOC) && -@@ -1303,6 +1305,7 @@ +@@ -1369,6 +1371,7 @@ enum { Opt_inode_readahead_blks, Opt_journal_ioprio, Opt_dioread_nolock, Opt_dioread_lock, Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb, + Opt_extents, Opt_noextents, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, }; - -@@ -1380,6 +1383,8 @@ + +@@ -1446,6 +1449,8 @@ static const match_table_t tokens = { {Opt_bigendian_extents, "bigendian_extents"}, {Opt_force_over_128tb, "force_over_128tb"}, {Opt_mballoc, "mballoc"}, @@ -104,15 +110,15 @@ diff -u -r linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c {Opt_discard, "discard"}, {Opt_nodiscard, "nodiscard"}, {Opt_init_itable, "init_itable=%u"}, -@@ -1472,6 +1477,7 @@ +@@ -1538,6 +1543,7 @@ static int clear_qf_name(struct super_bl return 1; } #endif + ext4_fsblk_t last_block; - + static int parse_options(char *options, struct super_block *sb, unsigned long *journal_devnum, -@@ -1887,6 +1893,32 @@ +@@ -1953,6 +1959,32 @@ set_qf_format: case Opt_force_over_128tb: force_over_128tb = 1; break; @@ -145,9 +151,9 @@ diff -u -r linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c default: ext4_msg(sb, KERN_ERR, "Unrecognized mount option \"%s\" " -@@ -3206,6 +3238,14 @@ +@@ -3276,6 +3308,14 @@ static int ext4_fill_super(struct super_ set_opt(sb, BARRIER); - + /* + * turn on extents feature by default in ext4 filesystem + * only if feature flag already set by mkfs or tune2fs. diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch index 3a7e7c3..ca8d594 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-large-eas.patch @@ -305,7 +305,7 @@ diff -ur linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c + + memcpy(bh->b_data, buf, csize); + set_buffer_uptodate(bh); -+ ext4_journal_dirty_metadata(handle, bh); ++ ext4_handle_dirty_metadata(handle, ea_inode, bh); + + buf += csize; + wsize += csize; diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch index 6e5e191..c3c1a51 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-misc.patch @@ -63,15 +63,6 @@ struct ext4_extent *ex2); --- a/fs/ext4/ext4_jbd2.h +++ b/fs/ext4/ext4_jbd2.h -@@ -35,6 +35,8 @@ - (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ - ? 27U : 8U) - -+#define ext4_journal_dirty_metadata(handle, bh) \ -+ ext4_handle_dirty_metadata(handle, NULL, bh) - /* Extended attribute operations touch at most two data buffers, - * two bitmap buffers, and two group summaries, in addition to the inode - * and the superblock, which are already accounted for. */ @@ -175,6 +177,7 @@ static inline void ext4_journal_callback list_del_init(&jce->jce_list); spin_unlock(&sbi->s_md_lock); diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series index ae4ae28..b12f32f 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series @@ -31,7 +31,7 @@ rhel6.4/ext4-mballoc-pa_free-mismatch.patch rhel6.3/ext4-data-in-dirent.patch rhel6.3/ext4-large-eas.patch rhel6.3/ext4-disable-mb-cache.patch -rhel6.3/ext4-back-dquot-to.patch +rhel6.4/ext4-back-dquot-to.patch rhel6.3/ext4-nocmtime-2.6.patch rhel6.3/ext4-journal-callback.patch rhel6.3/ext4-store-tree-generation-at-find.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series index 2d5ba77..ce0e862 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series @@ -31,7 +31,7 @@ rhel6.4/ext4-mballoc-pa_free-mismatch.patch rhel6.3/ext4-data-in-dirent.patch rhel6.3/ext4-large-eas.patch rhel6.3/ext4-disable-mb-cache.patch -rhel6.3/ext4-back-dquot-to.patch +rhel6.4/ext4-back-dquot-to.patch rhel6.3/ext4-nocmtime-2.6.patch rhel6.3/ext4-journal-callback.patch rhel6.5/ext4-ext-walk-space.patch 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 0c40d6c..ba3bf0c 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series @@ -30,7 +30,7 @@ rhel6.4/ext4-mballoc-pa_free-mismatch.patch rhel6.3/ext4-data-in-dirent.patch rhel6.3/ext4-large-eas.patch rhel6.3/ext4-disable-mb-cache.patch -rhel6.3/ext4-back-dquot-to.patch +rhel6.4/ext4-back-dquot-to.patch rhel6.3/ext4-nocmtime-2.6.patch rhel6.3/ext4-journal-callback.patch rhel6.5/ext4-ext-walk-space.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series index 1fc8869..0e9bb9f 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series @@ -32,7 +32,7 @@ rhel6.3/ext4-mballoc-pa_free-mismatch.patch rhel6.3/ext4-data-in-dirent.patch rhel6.3/ext4-large-eas.patch rhel6.3/ext4-disable-mb-cache.patch -rhel6.3/ext4-back-dquot-to.patch +rhel6.4/ext4-back-dquot-to.patch rhel6.3/ext4-nocmtime-2.6.patch rhel6.3/ext4-export-64bit-name-hash.patch rhel6.3/ext4-journal-callback.patch diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c index a813214..ca2dc18 100644 --- a/lustre/osd-ldiskfs/osd_compat.c +++ b/lustre/osd-ldiskfs/osd_compat.c @@ -600,7 +600,7 @@ update: GOTO(out, rc); de->inode = cpu_to_le32(id->oii_ino); - rc = ldiskfs_journal_dirty_metadata(th, bh); + rc = ldiskfs_handle_dirty_metadata(th, NULL, bh); GOTO(out, rc); diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 9cf34d5..3f8afd6 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -3989,8 +3989,8 @@ static int __osd_ea_add_rec(struct osd_thread_info *info, else de->file_type = LDISKFS_DIRENT_LUFID | LDISKFS_FT_DIR; - ldiskfs_journal_dirty_metadata(oth->ot_handle, - bh); + ldiskfs_handle_dirty_metadata(oth->ot_handle, + NULL, bh); brelse(bh); } } @@ -5210,7 +5210,7 @@ osd_dirent_update(handle_t *jh, struct super_block *sb, rec = (struct osd_fid_pack *)(de->name + de->name_len + 1); fid_cpu_to_be((struct lu_fid *)rec->fp_area, fid); - rc = ldiskfs_journal_dirty_metadata(jh, bh); + rc = ldiskfs_handle_dirty_metadata(jh, NULL, bh); RETURN(rc); } @@ -5268,7 +5268,7 @@ osd_dirent_reinsert(const struct lu_env *env, handle_t *jh, fid_cpu_to_be((struct lu_fid *)rec->fp_area, fid); de->file_type |= LDISKFS_DIRENT_LUFID; - rc = ldiskfs_journal_dirty_metadata(jh, bh); + rc = ldiskfs_handle_dirty_metadata(jh, NULL, bh); RETURN(rc); } diff --git a/lustre/osd-ldiskfs/osd_iam.c b/lustre/osd-ldiskfs/osd_iam.c index 3277e14..bac0084b 100644 --- a/lustre/osd-ldiskfs/osd_iam.c +++ b/lustre/osd-ldiskfs/osd_iam.c @@ -605,7 +605,7 @@ static int iam_txn_dirty(handle_t *handle, { int result; - result = ldiskfs_journal_dirty_metadata(handle, bh); + result = ldiskfs_handle_dirty_metadata(handle, NULL, bh); if (result != 0) ldiskfs_std_error(iam_path_obj(path)->i_sb, result); return result; @@ -1682,7 +1682,7 @@ iam_new_node(handle_t *h, struct iam_container *c, iam_ptr_t *b, int *e) --count; *b = le32_to_cpu(head->iih_blks[count]); head->iih_count = cpu_to_le16(count); - *e = ldiskfs_journal_dirty_metadata(h, c->ic_idle_bh); + *e = ldiskfs_handle_dirty_metadata(h, inode, c->ic_idle_bh); if (*e != 0) goto fail; @@ -1706,7 +1706,7 @@ iam_new_node(handle_t *h, struct iam_container *c, iam_ptr_t *b, int *e) iam_lock_bh(c->ic_root_bh); *idle_blocks = head->iih_next; iam_unlock_bh(c->ic_root_bh); - *e = ldiskfs_journal_dirty_metadata(h, c->ic_root_bh); + *e = ldiskfs_handle_dirty_metadata(h, inode, c->ic_root_bh); if (*e != 0) { iam_lock_bh(c->ic_root_bh); *idle_blocks = cpu_to_le32(*b); @@ -2068,7 +2068,7 @@ int split_index_node(handle_t *handle, struct iam_path *path, ++ frame; assert_inv(dx_node_check(path, frame)); bh_new[0] = NULL; /* buffer head is "consumed" */ - err = ldiskfs_journal_dirty_metadata(handle, bh2); + err = ldiskfs_handle_dirty_metadata(handle, NULL, bh2); if (err) goto journal_error; do_corr(schedule()); @@ -2100,16 +2100,17 @@ int split_index_node(handle_t *handle, struct iam_path *path, dxtrace(dx_show_index ("node", frame->entries)); dxtrace(dx_show_index ("node", ((struct dx_node *) bh2->b_data)->entries)); - err = ldiskfs_journal_dirty_metadata(handle, bh2); + err = ldiskfs_handle_dirty_metadata(handle, NULL, bh2); if (err) goto journal_error; do_corr(schedule()); - err = ldiskfs_journal_dirty_metadata(handle, parent->bh); + err = ldiskfs_handle_dirty_metadata(handle, NULL, + parent->bh); if (err) goto journal_error; } do_corr(schedule()); - err = ldiskfs_journal_dirty_metadata(handle, bh); + err = ldiskfs_handle_dirty_metadata(handle, NULL, bh); if (err) goto journal_error; } diff --git a/lustre/osd-ldiskfs/osd_iam_lfix.c b/lustre/osd-ldiskfs/osd_iam_lfix.c index ccda830..897d9da 100644 --- a/lustre/osd-ldiskfs/osd_iam_lfix.c +++ b/lustre/osd-ldiskfs/osd_iam_lfix.c @@ -869,9 +869,10 @@ int iam_lfix_create(struct inode *obj, lfix_root(root_node->b_data, bsize, keysize, ptrsize, recsize); lfix_leaf(leaf_node->b_data, bsize, keysize, ptrsize, recsize); ldiskfs_mark_inode_dirty(handle, obj); - result = ldiskfs_journal_dirty_metadata(handle, root_node); - if (result == 0) - result = ldiskfs_journal_dirty_metadata(handle, leaf_node); + result = ldiskfs_handle_dirty_metadata(handle, NULL, root_node); + if (result == 0) + result = ldiskfs_handle_dirty_metadata(handle, NULL, + leaf_node); if (result != 0) ldiskfs_std_error(sb, result); } diff --git a/lustre/osd-ldiskfs/osd_iam_lvar.c b/lustre/osd-ldiskfs/osd_iam_lvar.c index 516ee02..07fa84b 100644 --- a/lustre/osd-ldiskfs/osd_iam_lvar.c +++ b/lustre/osd-ldiskfs/osd_iam_lvar.c @@ -1023,9 +1023,10 @@ int iam_lvar_create(struct inode *obj, lvar_root(root_node->b_data, bsize, keysize, ptrsize, recsize); lvar_leaf(leaf_node->b_data, bsize, keysize, ptrsize, recsize); ldiskfs_mark_inode_dirty(handle, obj); - result = ldiskfs_journal_dirty_metadata(handle, root_node); - if (result == 0) - result = ldiskfs_journal_dirty_metadata(handle, leaf_node); + result = ldiskfs_handle_dirty_metadata(handle, NULL, root_node); + if (result == 0) + result = ldiskfs_handle_dirty_metadata(handle, NULL, + leaf_node); if (result != 0) ldiskfs_std_error(sb, result); } diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index 15850c3..d731d4a 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -1640,7 +1640,7 @@ int osd_ldiskfs_write_record(struct inode *inode, void *buf, int bufsize, "boffs %d size %d bh->b_size %lu\n", boffs, size, (unsigned long)bh->b_size); memcpy(bh->b_data + boffs, buf, size); - err = ldiskfs_journal_dirty_metadata(handle, bh); + err = ldiskfs_handle_dirty_metadata(handle, NULL, bh); if (err) break; -- 1.8.3.1