All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shesha B. " Sreenivasamurthy <shesha@inostor.com>
To: Lei Yang <lya755@ece.northwestern.edu>
Cc: LinuxKernel Group <linux-kernel@vger.kernel.org>,
	kernelnewbies <kernelnewbies@nl.linux.org>
Subject: Re: set blksize of block device
Date: 28 Oct 2004 09:35:26 -0700	[thread overview]
Message-ID: <1098981325.3279.5.camel@arcane> (raw)
In-Reply-To: <41804F04.4000300@ece.northwestern.edu>

Firstly you cannot set the block size to lesser than 512. 

When there is a request for the IO, you populate "struct req" data
structure which you will pass it to the kernel or lower level SCSI/SATA
driver. In the "struct req" there is a field "b_size" which may be what
you are interested in. At the user level you can use the IOCTLs to set
the block size of the RAW block device.

-Shesha

On Wed, 2004-10-27 at 18:44, Lei Yang wrote:
> If nobody could answer this question, what about another one? Is there a 
> system call or a kernel interface that would allow me to write a block 
> of data to block 1 of a certain block device?
> 
> Thanks for your reply in advance!
> 
> Lei
> 
> Lei Yang wrote:
> 
> > Please cc me if you have answers to this, I am not on the list. Thanks 
> > a lot!
> >
> > Lei Yang wrote:
> >
> >> Hello,
> >>
> >> I am learning block device drivers and have a newbie question. Given 
> >> a block device, is there anyway that I could set its block size? For 
> >> example, I want to write a block device driver that will work on an 
> >> existing block device.  In this driver, I want block size smaller. 
> >> (The idea looks confusing but I could explain if anybody is 
> >> interested :- )  However,  typically the block size is 1KB, now I 
> >> want to set it to 512 or 256.  Can I do it?
> >>
> >> TIA
> >> Lei
> >>
> >
> >
> >
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
-- 
  .-----.
 /       \
{  o | o  } 
     |
    \_/
      


  parent reply	other threads:[~2004-10-28 16:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27 18:19 set blksize of block device Lei Yang
2004-10-27 18:30 ` Lei Yang
2004-10-28  1:44   ` Lei Yang
2004-10-28  2:25     ` Lei Yang
2004-10-28  6:11       ` Denis Vlasenko
2004-10-28 21:20         ` Lei Yang
2004-10-28 21:50           ` Todd Poynor
2004-10-28  6:09     ` Denis Vlasenko
2004-10-28 16:35     ` Shesha B.  Sreenivasamurthy [this message]
2004-10-28 21:04       ` Lei Yang
  -- strict thread matches above, loose matches on Subject: below --
2004-10-28  3:34 Bijoy Thomas
2004-10-28  3:42 ` Lei Yang
2004-11-01 13:55 ` Jon Masters
2004-10-28  6:07 gopu.bhaskar

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=1098981325.3279.5.camel@arcane \
    --to=shesha@inostor.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lya755@ece.northwestern.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.