xfs: debug mode forced buffered write failure
authorBrian Foster <bfoster@redhat.com>
Tue, 15 Mar 2016 00:42:44 +0000 (11:42 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 15 Mar 2016 00:42:44 +0000 (11:42 +1100)
commit801cc4e17a34c32e1527827292fac9cec5d3393b
tree5752941e5b8a96f5a839f38ba444a4cbec0f6476
parent36f90b0a2ddd60823fe193a85e60ff1906c2a9b3
xfs: debug mode forced buffered write failure

Add a DEBUG mode-only sysfs knob to enable forced buffered write
failure. An additional side effect of this mode is brute force killing
of delayed allocation blocks in the range of the write. The latter is
the prime motiviation behind this patch, as userspace test
infrastructure requires a reliable mechanism to create and split
delalloc extents without causing extent conversion.

Certain fallocate operations (i.e., zero range) were used for this in
the past, but the implementations have changed such that delalloc
extents are flushed and converted to real blocks, rendering the test
useless.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_aops.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_sysfs.c