kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: vic.lix10@gmail.com (Vic)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question on hd_geometry & blk_rq_cur_sectors
Date: Tue, 3 May 2011 20:43:19 -0700	[thread overview]
Message-ID: <BANLkTin_waCfjXkq4QWgrXQS=wW8kU0vMg@mail.gmail.com> (raw)

Hi All,
I have 2 questions on creating a ramdisk driver.

How do I init the hd_geometry for my device ie to say how do I set geo
cylinders, head, sectors and size. As this is ramdisk I dont think it
matters but want to confirm.
geo->cylinders = 1;
geo->heads = 1;
geo->sectors = Device.size/logical_block_size;
geo->start = 0;

Also, with my current settings, if I use DD on my ramdisk I get
"blk_rq_cur_sectors" count to be always 8, which confuses my drive b'se I
want to only handle 512 requests at a time.

Simple command to test the disk sing DD "sudo dd if=/dev/urandom
of=/dev/sbd0 bs=512 count=1"
with bs=512 I was hoping to see only the 512 byte request
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110503/44ed05be/attachment.html 

             reply	other threads:[~2011-05-04  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04  3:43 Vic [this message]
2011-05-04  5:24 ` Question on hd_geometry & blk_rq_cur_sectors Mulyadi Santosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTin_waCfjXkq4QWgrXQS=wW8kU0vMg@mail.gmail.com' \
    --to=vic.lix10@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).