diff options
author | Alexander Zarochentzev <zam@namesys.com> | 2006-03-25 03:06:57 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:22:51 -0800 |
commit | 23f9e0f891c9b159a199629d4426f6ae0c383508 (patch) | |
tree | bc34ab7abe6de4d7b3a7741c1ab5d97ddc29f133 /include | |
parent | bdfc326614b90e7bc47ee4a8fed05988555f0169 (diff) | |
download | talos-op-linux-23f9e0f891c9b159a199629d4426f6ae0c383508.tar.gz talos-op-linux-23f9e0f891c9b159a199629d4426f6ae0c383508.zip |
[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')
-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) 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 |