All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Campbell <brad@wasp.net.au>
To: linux-ide@vger.kernel.org,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	RAID Linux <linux-raid@vger.kernel.org>
Subject: max_sectors in libata when using md
Date: Thu, 26 Aug 2004 19:20:09 +0400	[thread overview]
Message-ID: <412DFFA9.8030504@wasp.net.au> (raw)

G'day all,

Hot on the trail of this libata oddity.

static Scsi_Host_Template svia_sht = {
         .module                 = THIS_MODULE,
         .name                   = DRV_NAME,
         .queuecommand           = ata_scsi_queuecmd,
         .eh_strategy_handler    = ata_scsi_error,
         .can_queue              = ATA_DEF_QUEUE,
         .this_id                = ATA_SHT_THIS_ID,
         .sg_tablesize           = LIBATA_MAX_PRD,
         .max_sectors            = ATA_MAX_SECTORS,

ATA_MAX_SECTORS == 200.

Should then the scsi layer be able to do this and queue 1/2 a Meg in a single request?

sd_rw_intr: sda: res=0x0
1024 sectors total, 524288 bytes done.
use_sg is 128
sd_init_command: disk=sda, block=0, count=1024
sda : block=0
sda : writing 1024/1024 512 byte blocks.
scsi_add_timer: scmd: dfc48a00, time: 30000, (c0283910)
ata_scsi_dump_cdb: CDB (13:0,0,0) 2a 00 00 00 00 00 00 04 00
ata_scsi_translate: ENTER
ata_scsi_rw_xlat: ten-byte command
ata_sg_setup: ENTER, ata13
ata_sg_setup: 128 sg elements mapped

And queue 1024 sectors in one hit?

If I talk to the drive directly with
dd if=/dev/zero of=/dev/sda bs=1024k count=1

The SCSI layer seems to break the request up into nice neat 127 sector chunks and send it on through.

If I talk to it via an md device.

mdadm --create --force --level=0 --raid-devices=1 /dev/md0 /dev/sda
dd if=/dev/zero of=/dev/md0 bs=1024k count=1

Then we get what we see above, and my PATA->SATA adaptor intermittently locks up with transfers that 
long. (It does not appear to if I crank the speed down to UDMA66 from UDMA100 but that is another story)


Am I looking at something completely weird? Is the block layer doing something I should know about? 
Can SATA transfers handle 1024 sectors in one go? Will Batman make it out of the cave alive?

Regards,
Brad

             reply	other threads:[~2004-08-26 15:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26 15:20 Brad Campbell [this message]
2004-08-26 15:52 ` max_sectors in libata when using md Dave
2004-08-26 16:30   ` Jeff Garzik
2004-08-26 16:44     ` Brad Campbell
2004-08-26 17:26       ` Jeff Garzik
2004-08-26 17:34         ` Dave
2004-08-26 17:44           ` Jeff Garzik
2004-08-26 17:50             ` Brad Campbell
2004-08-26 17:54               ` Jeff Garzik
2004-08-26 18:34                 ` Brad Campbell
2004-08-26 17:37         ` Brad Campbell
2004-08-26 16:37   ` Brad Campbell
2004-08-26 17:51     ` Jeff Garzik

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=412DFFA9.8030504@wasp.net.au \
    --to=brad@wasp.net.au \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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 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.