From: David Woodhouse <dwmw2@infradead.org>
To: Alexander Larsson <alex@cendio.se>
Cc: mtd@infradead.org
Subject: Re: More comments
Date: Tue, 28 Mar 2000 11:18:23 +0100 [thread overview]
Message-ID: <18073.954238703@devel2.axiom.internal> (raw)
In-Reply-To: <Pine.LNX.3.96.1000313103341.32523B-100000@biffen.cendio.se>
alex@cendio.se said:
> On Mon, 13 Mar 2000, David Woodhouse wrote:
> > This has to be done somewhere. Where's best - in _every_ device driver
> > or in only those front ends which attempt non-block-aligned access?
> I don't know. You seem to think that it's better to have it in the
> front-ends, and I can accept that. I think the "_every_ driver" part
> is a bit of an overstatement though, as I would think many drivers are
> for fully memory-mapped flashes where this wouldn't be necessary
> (where, in fact, looping in the frontend is unnecessary overhead).
>
OK. How about this:
You don't have to check the return from the mtd->write() function, it must
always write the complete buffer or return failure.
_BUT_ you may never make a write request which crosses a block boundary.
So you still have to possibly issue more than one write request in the jffs
code, but at least you can know beforehand and code accordingly, rather than
having a naïve loop.
(s/write/read/ throughout also applies, obviously.)
I'm putting together some documentation.
www.linux-mtd.infradead.org/tech/API.html
/mtd_info.html
/core.html
/erase.html
This will contain some changes to what's currently implemented - most notably
the notifier stuff will no longer have the horrible race conditions that it
currently does.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2000-03-28 10:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-12 12:20 More comments Alexander Larsson
2000-03-12 13:44 ` David Woodhouse
2000-03-12 17:16 ` Alexander Larsson
2000-03-12 17:26 ` David Woodhouse
2000-03-13 9:06 ` Alexander Larsson
2000-03-13 9:15 ` David Woodhouse
2000-03-13 9:42 ` Alexander Larsson
2000-03-28 10:18 ` David Woodhouse [this message]
2000-03-28 11:30 ` Alexander Larsson
2000-03-14 17:13 ` 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=18073.954238703@devel2.axiom.internal \
--to=dwmw2@infradead.org \
--cc=alex@cendio.se \
--cc=mtd@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