[RESEND PATCH] ubifs: do not write master node if need recovery

Artem Bityutskiy dedekind1 at gmail.com
Thu Mar 12 04:10:25 PDT 2015


On Wed, 2015-03-04 at 10:46 +0000, Sheng Yong wrote:
> The commits 781c571 ("UBIFS: intialize LPT earlier") and 0980119 ("UBIFS:
> fix-up free space earlier") move some initialization before marking the
> master node dirty. But the modification changes the conditions of writing
> master. 
> 
> If unclean umount happens, ubifs may fail when mounting. But trying to
> mount it will write new master nodes on the flash. This is useless but
> increasing sqnum. So check need_recovery before writing master node, and
> don't create new master node if filesystem needs recovery.
> 
> The behavour of the bug shows at:
> http://lists.infradead.org/pipermail/linux-mtd/2015-February/057712.html
> 
> Signed-off-by: Sheng Yong <shengyong1 at huawei.com>

Pushed to linux-ubifs.git/master, thank you!

Artem.




More information about the linux-mtd mailing list