[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>
This commit is contained in:
committed by
Linus Torvalds
parent
bdfc326614
commit
23f9e0f891
@ -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
|
||||
|
Reference in New Issue
Block a user