public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Why erase_pending_blocks in write_super? (was: [PATCH] JFFS2: Erase max 3 EB's in ...)
@ 2010-02-12 11:32 Kai-Uwe Bloem
  2010-02-12 12:30 ` Joakim Tjernlund
  0 siblings, 1 reply; 5+ messages in thread
From: Kai-Uwe Bloem @ 2010-02-12 11:32 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have been in touch with Joakim and Artem about this for some mails, but now I would like to ask the jffs2 experts about this.

Is jffs2_erase_pending_blocks real the right thing to do in jffs_write_super?

First, there's nothing like a super block in JFFS2, and the linux kernel's VFS documentation states that jffs2_write_super is an optional method. Hence, I think it's not technically necessary to have this method for jffs2.

>From Artem I learned that it was once introduced to flush the write buffer, using the timers in the VFS layers instead of implementing local timers in jffs2. That's a good explanation for having an implementation of write_super at all.

I can also understand why there is a GC trigger here. GC is an optimization, and as such it should be triggered often enough for it do do the work.

But, why is this jffs_erase_pending_blocks in there?

In NOR case, after having rm'ed a large file, there are possibly a load of blocks on the pending list. The effect I notice is the same as Joakim noticed: after the rm, the system blocks for a while. Depending on the size of the file, this "while" might be rather long. I measured up to 30 seconds, which wreaks havoc with the innards of our userland software. And no, I can't change this by altering the process priority.

So, can you please enlighten me? What's the advantage of having the pending list erased in write_super? Can I possibly remove it without experiencing other problems?
--

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-15  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12 11:32 Why erase_pending_blocks in write_super? (was: [PATCH] JFFS2: Erase max 3 EB's in ...) Kai-Uwe Bloem
2010-02-12 12:30 ` Joakim Tjernlund
2010-02-12 12:59   ` Artem Bityutskiy
2010-02-13 13:35     ` Joakim Tjernlund
     [not found]     ` <OFB070621F.38B903A2-ONC12576C9.004A7C7A-C12576C9.004A9FC9@LocalDomain>
2010-02-15  9:58       ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox