From: akorolev <alexey.korolev@intel.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Linux-MTD Mailing List <linux-mtd@lists.infradead.org>
Subject: Re: Why the alignemt to 4 bytes is necessary in jffs2_commit_write function
Date: Wed, 11 Jul 2007 20:43:33 +0400 [thread overview]
Message-ID: <469508B5.3080509@intel.com> (raw)
In-Reply-To: <1184171758.31598.12.camel@pmac.infradead.org>
Aghh I see.
Thank you very much!
> On Wed, 2007-07-11 at 20:25 +0400, akorolev wrote:
>
>> If I properly understand the aligned_start is not related to offset of
>> the fragment it is just offset within the file. (Frag offset is
>> aligned) File offset is not necessary to keep aligned - so why not to
>> kick off it. (I tried and didn't find anything wrong in tests).
>>
>
> Consider:
> while (1)
> write(fd, "x", 1);
>
> This is fairly much worst-case behaviour for JFFS2, and you end up with
> a _large_ number of data nodes. One thing we've done to improve
> behaviour in this situation is rewrite the entire page when we write the
> last byte in a page -- but that doesn't fix _all_ cases.
>
> Since data nodes _are_ aligned to 4 bytes, it doesn't hurt us at all to
> write a full 4 bytes instead of only 1 byte. So you'll have a maximum of
> 1024 data nodes for a given 4KiB page even if you don't manage to
> trigger the code which rewrites the page.
>
>
prev parent reply other threads:[~2007-07-11 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 16:25 Why the alignemt to 4 bytes is necessary in jffs2_commit_write function akorolev
2007-07-11 16:35 ` David Woodhouse
2007-07-11 16:43 ` akorolev [this message]
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=469508B5.3080509@intel.com \
--to=alexey.korolev@intel.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