From 70ddc764c9022b2e466fd8531a27a8c3a41f919f Mon Sep 17 00:00:00 2001 From: alex_tomas Date: Sat, 12 Jul 2003 09:51:49 +0000 Subject: [PATCH] - inode-protection-from-pdflush.patch: an inode may have I_SKIP_PDFLUSH flag which protects it from to be processed by pdflush's writeback mechanism. this allows us to work locking problem with lustre_fwrite() around - MDS sets I_SKIP_PDFLUSH flag on 'last record' file - filter_prep() sets I_SKIP_PDFLUSH flag - inode-protection-from-pdflush.patch has been included in kgdb-2.5.73 series --- .../patches/inode-protection-from-pdflush.patch | 23 ++++++++++++++++++++++ .../pc/inode-protection-from-pdflush.pc | 1 + 2 files changed, 24 insertions(+) create mode 100644 lustre/kernel_patches/patches/inode-protection-from-pdflush.patch create mode 100644 lustre/kernel_patches/pc/inode-protection-from-pdflush.pc diff --git a/lustre/kernel_patches/patches/inode-protection-from-pdflush.patch b/lustre/kernel_patches/patches/inode-protection-from-pdflush.patch new file mode 100644 index 0000000..4273871 --- /dev/null +++ b/lustre/kernel_patches/patches/inode-protection-from-pdflush.patch @@ -0,0 +1,23 @@ + +we need some inode to be skipped by pdflush because we use +unusual lock order (first, open transaction, then lock page) + + + +diff -puN fs/fs-writeback.c~inode-protection-from-pdflush fs/fs-writeback.c +--- linux-2.5.73-cfs/fs/fs-writeback.c~inode-protection-from-pdflush Fri Jul 4 01:44:22 2003 ++++ linux-2.5.73-cfs-alexey/fs/fs-writeback.c Fri Jul 4 03:00:37 2003 +@@ -198,6 +198,11 @@ static void + __writeback_single_inode(struct inode *inode, + struct writeback_control *wbc) + { ++ if (inode->i_flags & I_SKIP_PDFLUSH) { ++ list_move(&inode->i_list, &inode->i_sb->s_dirty); ++ return; ++ } ++ + if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) { + list_move(&inode->i_list, &inode->i_sb->s_dirty); + return; + +_ diff --git a/lustre/kernel_patches/pc/inode-protection-from-pdflush.pc b/lustre/kernel_patches/pc/inode-protection-from-pdflush.pc new file mode 100644 index 0000000..ae5cab6 --- /dev/null +++ b/lustre/kernel_patches/pc/inode-protection-from-pdflush.pc @@ -0,0 +1 @@ +fs/fs-writeback.c -- 1.8.3.1