diff options
author | Alexander Zarochentzev <zam@namesys.com> | 2006-03-25 06:06:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:22:51 -0500 |
commit | 23f9e0f891c9b159a199629d4426f6ae0c383508 (patch) | |
tree | bc34ab7abe6de4d7b3a7741c1ab5d97ddc29f133 /include/linux/reiserfs_fs.h | |
parent | bdfc326614b90e7bc47ee4a8fed05988555f0169 (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/reiserfs_fs.h')
-rw-r--r-- | include/linux/reiserfs_fs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index dad78cecfd20..912f1b7cb18f 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) | |||
1704 | return 0; | 1704 | return 0; |
1705 | } | 1705 | } |
1706 | 1706 | ||
1707 | static inline int reiserfs_transaction_free_space(struct reiserfs_transaction_handle *th) | ||
1708 | { | ||
1709 | return th->t_blocks_allocated - th->t_blocks_logged; | ||
1710 | } | ||
1711 | |||
1707 | int reiserfs_async_progress_wait(struct super_block *s); | 1712 | int reiserfs_async_progress_wait(struct super_block *s); |
1708 | 1713 | ||
1709 | struct reiserfs_transaction_handle *reiserfs_persistent_transaction(struct | 1714 | struct reiserfs_transaction_handle *reiserfs_persistent_transaction(struct |