[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-raid
Subject:    Re: [PATCH V3 1/3] mdadm: improve the dlm locking mechanism for clustered raid
From:       Jes Sorensen <jes.sorensen () gmail ! com>
Date:       2018-03-08 19:18:08
Message-ID: eeaa25ea-7e12-a1b8-486e-77449ea8dadd () gmail ! com
[Download RAW message or body]

On 01/22/2018 04:12 AM, Guoqing Jiang wrote:
> Previously, the dlm locking only protects several
> functions which writes to superblock (update_super,
> add_to_super and store_super), and we missed other
> funcs such as add_internal_bitmap. We also need to
> call the funcs which read superblock under the
> locking protection to avoid consistent issue.
> 
> So let's remove the dlm stuffs from super1.c, and
> provide the locking mechanism to the main() except
> assemble mode which will be handled in next commit.
> And since we can identify it is a clustered raid or
> not based on check the different conditions of each
> mode, so the change should not have effect on native
> array.
> 
> And we improve the existed locking stuffs as follows:
> 
> 1. replace ls_unlock with ls_unlock_wait since we
> should return when unlock operation is complete.
> 
> 2. inspired by lvm, let's also try to use the existed
> lockspace first before creat a lockspace blindly if
> the lockspace not released for some reason.
> 
> 3. try more times before quit if EAGAIN happened for
> locking.
> 
> Note: for MANAGE mode, we do not need to get lock if
> node just want to confirm device change, otherwise we
> can't add a disk to cluster since all nodes are compete
> for the lock.
> 
> Reviewed-by: NeilBrown <neilb@suse.com>
> Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
> ---
>  mdadm.c  | 20 ++++++++++++++++++++
>  mdadm.h  | 10 +++++-----
>  super1.c | 42 ------------------------------------------
>  util.c   | 57 +++++++++++++++++++++++++++++++++++++++++++--------------
>  4 files changed, 68 insertions(+), 61 deletions(-)

Applied!

Thanks,
Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic