From: "William A. Gatliff" <bgat@billgatliff.com>
To: Eugene Surovegin <ebs@innocent.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mtdblock_ro and ext2 yields panic: block not locked
Date: Wed, 23 Oct 2002 13:13:51 -0500 [thread overview]
Message-ID: <20021023131351.C9783@saturn.billgatliff.com> (raw)
In-Reply-To: <5.1.0.14.2.20021023102143.03ec1de0@mail.attbi.com>; from ebs@innocent.com on Wed, Oct 23, 2002 at 10:22:57AM -0700
Eugene:
That looks like it fixed the problem:
...
ttyS03 at 0xb1400000 (irq = 3) is a 16550
mtdblock_open
ok
mtdblock_open
ok
mtdblock_release
ok
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 196k freed
Algorithmics/MIPS FPU Emulator v1.5
init started: BusyBox v0.60.4 (2002.10.16-16:11+0000) multi-call binary
Running rc.S... done
eth0: link up
Please press Enter to activate this console.
BusyBox v0.60.4 (2002.10.16-16:11+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
#
Thanks!! Yay! :^) :^)
b.g.
On Wed, Oct 23, 2002 at 10:22:57AM -0700, Eugene Surovegin wrote:
> Bill,
>
> At 10:18 AM 10/23/2002, you wrote:
> >Care to post the patch? I'd love to see if it fixes my problem...
>
> Sure :)
> Here it is:
>
> diff -ur a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
> --- a/drivers/mtd/mtdblock_ro.c
> +++ b/drivers/mtd/mtdblock_ro.c
> @@ -138,10 +138,11 @@
> }
>
> if (current_request->sector << 9 > mtd->size ||
> - (current_request->sector + current_request->nr_sectors) << 9 >
> mtd->size)
> + (current_request->sector + current_request->current_nr_sectors)
> << 9 > mtd->size)
> {
> printk("mtd: Attempt to read past end of device!\n");
> - printk("size: %x, sector: %lx, nr_sectors %lx\n", mtd->size,
> current_request->sector, current_request->nr_sectors);
> + printk("size: %x, sector: %lx, nr_sectors %lx\n", mtd->size,
> current_request->sector,
> + current_request->current_nr_sectors);
> end_request(0);
> continue;
> }
> @@ -162,7 +163,7 @@
>
> case READ:
> if (MTD_READ(mtd,current_request->sector<<9,
> - current_request->nr_sectors << 9,
> + current_request->current_nr_sectors << 9,
> &retlen, current_request->buffer) == 0)
> res = 1;
> else
> @@ -184,7 +185,7 @@
>
> // Do the write
> if (MTD_WRITE(mtd,current_request->sector<<9,
> - current_request->nr_sectors << 9,
> + current_request->current_nr_sectors << 9,
> &retlen, current_request->buffer) == 0)
> res = 1;
> else
> @@ -287,7 +288,7 @@
> static void __exit cleanup_mtdblock(void)
> {
> unregister_blkdev(MAJOR_NR,DEVICE_NAME);
> - blksize_size[MAJOR_NR] = NULL;
> + blk_size[MAJOR_NR] = NULL;
> blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
> }
>
>
>
>
>
> Eugene Surovegin <mailto:ebs@innocent.com>
>
--
Bill Gatliff
I'm an embedded GNU developer first, GNU instructor second.
See http://billgatliff.com for details.
next prev parent reply other threads:[~2002-10-23 17:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-23 15:49 mtdblock_ro and ext2 yields panic: block not locked William A. Gatliff
[not found] ` <5.1.0.14.2.20021023101127.03ed2df0@pop.prodigy.net>
[not found] ` <20021023121843.A9783@saturn.billgatliff.com>
2002-10-23 17:22 ` Eugene Surovegin
2002-10-23 18:13 ` William A. Gatliff [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-10-23 17:15 Eugene Surovegin
2002-10-27 19:53 ` Jörn Engel
2002-10-29 14:28 ` David Woodhouse
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=20021023131351.C9783@saturn.billgatliff.com \
--to=bgat@billgatliff.com \
--cc=ebs@innocent.com \
--cc=linux-mtd@lists.infradead.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