[<prev] [next>] [day] [month] [year] [list]
Message-ID: <553FFC6B.3080302@gmail.com>
Date: Tue, 28 Apr 2015 17:32:27 -0400
From: Rob Harris <rob.harris@...il.com>
To: linux-kernel@...r.kernel.org
Subject: custom block device driver with 6k block size...
Greetings.
I've been working on developing a custom block device that
(unfortunately) uses 6k block sizes. I've been trying to deal directly
with the BIO's (make_request_fn) and even though I've configured the
request_queue as follows...
blk_queue_io_min( smc_dev->req_queue, SIX_KB );
blk_queue_io_opt( smc_dev->req_queue, TWELVE_KB );
blk_queue_max_segments( smc_dev->req_queue, SIX_KB * 100 / TWELVE_KB );
blk_queue_max_segment_size( smc_dev->req_queue, SIX_KB * 100 );
blk_queue_max_hw_sectors( smc_dev->req_queue, SIX_KB * 100 / 512 );
blk_queue_logical_block_size( smc_dev->req_queue, SIX_KB );
blk_queue_physical_block_size( smc_dev->req_queue, SIX_KB );
blk_queue_segment_boundary( smc_dev->req_queue, SIX_KB-1 );
queue_flag_set_unlocked( QUEUE_FLAG_NONROT, smc_dev->req_queue );
queue_flag_clear_unlocked( QUEUE_FLAG_ADD_RANDOM, smc_dev->req_queue );
... I still seem to always get handed BIO's with PAGE_SIZE(4k)
segment_sizes in the bio_vec and I never seem to get any sort of bio_vec
coalescing when trying a blk_bio_map_sg. Everything returned is always
small (if at all) multiples of PAGE_SIZE. I would love to DMA large
buffers directly back and forth to the controller, but offsetting the
delta between the 4k and 6k offset is a pain.
Is there something simple that I'm missing or doing wrong?
Thanks,
-Rob Harris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists