[Ocfs2-devel] [patch 7/8] ocfs2: do not return DLM_MIGRATE_RESPONSE_MASTERY_REF to avoid endless, loop during umount

Mark Fasheh mfasheh at suse.de
Fri Jun 13 14:34:42 PDT 2014


On Mon, Jun 09, 2014 at 01:04:06PM -0700, Andrew Morton wrote:
> From: jiangyiwen <jiangyiwen at huawei.com>
> Subject: ocfs2: do not return DLM_MIGRATE_RESPONSE_MASTERY_REF to avoid endless,loop during umount

This looks good, thanks!

> The following case may lead to endless loop during umount.
> 
> node A         node B               node C       node D
> umount volume,
> migrate lockres1
> to B
>                                                  want to lock lockres1,
>                                                  send
>                                                  MASTER_REQUEST_MSG
>                                                  to C
>                                     init block mle
>                send
>                MIGRATE_REQUEST_MSG
>                to C
>                                     find a block
>                                     mle, and then
>                                     return
>                                     DLM_MIGRATE_RESPONSE_MASTERY_REF
>                                     to B
>                set C in refmap
>                                     umount successfully
>                try to umount, endless
>                loop occurs when migrate
>                lockres1 since C is in
>                refmap
> 
> So we can fix this endless loop case by only returning
> DLM_MIGRATE_RESPONSE_MASTERY_REF if it has a mastery mle when receiving
> MIGRATE_REQUEST_MSG.
> 
> [akpm at linux-foundation.org: coding-style fixes]
> Signed-off-by: jiangyiwen <jiangyiwen at huawei.com>
> Cc: Mark Fasheh <mfasheh at suse.com>
> Cc: Joel Becker <jlbec at evilplan.org>
> Cc: Xue jiufei <xuejiufei at huawei.com>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>

Reviewed-by: Mark Fasheh <mfasheh at suse.de>
	--Mark

--
Mark Fasheh



More information about the Ocfs2-devel mailing list