public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* custom block device driver with 6k block size...
@ 2015-04-28 21:32 Rob Harris
  0 siblings, 0 replies; only message in thread
From: Rob Harris @ 2015-04-28 21:32 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-28 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 21:32 custom block device driver with 6k block size Rob Harris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox