All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>
Cc: <Mori.Takahiro@ab.MitsubishiElectric.co.jp>,
	<Motai.Hirotaka@aj.MitsubishiElectric.co.jp>,
	"'Sungjong Seo'" <sj1557.seo@samsung.com>,
	<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"'Namjae Jeon'" <linkinjeon@kernel.org>
Subject: RE: [PATCH 3/3] exfat: set EXFAT_SB_DIRTY and VOL_DIRTY at the same timing
Date: Tue, 9 Jun 2020 11:02:57 +0900	[thread overview]
Message-ID: <00a801d63e02$1885ffe0$4991ffa0$@samsung.com> (raw)
In-Reply-To: <TY1PR01MB157812F9DFC574527D8AA26E90850@TY1PR01MB1578.jpnprd01.prod.outlook.com>

> Thank you for your comment.
> 
> > >> Can you split this patch into two? (Don't set VOL_DIRTY on
> > >> -ENOTEMPTY and Setting EXFAT_SB_DIRTY is merged into
> > >> exfat_set_vol_flag). I need to check the second one more.
> > >
> > > Can't do that.
> > >
> > > exfat_set_vol_flag() is called when rmdir processing begins. When
> > > Not-empty is detected, VOL_DIRTY has already been written and synced
> > > to the media.
> > You can move it before calling exfat_remove_entries().
> 
> Can be moved, but that doesn't solve the problem.
> It causes the similar problem as before.
> 
> exfat_remove_entries() calls exfat_get_dentry().
> If exfat_get_dentry() fails, update bh and set SB_DIRTY will not be executed.
> As a result, SB_DIRTY is not set and sync does not work.
> Similar problems occur with other writing functions.
> Similar problems occur when pre-write checks are added in the future.
> 
> If you don't set VOL_DIRTY at the beginning, you should delay to set VOL_DIRTY until update-bh & set
> SB_DIRTY.
> This avoids unnecessary changes to VOL_DIRTY/VOL_CLEAN.
Right, That's what I am going to point out.
> I think this method is smart, but it is difficult to decide when to set VOL_CLEAN.
> (I tried to implement it, but gave up)
Okay, I'm a little busy now, but I'll give you feedback soon.
Thanks for your work!
> 
> > > By doing this, sync is guaranteed if VOL_DIRTY is set by calling
> > > exfat_set_vol_flag.
> > >
> > > This change may still have problems, but it's little better than
> > > before, I think.
> > I need to check more if it is the best or there is more better way.
> 
> I think the sync-problems still exist.
> Let's improve little by little. :-)
> 
> BR
> ---
> Kohada Tetsuhiro <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>


  reply	other threads:[~2020-06-09  2:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  8:44 [PATCH 1/3] exfat: add error check when updating dir-entries Tetsuhiro Kohada
2020-06-04  8:44 ` [PATCH 2/3] exfat: optimize exfat_zeroed_cluster() Tetsuhiro Kohada
2020-06-04  8:44 ` [PATCH 3/3] exfat: set EXFAT_SB_DIRTY and VOL_DIRTY at the same timing Tetsuhiro Kohada
2020-06-05  7:32   ` Namjae Jeon
2020-06-06  9:22     ` Tetsuhiro Kohada
2020-06-07  0:26       ` Namjae Jeon
2020-06-08  5:02         ` Kohada.Tetsuhiro
2020-06-09  2:02           ` Namjae Jeon [this message]
2020-06-07  0:33 ` [PATCH 1/3] exfat: add error check when updating dir-entries Namjae Jeon
2020-06-09  8:10   ` Tetsuhiro Kohada

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='00a801d63e02$1885ffe0$4991ffa0$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp \
    --cc=Mori.Takahiro@ab.MitsubishiElectric.co.jp \
    --cc=Motai.Hirotaka@aj.MitsubishiElectric.co.jp \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    /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.