]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ocfs2: Try to free truncate log when meeting ENOSPC in write.
authorTao Ma <tao.ma@oracle.com>
Thu, 4 Nov 2010 07:14:11 +0000 (15:14 +0800)
committerJoel Becker <joel.becker@oracle.com>
Thu, 16 Dec 2010 08:46:02 +0000 (00:46 -0800)
commit50308d813bf26500fed671882469939fd19403a3
tree4fab5caccf450f3528c1e88c7a0299680578c1ec
parentb0c3844d8af6b9f3f18f31e1b0502fbefa2166be
ocfs2: Try to free truncate log when meeting ENOSPC in write.

Recently, one of our colleagues meet with a problem that if we
write/delete a 32mb files repeatly, we will get an ENOSPC in
the end. And the corresponding bug is 1288.
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1288

The real problem is that although we have freed the clusters,
they are in truncate log and they will be summed up so that
we can free them once in a whole.

So this patch just try to resolve it. In case we see -ENOSPC
in ocfs2_write_begin_no_lock, we will check whether the truncate
log has enough clusters for our need, if yes, we will try to
flush the truncate log at that point and try again. This method
is inspired by Mark Fasheh <mfasheh@suse.com>. Thanks.

Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/alloc.c
fs/ocfs2/aops.c
fs/ocfs2/ocfs2.h