From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mikko Rapeli <mikko.rapeli@iki.fi>, linux-ide@vger.kernel.org
Subject: Re: ST340823A disk size issue
Date: Thu, 2 Aug 2007 01:17:58 +0200 [thread overview]
Message-ID: <200708020117.58916.bzolnier@gmail.com> (raw)
In-Reply-To: <20070801233221.34e2ff0c@the-village.bc.nu>
On Thursday 02 August 2007, Alan Cox wrote:
> > If you fix the printk, add patch description (can use the one from my patch)
> > and add "Signed-off-by:" I would happily apply it and dump mine version.
>
> Sorry but the patch is wrong - plain and simple. It works over the bug
> but its not the real problem. ide-disk needs to spot a 1K request for the
> last 512 bytes, issue a 512 byte request and complete the 512 bytes only.
block/ll_rw_blk.c:
static inline void __generic_make_request(struct bio *bio)
{
...
int ret, nr_sectors = bio_sectors(bio);
...
/* Test device or partition size, when known. */
maxsector = bio->bi_bdev->bd_inode->i_size >> 9;
if (maxsector) {
sector_t sector = bio->bi_sector;
if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
/*
* This may well happen - the kernel calls bread()
* without checking the size of the device, e.g., when
* mounting a device.
*/
handle_bad_sector(bio);
goto end_io;
so low-level-driver should never see such requests.
Additionally fs/partitions/check.c:rescan_partitions() should warn if the
partition exceeds device size and we are not seeing any such warning.
Mikko, could you please revert any patches that you have applied, uncomment
#define DEBUG in ide-disk.c, recompile and note the sectors count in the
"hdd: reading: block=78165360 sectors=..."
debug message?
Thanks,
Bart
next prev parent reply other threads:[~2007-08-01 23:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 9:29 ST340823A disk size issue Mikko Rapeli
2007-08-01 13:05 ` Alan Cox
2007-08-02 12:35 ` Mikko Rapeli
2007-08-01 20:34 ` Bartlomiej Zolnierkiewicz
2007-08-01 21:50 ` Mikko Rapeli
2007-08-01 22:19 ` Bartlomiej Zolnierkiewicz
2007-08-01 22:32 ` Alan Cox
2007-08-01 23:17 ` Bartlomiej Zolnierkiewicz [this message]
2007-08-02 11:33 ` Alan Cox
2007-08-02 12:27 ` Bartlomiej Zolnierkiewicz
2007-08-02 13:09 ` Alan Cox
2007-08-02 20:03 ` Mikko Rapeli
2007-08-02 20:42 ` Alan Cox
2007-08-02 22:34 ` Bartlomiej Zolnierkiewicz
2007-08-02 23:11 ` Mikko Rapeli
2007-08-02 23:35 ` Bartlomiej Zolnierkiewicz
2007-08-05 19:06 ` [PATCH] ST340823A, HPA and libata Mikko Rapeli
2007-08-05 19:32 ` Alan Cox
2007-08-08 13:25 ` Alan Cox
2007-08-15 13:56 ` Mikko Rapeli
2007-09-20 21:37 ` Jeff Garzik
2007-08-02 0:33 ` ST340823A disk size issue Bartlomiej Zolnierkiewicz
2007-08-02 12:17 ` Sergei Shtylyov
2007-08-02 12:38 ` Sergei Shtylyov
2007-08-01 22:25 ` Alan Cox
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=200708020117.58916.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-ide@vger.kernel.org \
--cc=mikko.rapeli@iki.fi \
/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;
as well as URLs for NNTP newsgroup(s).