--- ./source/private_module/pmgr/pmgr_intf.c	2018-04-20 08:53:49.000000000 +0000
+++ ./source/private_module/pmgr/pmgr_intf.c.hotpatch	2022-04-29 07:03:41.000000000 +0000
@@ -8097,3 +8097,70 @@
     }
     return;
 }
+
+bool isOtherDiskInReconTaskRcdPatch(poolid_t poolId, tierid_t tierId, diskid_t diskId)
+{
+    uint32_t index;
+    TASK_RECORD_S *taskRcd = NULL;
+    spinlock_t *taskRcdListLockArray = NULL;
+    struct list_head *taskRcdListArray = NULL;
+    struct list_head *pos  = NULL; 
+    struct list_head *next = NULL;
+
+    taskRcdListArray = getTaskRcdListArray();
+    taskRcdListLockArray = getTaskRcdListLockArray();
+
+    for (index = 0; index < TASK_LIST_PRECOPY; index++) {
+        spin_lock(&taskRcdListLockArray[index]);
+        list_for_each_safe(pos, next, &taskRcdListArray[index]) {
+            taskRcd = list_entry(pos, TASK_RECORD_S, list);
+            if ((taskRcd->poolId == poolId) && 
+                (taskRcd->tierId == tierId) && 
+                (taskRcd->diskId != diskId)) {
+                spin_unlock(&taskRcdListLockArray[index]);
+                return TRUE;
+            }
+        }
+        spin_unlock(&taskRcdListLockArray[index]);
+    }
+
+    return FALSE;
+}
+
+/* ṩӿڸBDMӲnormal״̬ʱѯָǷܽ */
+bool checkDiskCanDiagnosePatch(diskid_t diskId)
+{
+    poolid_t poolId;
+    tierid_t tierId;
+    PMGR_DISK_INFO_S *diskInfo = NULL;
+
+    DBG_LogDebug(NO_LOGID, "The input disk is (%u).", diskId);
+
+    if (INPUT_DISK_INVALID(diskId)) {
+        DBG_LogError(NO_LOGID, "Input invalid disk(%u).", diskId);
+        return FALSE;
+    }
+
+    /* ̹ϲѯ, Ϣ׼ȷ, Ѹbdmȷ */
+    diskInfo = getLocalDiskInfo(diskId);
+    spin_lock(&diskInfo->diskLock);
+    poolId = diskInfo->diskPoolId;
+    tierId = (tierid_t)diskInfo->tierId;
+    spin_unlock(&diskInfo->diskLock);
+
+    /* ЧpoolId */
+    if (poolId >= g_MaxDiskPoolNum) {
+        DBG_LogError(NO_LOGID, "The disk(%u) is not member disk of pool(%u).", diskId, poolId);
+        return FALSE;
+    }
+
+    /* Ӳ򱾲㼶ڴ̵ع¼, ̲ */
+    if (isOtherDiskInReconTaskRcdPatch(poolId, tierId, diskId)) {
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+EXPORT_SYMBOL(checkDiskCanDiagnosePatch);
+
