Re: [PATCH V3 1/3] mdadm: improve the dlm locking mechanism for clustered raid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> Signed-off-by: Guoqing Jiang <gqjiang@xxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux