From: David Woodhouse <dwmw2@infradead.org>
To: Alexander Larsson <alex@cendio.se>
Cc: mtd@infradead.org
Subject: Re: More comments
Date: Sun, 12 Mar 2000 17:26:38 +0000 [thread overview]
Message-ID: <21948.952881998@devel2.axiom.internal> (raw)
In-Reply-To: <Pine.LNX.3.96.1000312180858.29783B-100000@biffen.cendio.se>
alex@cendio.se said:
> I'm aware of the normal conventions for read (2), but is this good in
> the kernelspace api? I mean, the only reason for a flash to not read
> all data is if the flash is paged, and you don't want to bother
> changing page in the read function. On the other hand, all places in
> the kernel that read data from the flash except the char device read
> op (ie. the block device, mtd, flash filesystems etc) needs to loop on
> each read.
In practice, this hasn't mattered because the devices allow you to read up to
a block at a time, and the block device and flash filesystems usually want to
read <= 1 block. The only place that has to retry is the mtd chardevice, which
means the retry is in userspace.
However, that behaviour isn't guaranteed, so strictly speaking, perhaps we
ought to change it. How about simply declaring that the read() functions MUST
read up to the end of the block on which they start, and may not return an
incomplete read unless requested to do a multi-block read.
That would make it safe for all current the kernel-space users, wouldn't it?
> But if the device is fully memory mapped the current point()/
> unpoint() api is a bit overweight. A pointer and size would be enough.
Fine. Then it can go too. Just as soon as I've stopped ftl.c from using it :)
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2000-03-12 17:26 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 [this message]
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
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=21948.952881998@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