lkml.org 
[lkml]   [2009]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: generic_make_request fucntion for scsi_disk
From
Date
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




\
 
 \ /
  Last update: 2009-06-20 16:55    [W:0.036 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site