Re: [V2 PATCH] Safeguard against writing to an active device of another node
From: Guoqing Jiang <hidden>
Date: 2015-07-31 09:04:43
From: Guoqing Jiang <hidden>
Date: 2015-07-31 09:04:43
Goldwyn Rodrigues wrote:
On 07/30/2015 03:49 AM, Guoqing Jiang wrote:quoted
Modifying an exiting device's superblock or creating a new superblock on an existing device needs to be checked because the device could be in use by another node in another array. So, we check this by taking all superblock locks in userspace so that we don't step onto an active device used by another node and safeguard against accidental edits. After the edit is complete, we release all locks and the lockspace so that it can be used by the kernel space. Signed-off-by: Goldwyn Rodrigues <redacted> Signed-off-by: Guoqing Jiang <redacted> --- V2 Changes: use run-time check for dlm libraryThis may be better done using a structure of function pointers which is setup and resolved one-time as opposed to performing symbol resolution every time the function is called. You could include get_cluster_name as well in it.
Good point, I will send another incremental patch for this. Thanks, Guoqing