From: Juan Quintela <quintela@mandrakesoft.com>
To: Jens Axboe <axboe@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] only use 48-bit lba when necessary
Date: Fri, 04 Apr 2003 15:19:37 +0200 [thread overview]
Message-ID: <86k7ea2ydy.fsf@trasno.mitica> (raw)
In-Reply-To: <20030404122936.GB786@suse.de> (Jens Axboe's message of "Fri, 4 Apr 2003 14:29:36 +0200")
>>>>> "jens" == Jens Axboe <axboe@suse.de> writes:
jens> Hi,
jens> 48-bit lba has a non-significant overhead (twice the outb's, 12 instead
jens> of 6 per command), so it makes sense to use 28-bit lba commands whenever
jens> we can.
jens> Patch is against 2.5.66-BK.
jens> ===== drivers/ide/ide-disk.c 1.36 vs edited =====
jens> --- 1.36/drivers/ide/ide-disk.c Wed Mar 26 21:23:01 2003
jens> +++ edited/drivers/ide/ide-disk.c Fri Apr 4 14:18:41 2003
jens> @@ -367,12 +367,15 @@
jens> static ide_startstop_t do_rw_disk (ide_drive_t *drive, struct request *rq, sector_t block)
jens> {
jens> ide_hwif_t *hwif = HWIF(drive);
jens> - u8 lba48 = (drive->addressing == 1) ? 1 : 0;
jens> + u8 lba48 = 0;
jens> task_ioreg_t command = WIN_NOP;
jens> ata_nsector_t nsectors;
jens> nsectors.all = (u16) rq->nr_sectors;
jens> + if (drive->addressing == 1 && block > 0xfffffff)
jens> + lba48 = 1;
jens> +
lba48 = (drive->addressing == 1) && (block > 0xfffffff);
should do the trick.
jens> + int lba48bit = 0;
jens> +
jens> + if (drive->addressing == 1 && block > 0xfffffff)
jens> + lba48bit = 1;
see above (more cases of that stripped).
jens> + if (lba48bit && block > 0xfffffff)
that test should be equivalent to:
if (lba48bit)
(at least the cvs copy of that function don't modify block isnce the
definition of lba48bit).
Talking about consistency, wouldn't be better to use always the same
name, lba48 or lba48bit?
Later, Juan.
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
next prev parent reply other threads:[~2003-04-04 13:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-04 12:29 [PATCH] only use 48-bit lba when necessary Jens Axboe
2003-04-04 13:19 ` Juan Quintela [this message]
2003-04-04 13:22 ` Jens Axboe
2003-04-04 15:48 ` Juan Quintela
2003-04-04 15:54 ` Jens Axboe
2003-04-04 17:06 ` John Bradford
2003-04-04 14:40 ` Andries Brouwer
2003-04-04 15:13 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2003-04-04 17:02 Chuck Ebbert
2003-04-17 14:20 ` Matt Mackall
2003-04-17 15:24 ` Timothy Miller
2003-04-17 16:05 ` Matt Mackall
2003-04-17 18:49 ` Timothy Miller
2003-04-18 1:34 Chuck Ebbert
2003-04-18 4:18 ` Matt Mackall
2003-04-18 14:34 ` Timothy Miller
2003-04-18 3:32 linux-kernel
2003-04-18 9:50 Chuck Ebbert
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=86k7ea2ydy.fsf@trasno.mitica \
--to=quintela@mandrakesoft.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@suse.de \
--cc=linux-kernel@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