From nobody Fri Oct 18 08:41:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1718800272228148.2814841119433; Wed, 19 Jun 2024 05:31:12 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 19321B24; Wed, 19 Jun 2024 08:31:11 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C936081F; Wed, 19 Jun 2024 08:29:35 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 793BCBD0; Wed, 19 Jun 2024 08:29:26 -0400 (EDT) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CB2A9AE1 for ; Wed, 19 Jun 2024 08:29:25 -0400 (EDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45JBudmg008833 for ; Wed, 19 Jun 2024 12:29:25 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yuv9p8g7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 19 Jun 2024 12:29:24 +0000 (GMT) Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45JCTOYS026130 for ; Wed, 19 Jun 2024 12:29:24 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yuv9p8g7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 12:29:24 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45JB8seg009478; Wed, 19 Jun 2024 12:29:23 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ysqgmuyar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jun 2024 12:29:23 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45JCTJIL44368296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jun 2024 12:29:21 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D18302004E; Wed, 19 Jun 2024 12:29:17 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B683820063; Wed, 19 Jun 2024 12:29:17 +0000 (GMT) Received: from fiuczyvm.. (unknown [9.152.222.239]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 19 Jun 2024 12:29:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:mime-version; s=pp1; bh=o87+zMnhz5yze RKbTiY9OCYTv0MuNvNUzhdDlzMYaR4=; b=mR3S3FcZIX9FpVq0JidWhD0eRKQQa y2KCzpzmNFMEOhLAdQL5Dai1Lg7ixG5CZ4aOGUPi3R5V30P8Ssxofcy0V0fewWiu KgIo9B6lRKwKozH/I/3Lkb/SZI5HNw62svy1yN2Iu9grBO+axz2wSov/Qs32Z8f6 Cp/+X2YPtGzuMMYVPk3/3uyeN7M3qLyWVkClRJPtWyZ7/Vwpigjpll1s91UqU2Be F7VIrMxU7YZy575IGZ45gEuqjDFwePjUykRfkQpseafleer/b2xCQYQlwpFwwAkr ctWp0hsbV1GYLld5eWKQoUQBWL0VTSRRBu3Ffh1/qBP47GMqKiomSWlJg== From: Boris Fiuczynski To: devel@lists.libvirt.org Subject: [PATCH 2/4] nodedev: improve DASD detection Date: Wed, 19 Jun 2024 14:29:15 +0200 Message-ID: <20240619122917.45827-3-fiuczy@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240619122917.45827-1-fiuczy@linux.ibm.com> References: <20240619122917.45827-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1nXBSeLKhSwt7nKXHVP7NHFWYZRaytdy X-Proofpoint-ORIG-GUID: z6dfqvdgbrbdfPxInhsbTQCHhs_g9DdR X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-19_02,2024-06-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406190092 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GEQ2A4DSVPSSMS3NA7NQCHCBJABILMEY X-Message-ID-Hash: GEQ2A4DSVPSSMS3NA7NQCHCBJABILMEY X-MailFrom: fiuczy@linux.ibm.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: jjongsma@redhat.com, mhartmay@linux.ibm.com, mprivozn@redhat.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1718800274207100001 Content-Type: text/plain; charset="utf-8" In newer DASD driver versions the ID_TYPE tag is supported. This tag is missing after a system reboot but when the ccw device is set offline and online the tag is included. To fix this version independently we need to check if devices detected as type disk is actually a DASD to maintain the node object consistency and not end up with multiple node objects for DASDs. Resolves: https://issues.redhat.com/browse/RHEL-39497 Reviewed-by: Marc Hartmayer Signed-off-by: Boris Fiuczynski --- src/node_device/node_device_udev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 15e31d522a..c0e258fe9c 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1065,6 +1065,10 @@ udevProcessStorage(struct udev_device *device, storage->drive_type =3D g_strdup("sd"); else if (udevKludgeStorageType(def) !=3D 0) goto cleanup; + } else { + /* A detected disk might be a DASD */ + if (STREQ(def->caps->data.storage.drive_type, "disk")) + udevFixupStorageType(def, "/dev/dasd", "dasd"); } =20 if (STREQ(def->caps->data.storage.drive_type, "cd") || --=20 2.45.0