public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "zhao, forrest" <forrest.zhao@intel.com>
To: "Alexey, Korolev" <alexey.korolev@intel.com>, dedekind@infradead.org
Cc: Belyakov@petasus.ims.intel.com, Kutergin@petasus.ims.intel.com,
	linux-mtd@lists.infradead.org, Alexander@petasus.ims.intel.com,
	Timofey@petasus.ims.intel.com
Subject: Re: [PATCH] JFFS2 kernel panics fixup on Sibley
Date: Wed, 28 Dec 2005 10:00:58 +0800	[thread overview]
Message-ID: <1135735258.3155.8.camel@localhost.localdomain> (raw)
In-Reply-To: <43B13C9D.3000008@intel.com>

On Tue, 2005-12-27 at 16:07 +0300, Alexey, Korolev wrote:

> ======================================= 
>  
> diff -aur c/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
> --- c/fs/jffs2/nodelist.c 2005-12-23 16:43:09.000000000 +0300
> +++ b/fs/jffs2/nodelist.c 2005-12-23 16:48:43.000000000 +0300
> @@ -436,7 +436,7 @@
>    * adding and jffs2_flash_read_end() interface. */
>   if (c->mtd->point) {
>    err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer);
> -  if (!err && retlen < tn->csize) {
> +  if (!err && retlen < len) {
>     JFFS2_WARNING("MTD point returned len too short: %u instead of 
> %u.\n", retlen, tn->csize);
>     c->mtd->unpoint(c->mtd, buffer, ofs, len);
>    } else if (err)
> diff -aur c/fs/jffs2/scan.c b/fs/jffs2/scan.c
> --- c/fs/jffs2/scan.c 2005-12-23 16:43:09.000000000 +0300
> +++ b/fs/jffs2/scan.c 2005-12-23 16:48:43.000000000 +0300
> @@ -454,7 +454,7 @@
>     buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs);
>     D1(printk(KERN_DEBUG "Fewer than %zd bytes (node header) left to end 
> of buf. Reading 0x%x at 0x%08x\n",
>        sizeof(struct jffs2_unknown_node), buf_len, ofs));
> -   err = jffs2_flash_read_safe(c, buf_ofs, buf_len, buf);
> +   err = jffs2_flash_read_safe(c, ofs, buf_len, buf);
>     if (err)
>      return err;
>     buf_ofs = ofs;
> @@ -511,7 +511,7 @@
>      break;
>     }
>     D1(printk(KERN_DEBUG "Reading another 0x%x at 0x%08x\n", buf_len, ofs));
> -   err = jffs2_flash_read_safe(c, buf_ofs, buf_len, buf);
> +   err = jffs2_flash_read_safe(c, ofs, buf_len, buf);
>     if (err)
>      return err;
>     buf_ofs = ofs;
> @@ -587,7 +587,7 @@
>      buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - 
> ofs);
>      D1(printk(KERN_DEBUG "Fewer than %zd bytes (inode node) left to end 
> of buf. Reading 0x%x at 0x%08x\n",
>         sizeof(struct jffs2_raw_inode), buf_len, ofs));
> -    err = jffs2_flash_read_safe(c, buf_ofs, buf_len, buf);
> +    err = jffs2_flash_read_safe(c, ofs, buf_len, buf);
>      if (err)
>       return err;
>      buf_ofs = ofs;
> @@ -603,7 +603,7 @@
>      buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - 
> ofs);
>      D1(printk(KERN_DEBUG "Fewer than %d bytes (dirent node) left to end 
> of buf. Reading 0x%x at 0x%08x\n",
>         je32_to_cpu(node->totlen), buf_len, ofs));
> -    err = jffs2_flash_read_safe(c, buf_ofs, buf_len, buf);
> +    err = jffs2_flash_read_safe(c, ofs, buf_len, buf);
>      if (err)
>       return err;
>      buf_ofs = ofs;
> @@ -650,7 +650,7 @@
>     } else {
>      if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) {
>       buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - 
> ofs);
> -     err = jffs2_flash_read_safe(c, buf_ofs, buf_len, buf);
> +     err = jffs2_flash_read_safe(c, ofs, buf_len, buf);
>       if (err)
>        return err;
>       buf_ofs = ofs;

Artem,

I reviewed the part of this patch for EBH, the above remaining
part need your review before we could check in the patch to CVS.

Alexey,

I don't have a Sibley flash at hand, so didn't do intensive
test for it. Thank you for the fix.

Thanks,
Forrest

  reply	other threads:[~2005-12-28  2:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-27 13:07 [PATCH] JFFS2 kernel panics fixup on Sibley Alexey, Korolev
2005-12-28  2:00 ` zhao, forrest [this message]
2006-01-11 13:04   ` Alexey, Korolev
2006-01-13 10:41     ` Ferenc Havasi
2006-01-13 10:45       ` Alexey, Korolev
2006-01-20 15:04       ` Alexey, Korolev
2006-01-21 21:51         ` Ferenc Havasi
2006-01-23 17:31           ` Alexey, Korolev

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=1135735258.3155.8.camel@localhost.localdomain \
    --to=forrest.zhao@intel.com \
    --cc=Alexander@petasus.ims.intel.com \
    --cc=Belyakov@petasus.ims.intel.com \
    --cc=Kutergin@petasus.ims.intel.com \
    --cc=Timofey@petasus.ims.intel.com \
    --cc=alexey.korolev@intel.com \
    --cc=dedekind@infradead.org \
    --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