Home
last modified time | relevance | path

Searched hist:"422 b120238130307da64fa44c9fb722bfaf5f1af" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/fs/jffs2/
H A Dnodemgmt.cdiff 422b120238130307da64fa44c9fb722bfaf5f1af Wed Apr 23 09:40:52 CDT 2008 David Woodhouse <dwmw2@infradead.org> [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.

When _all_ the blocks were on the erase_pending_list, we could't find a
block to GC from but there was no _actually_ free space, and
jffs2_reserve_space() would get a little unhappy.

Handle this case by returning -EAGAIN from jffs2_garbage_collect_pass().
There are two callers of that function -- jffs2_flush_wbuf_gc(), which
will interpret it as an error and flush the writebuffer by other means,
and jffs2_reserve_space(), which we modify to respond to -EAGAIN with an
immediate call to jffs2_erase_pending_blocks() and another run round the
loop.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
H A Dgc.cdiff 422b120238130307da64fa44c9fb722bfaf5f1af Wed Apr 23 09:40:52 CDT 2008 David Woodhouse <dwmw2@infradead.org> [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.

When _all_ the blocks were on the erase_pending_list, we could't find a
block to GC from but there was no _actually_ free space, and
jffs2_reserve_space() would get a little unhappy.

Handle this case by returning -EAGAIN from jffs2_garbage_collect_pass().
There are two callers of that function -- jffs2_flush_wbuf_gc(), which
will interpret it as an error and flush the writebuffer by other means,
and jffs2_reserve_space(), which we modify to respond to -EAGAIN with an
immediate call to jffs2_erase_pending_blocks() and another run round the
loop.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>