mtd/fs/jffs2 nodemgmt.c,1.115,1.116
Estelle HAMMACHE
estelle.hammache at st.com
Tue Jan 25 05:13:53 EST 2005
Thomas Gleixner wrote:
>
> > - avoid filing blocks on the clean list when they have wasted
> > space
>
> That's plain wrong.
>
> Wasted space was introduced to prevent endless garbage collection.
> Wasted space is unreclaimable, because it is less than the minimum node
> size. It's totally correct to file those blocks on the clean list,
> because GC _cannot_ reclaim the wasted space.
Well without this patch I got blocks on the clean list with huge
wasted space, more than the ISDIRTY calculation, when a write that
fills exactly the space left in nextblock also obsoletes nodes
in nextblock (not sure about the exact case it was some time ago).
In jffs2_mark_node_obsolete, if the node belongs to nextblock, the
space is always added to wasted_space - not dirty_space. So I don't
understand whether wasted_space is not what you claim, or it is
not well implemented.
I'm afraid my comment in the log was quite misleading:
this patch merely prevents filing the block to the clean
list in jffs2_add_physical_node_ref. As the comment in that
function says, the block will be filed to the correct list later
and with proper ISDIRTY check (or am I missing something ?).
Lastly, I did submit this patch beforehand to the list, even if it was
in a thread on NAND failure. I would have expected you to have
an interest in that thread anyway.
(please excuse me if I sound grumpy. Your comments are a bit
of a cold shower on my newbie enthusiasm. If the patch is really
a problem I will reverse it tonight.)
Estelle
More information about the linux-mtd
mailing list