r2038 - trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches
Andres Salomon
dilinger-guest@haydn.debian.org
Thu, 23 Dec 2004 14:24:56 -0700
Author: dilinger-guest
Date: 2004-12-23 14:24:32 -0700 (Thu, 23 Dec 2004)
New Revision: 2038
Added:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/reiserfs-sucks-4.dpatch
Log:
another reiser patch; required for compilation
Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/reiserfs-sucks-4.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/reiserfs-sucks-4.dpatch 2004-12-23 16:08:13 UTC (rev 2037)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/reiserfs-sucks-4.dpatch 2004-12-23 21:24:32 UTC (rev 2038)
@@ -0,0 +1,93 @@
+#! /bin/sh -e
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ReiserFS: change commit_for_inode to report failures
+## DP: Patch author: Andres Salomon <dilinger@voxel.net>, taken from BK
+## DP: Upstream status: backported
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- orig/fs/reiserfs/journal.c 2004-12-23 16:13:40.000000000 -0500
++++ mod/fs/reiserfs/journal.c 2004-12-23 16:19:47.000000000 -0500
+@@ -3302,12 +3302,13 @@
+ REISERFS_I(inode)->i_trans_id = journal->j_trans_id ;
+ }
+
+-static void __commit_trans_jl(struct inode *inode, unsigned long id,
++static int __commit_trans_jl(struct inode *inode, unsigned long id,
+ struct reiserfs_journal_list *jl)
+ {
+ struct reiserfs_transaction_handle th ;
+ struct super_block *sb = inode->i_sb ;
+ struct reiserfs_journal *journal = SB_JOURNAL (sb);
++ int ret = 0;
+
+ /* is it from the current transaction, or from an unknown transaction? */
+ if (id == journal->j_trans_id) {
+@@ -3318,17 +3319,21 @@
+ goto flush_commit_only;
+ }
+
+- journal_begin(&th, sb, 1) ;
++ ret = journal_begin(&th, sb, 1) ;
++ if (ret)
++ return ret;
+
+ /* someone might have ended this transaction while we joined */
+ if (journal->j_trans_id != id) {
+ reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), 1) ;
+ journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)) ;
+- journal_end(&th, sb, 1) ;
++ ret = journal_end(&th, sb, 1) ;
+ goto flush_commit_only;
+ }
+
+- journal_end_sync(&th, sb, 1) ;
++ ret = journal_end_sync(&th, sb, 1) ;
++ if (!ret)
++ ret = 1;
+
+ } else {
+ /* this gets tricky, we have to make sure the journal list in
+@@ -3337,15 +3342,18 @@
+ */
+ flush_commit_only:
+ if (journal_list_still_alive(inode->i_sb, id)) {
++ if (atomic_read(&jl->j_commit_left) > 1)
++ ret = 1;
+ flush_commit_list(sb, jl, 1) ;
+ if (journal->j_errno)
+ ret = journal->j_errno;
+ }
+ }
+ /* otherwise the list is gone, and long since committed */
++ return ret;
+ }
+
+-void reiserfs_commit_for_inode(struct inode *inode) {
++int reiserfs_commit_for_inode(struct inode *inode) {
+ unsigned long id = REISERFS_I(inode)->i_trans_id;
+ struct reiserfs_journal_list *jl = REISERFS_I(inode)->i_jl;
+
+@@ -3358,7 +3366,7 @@
+ /* jl will be updated in __commit_trans_jl */
+ }
+
+- __commit_trans_jl(inode, id, jl);
++ return __commit_trans_jl(inode, id, jl);
+ }
+
+ void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb,
+--- orig/include/linux/reiserfs_fs.h 2004-12-23 16:23:43.000000000 -0500
++++ mod/include/linux/reiserfs_fs.h 2004-12-23 16:23:53.000000000 -0500
+@@ -1793,7 +1793,7 @@
+ int reiserfs_commit_page(struct inode *inode, struct page *page,
+ unsigned from, unsigned to);
+ int reiserfs_flush_old_commits(struct super_block *);
+-void reiserfs_commit_for_inode(struct inode *) ;
++int reiserfs_commit_for_inode(struct inode *) ;
+ void reiserfs_update_inode_transaction(struct inode *) ;
+ void reiserfs_wait_on_write_block(struct super_block *s) ;
+ void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ;