public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Bjorn Wesen <bjornw@axis.com>
Cc: "mtd@infradead.org" <mtd@infradead.org>, jffs-dev@axis.com
Subject: Re: jffs_file_write
Date: Tue, 25 Jul 2000 11:15:53 +0100	[thread overview]
Message-ID: <4992.964520153@cygnus.co.uk> (raw)
In-Reply-To: <Pine.LNX.3.96.1000725115308.8086L-100000@fafner.axis.se>


bjornw@axis.com said:
> But you will run into the same problem then that the buffer-cache we
> avoid solves. If you start queueing stuff, the reads will need to
> check the queue before reading from the flash for example (the in-core
> node which keeps track of the data contents of the files can of course
> have a pointer to the queued data if it's not on flash yet). You
> cannot rely on the page cache caching the changes because the pages
> might have become invalidated. 

True. It should be possible to make JFFS use the page cache and
generic_file_{read,write}() though, so the data in the page cache are always
valid. There are apparently ways to do it without having to write 4 KB nodes
each time we're told a page has been dirtied.

I need to schedule myself a crash course on Linux VFS so that I know what 
I'm talking about :)

bjornw@axis.com said:
> . When he has hit OK and gotten the "Saved" webpage, he pulls the
> plug. OK that is perhaps fixed by writing files with O_SYNC or
> whatever that mechanism is called like you say...

Netscape does actually write changes to its config files with O_SYNC, and I
think it's reasonable to expect that to be necessary. A journalling
filesystem should always have a consistent state, but it allowed to have
write-behind. It doesn't necessarily have to commit writes to the media
before returning - that's what O_SYNC is for.




--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

  reply	other threads:[~2000-07-25 10:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-21 23:41 jffs_file_write Rogelio M. Serrano Jr.
2000-07-24 15:09 ` jffs_file_write Finn Hakansson
2000-07-25  9:29   ` jffs_file_write David Woodhouse
2000-07-25  9:44     ` jffs_file_write Finn Hakansson
2000-07-25 10:01       ` jffs_file_write David Woodhouse
2000-07-25 10:11         ` jffs_file_write Finn Hakansson
2000-07-25 13:02           ` jffs_file_write Bjorn Wesen
2000-07-25 13:19             ` jffs_file_write David Woodhouse
2000-07-25 13:54           ` jffs_file_write David Woodhouse
2000-07-25 10:02     ` jffs_file_write Bjorn Wesen
2000-07-25 10:15       ` David Woodhouse [this message]
2000-07-25 14:29     ` jffs_file_write Philipp Rumpf
2000-07-25 15:12       ` jffs_file_write David Woodhouse
2000-07-25 15:24         ` jffs_file_write Philipp Rumpf

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=4992.964520153@cygnus.co.uk \
    --to=dwmw2@infradead.org \
    --cc=bjornw@axis.com \
    --cc=jffs-dev@axis.com \
    --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