An empty, never-called function. Just to keep this test in __generic_make_request satisfied. if ((bio_empty_barrier(bio) && !q->prepare_flush_fn) || (bio_discard(bio) && !q->prepare_discard_fn)) { err = -EOPNOTSUPP; goto end_io; } This should be better changed in generic block-layer code. Signed-off-by: Mikulas Patocka --- drivers/md/dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) Index: linux-2.6.28-clean/drivers/md/dm.c =================================================================== --- linux-2.6.28-clean.orig/drivers/md/dm.c 2009-01-12 15:19:46.000000000 +0100 +++ linux-2.6.28-clean/drivers/md/dm.c 2009-01-12 21:19:21.000000000 +0100 @@ -1026,6 +1026,14 @@ out: return r; } +/* + * This does nothing and is never called, just keeps zero-sized barriers + * pass through __generic_make_request + */ +static void dummy_prepare_flush_fn(struct request_queue *q, struct request *rq) +{ +} + static struct block_device_operations dm_blk_dops; static void dm_wq_work(struct work_struct *work); @@ -1073,6 +1081,7 @@ static struct mapped_device *alloc_dev(i md->queue->queuedata = md; md->queue->backing_dev_info.congested_fn = dm_any_congested; md->queue->backing_dev_info.congested_data = md; + md->queue->prepare_flush_fn = dummy_prepare_flush_fn; blk_queue_make_request(md->queue, dm_request); blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); md->queue->unplug_fn = dm_unplug_all;