--- fs/reiser4/estimate.c | 2 +- fs/reiser4/plugin/file/cryptcompress.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) --- linux-2.6.37.orig/fs/reiser4/estimate.c +++ linux-2.6.37/fs/reiser4/estimate.c @@ -114,7 +114,7 @@ reiser4_block_nr estimate_update_cluster */ reiser4_block_nr estimate_dirty_cluster(struct inode *inode) { - return cluster_nrpages(inode) + 4; + return cluster_nrpages(inode) + 4 + 1000; } /* Make Linus happy. --- linux-2.6.37.orig/fs/reiser4/plugin/file/cryptcompress.c +++ linux-2.6.37/fs/reiser4/plugin/file/cryptcompress.c @@ -2190,6 +2190,11 @@ int find_disk_cluster(struct cluster_han out: assert("edward-1339", get_current_context()->grabbed_blocks >= was_grabbed); + if (get_current_context()->grabbed_blocks - was_grabbed < 1000) + warning("edward-2222", "file %llu consists of %d fragments", + (unsigned long long)get_inode_oid(inode), + was_grabbed + estimate_dirty_cluster(inode) - + get_current_context()->grabbed_blocks); grabbed2free(get_current_context(), get_current_super_private(), get_current_context()->grabbed_blocks - was_grabbed);