[Ocfs2-devel] [patch 15/28] ocfs2: fix race between crashed dio and rm
Mark Fasheh
mfasheh at suse.de
Mon Aug 31 12:50:46 PDT 2015
On Wed, Aug 26, 2015 at 03:12:00PM -0700, Andrew Morton wrote:
> From: Joseph Qi <joseph.qi at huawei.com>
> Subject: ocfs2: fix race between crashed dio and rm
>
> There is a race case between crashed dio and rm, which will lead to
> OCFS2_VALID_FL not set read-only.
>
> N1 N2
> ------------------------------------------------------------------------
> dd with direct flag
> rm file
> crashed with an dio entry left
> in orphan dir
> clear OCFS2_VALID_FL in
> ocfs2_remove_inode
> recover N1 and read the corrupted inode,
> and set filesystem read-only
>
> So we skip the inode deletion this time and wait for dio entry
> recovered first.
>
> Signed-off-by: Joseph Qi <joseph.qi at huawei.com>
> Cc: Mark Fasheh <mfasheh at suse.com>
> Cc: Joel Becker <jlbec at evilplan.org>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Reviewed-by: Mark Fasheh <mfasheh at suse.de>
--
Mark Fasheh
More information about the Ocfs2-devel
mailing list