mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: dalecki@evision.ag
Cc: viro@math.psu.edu, linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: IDE from current bk tree, UDMA and two channels...
Date: Fri, 2 Aug 2002 00:00:31 +0200	[thread overview]
Message-ID: <20020801220031.GA1756@vana.vc.cvut.cz> (raw)
In-Reply-To: <C94E6D2807@vcnet.vc.cvut.cz>

On Thu, Aug 01, 2002 at 07:07:21PM +0200, Petr Vandrovec wrote:
> On 31 Jul 02 at 22:01, Marcin Dalecki wrote:
> > 
> > Well OK this was my next idea, but apparently you already did the
> > experient on your own. Thanks for the result. I'm still scratching my
> > head and I have already observed this before myself.
> > It's always funny to see what happens when one stops a driver
> > from deliberately disabling IRQs for eons of jiffies :-).
> 
> I currently suspect IRQ handling changes, but maybe someone has
> better idea? Also, I cannot reproduce problem with Seagate UDMA66
> drive switched to UDMA33 mode, so it looks like that problem is 
> timming/firmware (Toshiba MK6409MAV) dependent.

I'd like to apologize to Ingo, his changes were completely innocent.
Problem was triggered by Al's 'block device size cleanups' (currently
cset 1.403.160.5 on bkbits).

Before this change, my system was using 4KB block size when reading
from /dev/hdc1, because of blk_size[][] (which is in 1kB units) of this 
partition was multiple of 2, and so i_size % 4096 was 0.  But after
Al's change partition size is read from gendisk, and not from blk_size,
and gendisk partition size is in 512 bytes units: and, as you can
probably guess, now my partition had i_size % 4096 == 512, and so only
512 byte block size was choosen. And with 512 bytes block size my
harddisk refuses to cooperate.

I was trying to find reason in code, why 512 byte block size should
not work, but I was not able to reveal any. Maybe I/O gurus here
will know?

For now, I'm using patch below. It fixes problems for me, block size = 1024
is sufficient in my configuration. If you have any insights what can be
a problem, please tell me. Problem apparently is not in i_size not being
multiple of 1024: without changing bsize problem still occurs, even if
I shrink i_size down to be multiple of 4K.

After some more testing I found that my other drive (120GB WD) handles
bsize=512 quite happily, so it looks like that just my Toshiba disk
does not like 512B back to back transfers?! Are there any plans to
read from block devices in 4KB blocks for all reads/writes except for
the last partial page?
					Thanks,
						Petr Vandrovec
						vandrove@vc.cvut.cz

--- linux-2.5.29-c548/fs/block_dev.c.orig	2002-07-31 12:48:23.000000000 +0200
+++ linux-2.5.29-c548/fs/block_dev.c	2002-08-01 23:20:43.000000000 +0200
@@ -608,6 +608,11 @@
 				break;
 			bsize <<= 1;
 		}
+		if (bsize == 512) {
+			printk(KERN_ERR "Found 512b device! Using larger block size...\n");
+			bdev->bd_inode->i_size -= 512;
+			bsize = 1024;
+		}
 		bdev->bd_block_size = bsize;
 		bdev->bd_inode->i_blkbits = blksize_bits(bsize);
 		if (p->queue)

  reply	other threads:[~2002-08-01 21:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-01 17:07 Petr Vandrovec
2002-08-01 22:00 ` Petr Vandrovec [this message]
2002-08-01 22:13   ` Marcin Dalecki
2002-08-01 22:39     ` Alexander Viro
  -- strict thread matches above, loose matches on Subject: below --
2002-08-01 23:13 Petr Vandrovec
2002-08-02 13:07 ` Alan Cox
2002-08-01 23:00 Petr Vandrovec
2002-08-01 23:05 ` Alexander Viro
2002-08-01 22:53 Petr Vandrovec
2002-08-01 23:02 ` Alexander Viro
2002-08-01 23:54 ` Linus Torvalds
     [not found] <200208012219.g71MJV109133@penguin.transmeta.com>
2002-08-01 22:45 ` Alexander Viro
2002-08-02  9:10   ` Marcin Dalecki
2002-08-01 22:42 Petr Vandrovec
2002-08-01 22:52 ` Alexander Viro
2002-08-02  9:11   ` Marcin Dalecki
2002-08-01 22:34 Petr Vandrovec
2002-07-30 19:26 Petr Vandrovec
2002-07-31 20:01 ` Marcin Dalecki
2002-08-01  9:56   ` Jens Axboe
2002-08-01  9:56     ` Marcin Dalecki
2002-08-01 10:05       ` Jens Axboe
2002-08-01 10:33         ` Marcin Dalecki
2002-08-01 10:45           ` Jens Axboe
2002-07-30 18:19 Petr Vandrovec
2002-07-31 19:48 ` Marcin Dalecki
2002-07-30 16:15 Petr Vandrovec
2002-07-30 14:03 Petr Vandrovec
2002-07-30 14:25 ` Marcin Dalecki

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=20020801220031.GA1756@vana.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=dalecki@evision.ag \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=viro@math.psu.edu \
    /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

all inboxes | Powered by JetHome®