aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree/linux/kernel.h
diff options
context:
space:
mode:
authorEric Ren <[email protected]>2016-08-02 14:02:10 -0700
committerLinus Torvalds <[email protected]>2016-08-02 17:31:41 -0400
commit2070ad1aebfff2c26190188844c38e55d2df2ae2 (patch)
tree8e144229b87b8daf0767efb0e688d36ddad88f7a /tools/testing/radix-tree/linux/kernel.h
parent01a36b6758e723f919420ef20cea5fca1fc06e2b (diff)
ocfs2: retry on ENOSPC if sufficient space in truncate log
The testcase "mmaptruncate" in ocfs2 test suite always fails with ENOSPC error on small volume (say less than 10G). This testcase repeatedly performs "extend" and "truncate" on a file. Continuously, it truncates the file to 1/2 of the size, and then extends to 100% of the size. The main bitmap will quickly run out of space because the "truncate" code prevent truncate log from being flushed by ocfs2_schedule_truncate_log_flush(osb, 1), while truncate log may have cached lots of clusters. So retry to allocate after flushing truncate log when ENOSPC is returned. And we cannot reuse the deleted blocks before the transaction committed. Fortunately, we already have a function to do this - ocfs2_try_to_free_truncate_log(). Just need to remove the "static" modifier and put it into the right place. The "unlock"/"lock" code isn't elegant, but there seems to be no better option. [[email protected]: locking fix] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Eric Ren <[email protected]> Reviewed-by: Gang He <[email protected]> Reviewed-by: Joseph Qi <[email protected]> Reviewed-by: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/linux/kernel.h')
0 files changed, 0 insertions, 0 deletions