• Goldwyn Rodrigues's avatar
    md-cluster: Fix adding of new disk with new reload code · dbb64f86
    Goldwyn Rodrigues authored
    Adding the disk worked incorrectly with the new reload code. Fix it:
    
     - No operation should be performed on rdev marked as Candidate
     - After a metadata update operation, kick disk if role is 0xfffe
       else clear Candidate bit and continue with the regular change check.
     - Saving the mode of the lock resource to check if token lock is already
       locked, because it can be called twice while adding a disk. However,
       unlock_comm() must be called only once.
     - add_new_disk() is called by the node initiating the --add operation.
       If it needs to be canceled, call add_new_disk_cancel(). The operation
       is completed by md_update_sb() which will write and unlock the
       communication.
    Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
    dbb64f86
md.c 236 KB