From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: bugme-daemon@bugzilla.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: Re: [Bug 12207] block reads/writes > 122880 bytes to USB tape drive gives EBUSY
Date: Tue, 23 Dec 2008 09:33:07 -0600 [thread overview]
Message-ID: <1230046387.3461.10.camel@localhost.localdomain> (raw)
In-Reply-To: <1230044124.3461.1.camel@localhost.localdomain>
On Tue, 2008-12-23 at 08:55 -0600, James Bottomley wrote:
> > ------- Comment #6 from stern@rowland.harvard.edu 2008-12-23 05:59 -------
> > You can change the max_sectors setting through sysfs. However the last time I
> > looked, the block layer limited max_sectors to 512 KB or something on that
> > order, so you can't get too much improvement.
> >
> > Why is a limit of 120 KB unreasonably small? All it means is that you have to
> > use more system calls to transfer the same amount of data. Is anything wrong
> > with that?
>
> Tapes need large block sizes.
>
> We can accommodate both: Just check for TYPE_TAPE in the
> slave_configure() and bump the limit back up. Any USB tape that doesn't
> do large block transfers will be truly broken.
Following up on this, does this fix it?
I notice that Linus was the one who actually committed this change in
2.6.0-test10, so it's been in the entire 2.6 release.
James
---
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 09779f6..ae4b01c 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -127,7 +127,12 @@ static int slave_configure(struct scsi_device *sdev)
if (sdev->request_queue->max_sectors > max_sectors)
blk_queue_max_sectors(sdev->request_queue,
max_sectors);
- }
+ } else if (sdev->type == TYPE_TAPE)
+ /* Tapes need much higher max sector transfers, so just
+ * raise it to the maximum possible and let the queue
+ * segment size sort out the real limit
+ */
+ blk_queue_max_sectors(sdev->request_queue, 0xFFFF);
/* We can't put these settings in slave_alloc() because that gets
* called before the device type is known. Consequently these
next prev parent reply other threads:[~2008-12-23 15:33 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-12 21:41 [Bug 12207] New: block reads/writes > 122880 bytes to USB tape drive gives EBUSY bugme-daemon
2008-12-22 17:44 ` [Bug 12207] " bugme-daemon
2008-12-22 18:08 ` bugme-daemon
2008-12-22 18:09 ` bugme-daemon
2008-12-22 18:09 ` bugme-daemon
2008-12-23 7:30 ` bugme-daemon
2008-12-23 12:31 ` Oliver Neukum
2008-12-23 12:32 ` bugme-daemon
2008-12-23 13:56 ` bugme-daemon
2008-12-23 13:59 ` bugme-daemon
2008-12-23 14:47 ` Boaz Harrosh
2008-12-23 14:55 ` James Bottomley
2008-12-23 15:33 ` James Bottomley [this message]
2008-12-23 14:42 ` bugme-daemon
2008-12-23 14:46 ` bugme-daemon
2008-12-23 14:48 ` bugme-daemon
2008-12-23 14:54 ` bugme-daemon
2008-12-23 14:56 ` bugme-daemon
2008-12-23 15:33 ` bugme-daemon
2008-12-23 16:18 ` bugme-daemon
2008-12-23 16:30 ` Kai Makisara
2008-12-23 16:42 ` James Bottomley
2008-12-23 16:30 ` bugme-daemon
2008-12-23 16:42 ` bugme-daemon
2008-12-24 2:56 ` bugme-daemon
2008-12-24 4:19 ` FUJITA Tomonori
2008-12-24 4:19 ` bugme-daemon
2008-12-30 19:39 ` bugme-daemon
2009-02-05 21:12 ` bugme-daemon
2009-02-05 21:48 ` bugme-daemon
2009-03-09 20:48 ` bugme-daemon
2009-03-09 20:55 ` bugme-daemon
2009-03-22 20:52 ` bugme-daemon
2009-03-26 19:35 ` bugzilla-daemon
2009-04-07 10:43 ` bugzilla-daemon
2009-04-09 21:08 ` bugzilla-daemon
2009-04-10 9:48 ` bugzilla-daemon
2009-04-10 15:19 ` bugzilla-daemon
2009-04-10 19:29 ` bugzilla-daemon
2009-04-11 2:38 ` bugzilla-daemon
2009-04-11 6:12 ` bugzilla-daemon
2009-04-11 14:26 ` bugzilla-daemon
2009-04-15 9:55 ` bugzilla-daemon
2009-04-15 15:42 ` bugzilla-daemon
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=1230046387.3461.10.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=bugme-daemon@bugzilla.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox