All of lore.kernel.org
 help / color / mirror / Atom feed
From: shengyong <shengyong1@huawei.com>
To: <dedekind1@gmail.com>
Cc: richard@nod.at, linux-mtd@lists.infradead.org, hujianyang@huawei.com
Subject: Re: [RFC PATCH] ubifs: do not write master node if recovery needed
Date: Sat, 7 Feb 2015 09:53:10 +0800	[thread overview]
Message-ID: <54D57006.2040107@huawei.com> (raw)
In-Reply-To: <1423243771.8637.581.camel@sauron.fi.intel.com>



在 2015/2/7 1:29, Artem Bityutskiy 写道:
> On Thu, 2015-02-05 at 09:54 +0000, Sheng Yong wrote:
>> If unclean umount happens, ubifs may fail when mounting. Trying to mount
>> it will write new master nodes on the flash. This is useless but wasting
>> space and increasing sqnum. So check need_recovery before writing master
>> node, and don't create new master node if filesystem needs recovery.
> 
> Looks like you caught a bug, thanks, but I need to check the code a bit
> more carefully. So when will the master not be updated then, if you do
> not mark it dirty now?
AFAIK, if the need_recovery is set after reading master and before writing
master, the master is always marked dirty by last mount (if unclean umount
happend), and each committing will update master later, with dirty flag set.
This is same as normal mount procedure. So I don't think we need to mark it
dirty here, and only if the recovery fails, the master will not be updated.

thanks,
Sheng
> 
> Artem.
> 
> 
> 

      reply	other threads:[~2015-02-07  1:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  9:54 [RFC PATCH] ubifs do not write master node if recovery needed Sheng Yong
2015-02-05  9:54 ` [RFC PATCH] ubifs: " Sheng Yong
2015-02-06 17:29   ` Artem Bityutskiy
2015-02-07  1:53     ` shengyong [this message]

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=54D57006.2040107@huawei.com \
    --to=shengyong1@huawei.com \
    --cc=dedekind1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.