LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 11-15-2012, 03:12 AM   #1
Timbuktu85
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
Question bio structure - control over creation


Hi all,

I'm creating a block driver, and have some problems with configuring the request.

The characteristics of my device are very similar to those of NAND flash, i.e., there is no benefits from sequential IOs (time for random IO is constant - no mechanics, no positioning).

I use "make_request" approach in driver.
The size of logical blocks (IO units) can vary (depending on the initial configuration of a device): 512, 1024, 2048, 4096,...

Question 1:
If the size of logical block is less than PAGE_SIZE (e.g., 512Kb, 1024Kb), could I somehow tell a system to create bio's only 1 logical block in size?
The minimal value for max_hw_sectors (set via blk_queue_max_hw_sectors) is 8 =>so it is not suited to restrict bio to be always, for example, 512 bytes.

Question 2:
Here, as opposite to question 1, the bio can consist of multiple logical blocks. If one logical block is represented via multiple segments (bi_vec) - it's ok. The problem is when one segment (bi_vec) refferes to data from multiple logical blocks. Is it possible somehow to control the segmentation of bio or to align the segemnts to logical blocks?

Thanks a lot for any help!
 
  


Reply

Tags
block device


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Block Bio Issue.... pvsachindranath Linux - Kernel 2 10-19-2011 12:13 AM
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 09:18 AM
bio-linux MightyU Linux - Distributions 0 02-17-2006 08:54 AM
bio's not detecting cdrom chemichael Fedora 5 09-26-2005 10:09 AM
trying to access the bio of an old lapop Nadim Linux - Laptop and Netbook 2 04-18-2004 11:07 AM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration