From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Doug Maxey <dwm@enoyolf.org>
Cc: yaboot-devel@ozlabs.org, Linux PowerPC List <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH 1/1] determine last ext3 LBA to fix wild LBA reads - v2
Date: Thu, 04 Jan 2007 12:09:16 +1100 [thread overview]
Message-ID: <1167872956.6165.172.camel@localhost.localdomain> (raw)
In-Reply-To: <32361.1167808666@bebe.enoyolf.org>
> static errcode_t linux_set_blksize (io_channel channel, int blksize)
> {
> + DEBUG_F("bs set to 0x%x\n", blksize);
> channel->block_size = bs = blksize;
> if (block_buffer) {
> free(block_buffer);
> @@ -600,6 +612,11 @@ static errcode_t linux_read_blk (io_channel channel, unsigned long block, int co
>
> tempb = (((unsigned long long) block) *
> ((unsigned long long)bs)) + (unsigned long long)doff;
> + if (tempb > dend) {
> + DEBUG_F("\nSeek error on block %lx, tempb=%Lx\n", block, tempb >> 9);
> + return EXT2_ET_LLSEEK_FAILED;
> + }
> +
In the case where we don't pass a "part", dend is 0 no ? We should check
this case and not apply the test...
Ben.
next prev parent reply other threads:[~2007-01-04 1:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-03 7:17 [PATCH 1/1] determine last ext3 LBA to fix wild LBA reads - v2 Doug Maxey
2007-01-04 1:09 ` Benjamin Herrenschmidt [this message]
2007-01-04 2:11 ` Doug Maxey
2007-01-04 3:31 ` Benjamin Herrenschmidt
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=1167872956.6165.172.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=dwm@enoyolf.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=yaboot-devel@ozlabs.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;
as well as URLs for NNTP newsgroup(s).