linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Ravish Tayal <ravish.tayal@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: generic_make_request fucntion for scsi_disk
Date: Sat, 20 Jun 2009 09:53:09 -0500	[thread overview]
Message-ID: <1245509589.4255.15.camel@mulgrave.site> (raw)
In-Reply-To: <e42309110906200741x28595685jf56cd505d01cc795@mail.gmail.com>

Please don't drop the cc list ... part of the point of this is to create
an archive record for people with similar questions to find.

On Sat, 2009-06-20 at 20:11 +0530, Ravish Tayal wrote:
> Thanks James. 
>  
> For simple case when I echo few lines to usb mounted disk (fat file
> system).
>  
> mkdir /var/disk1
> mount /dev/sda /var/disk1
> echo "TESTing " >/var/disk1/test.txt
>  
> in this case will it be echo commands context it will be queue the
> commands to scsiglue.c or in between scsi layer would hold the
> commands.

That echo will end up in the page cache as a dirty page.
 
> I have noticed on usb analyser the write scsi commands happens for max
> sector size (64K) ... does in this case scsi command would be happen 
> for few bytes ?

Block commands all have to happen at a granularity of the device block
size (512b usually).  The elevators try to build up to larger sizes.

> or in other words is pdflush invokation indirectly control the WRITE
> scsi command length if file is of few MB or scsi layer itself does
> ot ?

The elevators control final request size depending on what inputs they
have and what parameters they were given.  In all cases, the request
will be a multiple of the filesystem block size (which will be the same
or bigger than the device block size).

> I still not able to find where sd register its request queue to file
> system.

It doesn't.  The Filesystem registers with block via sys_mount and SCSI
with block in scsi_lib.c:scsi_alloc_queue().

James



  parent reply	other threads:[~2009-06-20 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20 14:05 generic_make_request fucntion for scsi_disk Ravish Tayal
2009-06-20 14:20 ` James Bottomley
     [not found]   ` <e42309110906200741x28595685jf56cd505d01cc795@mail.gmail.com>
2009-06-20 14:53     ` James Bottomley [this message]
     [not found] ` <e42309110906200705j6a731ecay204969f639af5330-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-06-20 14:39   ` Alan Stern
     [not found] <e42309110906200746u441b82acvec4e3e513253af0@mail.gmail.com>
2009-06-20 14:56 ` Alan Stern
2009-06-20 15:33   ` Ravish Tayal

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=1245509589.4255.15.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ravish.tayal@gmail.com \
    /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).