From: "Alexander Belyakov" <abelyako@googlemail.com>
To: "David Woodhouse" <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [JFFS2] Non-contiguous write bug fix (Sibley)
Date: Thu, 3 May 2007 13:31:35 +0400 [thread overview]
Message-ID: <fe810cf0705030231g790cb2fdh50b8d8d00ed45d8a@mail.gmail.com> (raw)
In-Reply-To: <1178125804.11120.67.camel@pmac.infradead.org>
On 5/2/07, David Woodhouse <dwmw2@infradead.org> wrote:
>
> Ah, I understand. So this should fix it?
>
> diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
> index c556e85..91d1d0f 100644
> --- a/fs/jffs2/wbuf.c
> +++ b/fs/jffs2/wbuf.c
> @@ -637,7 +637,10 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad)
>
> memset(c->wbuf,0xff,c->wbuf_pagesize);
> /* adjust write buffer offset, else we get a non contiguous write bug */
> - c->wbuf_ofs += c->wbuf_pagesize;
> + if (SECTOR_ADDR(c->wbuf_ofs) == SECTOR_ADDR(c->wbuf_ofs+c->wbuf_pagesize))
> + c->wbuf_ofs += c->wbuf_pagesize;
> + else
> + c->wbuf_ofs = 0xffffffff;
> c->wbuf_len = 0;
> return 0;
> }
>
Yes, it helps.
Thanks,
Alexander
next prev parent reply other threads:[~2007-05-03 9:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-17 11:14 [PATCH] [JFFS2] Non-contiguous write bug fix (Sibley) Alexander Belyakov
2007-04-18 15:06 ` David Woodhouse
2007-04-19 13:59 ` Alexander Belyakov
2007-05-02 13:49 ` Alexander Belyakov
2007-05-02 13:58 ` David Woodhouse
2007-05-02 14:53 ` Alexander Belyakov
2007-05-02 17:10 ` David Woodhouse
2007-05-03 9:31 ` Alexander Belyakov [this message]
2007-05-04 11:52 ` Alexander Belyakov
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=fe810cf0705030231g790cb2fdh50b8d8d00ed45d8a@mail.gmail.com \
--to=abelyako@googlemail.com \
--cc=dwmw2@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