aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexander Zarochentzev <zam@namesys.com>2006-03-25 03:06:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:22:51 -0800
commit23f9e0f891c9b159a199629d4426f6ae0c383508 (patch)
treebc34ab7abe6de4d7b3a7741c1ab5d97ddc29f133 /include/linux
parentbdfc326614b90e7bc47ee4a8fed05988555f0169 (diff)
[PATCH] reiserfs: fix transaction overflowing
This patch fixes a bug in reiserfs truncate. A transaction might overflow when truncating long highly fragmented file. The fix is to split truncation into several transactions to avoid overflowing. Signed-off-by: Vladimir V. Saveliev <vs@namesys.com> Cc; Charles McColgan <cm@chuck.net> Cc: Alexander Zarochentsev <zam@namesys.com> Cc: Hans Reiser <reiser@namesys.com> Cc: Chris Mason <mason@suse.com> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/reiserfs_fs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index dad78cecfd2..912f1b7cb18 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1704,6 +1704,11 @@ static inline int reiserfs_transaction_running(struct super_block *s)
return 0;
}
+static inline int reiserfs_transaction_free_space(struct reiserfs_transaction_handle *th)
+{
+ return th->t_blocks_allocated - th->t_blocks_logged;
+}
+
int reiserfs_async_progress_wait(struct super_block *s);
struct reiserfs_transaction_handle *reiserfs_persistent_transaction(struct