From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B9F23BE62B for ; Fri, 27 Mar 2026 07:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774594965; cv=none; b=Dw7LqTWd4/1nrnDc4PIBXXMJ6Qgu2qjLKKhHiURg6XNgxvld8oxpx8J46QVq1mBVrzhDEuJhQvFJRXNp+sKnQHtlBlOhnZyi8Y/eWKzkpu6U4ifIi26ewkh/2Iag8zlDLs8NcYaY1stgk3zfcRFW/XXK3MwGwwIIuaoT4KkkuJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774594965; c=relaxed/simple; bh=K0NU65iUAYQvOh1WDSTx62fRLZ4lQSk71rPspBEOQzw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=b0i7fDdKo2s9k6iaYa1QOHKKn3UXPizzcK3AeD5woOauekQCOtbXDo1X/pR/GzdtqqXjo7L3ID7C8dpR2DbbAkA92e2rThDP4tzyK8zlGCrz2EKZqOaemzAtoapalA8+sfxwlGaQGemJTC2fXzWmYQ9trQqjwS/7HC29j2ZIe4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=dfwhxI5E; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="dfwhxI5E" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-439b6d9c981so1097503f8f.1 for ; Fri, 27 Mar 2026 00:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774594956; x=1775199756; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8kTV44QRDxew7Gw49InxhqyWyVfg6ic1CZM1bb6ukM8=; b=dfwhxI5Er778Wb2iRasfGmgjVg2q37zJsXR8gylTh6GJVyhUCFIWphiLelWNUGfeYI 2G+lJnhPQx+HUiHXmaD65ZuNn2f3ziByBxnP9i05QmIfJi2TEArmJLjKqVKBbjopSN11 q1sICgKwEdg55m9922GkRrrq4TpGFTSwcmZyOOwgYQkbdDk5SmGeNLHzDr6BMg1r7FxA sImHC3zSCjhz/ashywjQAYEYjDemnphssyXWBFgdqSUUBiOTJw8XQGpcj18xUJkQXppe 400mZlDavy93m11XzPAXJl87ksjClsAyJGJhewD5XUBFXev/9weh4ETGkNR2YhRgq8Al NimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774594956; x=1775199756; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8kTV44QRDxew7Gw49InxhqyWyVfg6ic1CZM1bb6ukM8=; b=ETGKnqwzLF86QNHS2yof6S1x1L0sukGZ2YKmg/b5sbk6aLN8wZZBiqkKVr/zGmxuUW 6fIDKZ4yUPX4ceUvwzGSy4itlWSf8MiSvRvMVx8ztAnzoixSx/+jNndHqKHT+BcrJkCe f6Xup1TGcvFV2PMcXFb9pCsePA0gRelANM9gMsUyW8aH4fvwrFNR6nWvzmL15ee/iymk RSMbVMIRuf2+zJA2k2P4ZsWGAlIao9U4Hc/tpmFPgC2BAjkBuv/th3eIpfve6ZM6/iu2 2FKCQJdjCoDIvfPcBERQm81oGu+J76brP7thFHniWSKjhUWu0OPCJIxN3hSVFwm1V9NH Mi4w== X-Forwarded-Encrypted: i=1; AJvYcCWKrJA1s0X85WDM/qJwlFnN9sx723iHT5yOlENa/cWWuYTeIvhWI9FiEDy2W90yZiMSJxPaMDI+0wguUX0=@vger.kernel.org X-Gm-Message-State: AOJu0YwFlY4ePM+T6T2QFCQT5G1Fle1mjbKnSlhcwNSlGFQqaMtpINaG hNwtY4kM0K9NIhmEJ3CYR+ZDxMIjQQD+J3ubF2v00SGbXzO9pUP21uuav0fBEDtho4M= X-Gm-Gg: ATEYQzy4UsHdarGeaXHLW8XUIIvECHLpTMSP1mp6hLXmkFM+QmUG4DZu/cb5J97Pv3v 2T3zrWGgwrl/vYabTl5HwkSM5GEm7QFyOlZKbo7ChpS4go+LFFyCAXFXrJBwYNzf0RrjZV/+ibH 3q1QpLypuILJz8nb5T1rICMDEb1JSa9kffRoJG3J2u1bk51wOsCPIXtZHIEs27OHFJhyT+gfSDe WWc6GK9NGohxt4sA/m8XQTpZTwIAaiI4g4xLaTCoLF7vGE5XexcJNxVi6hZ331qJ+Hs66pE41X3 hhs3SByBtsufPb4pL+V9Sy1/0/6SubfNygqKJJ7SoMkEabbMDeP6jW9ox1Pmbk1t8ezm/N0XjhQ 6zQuXMfhBmOf43PjUzivVzF9GfSSzaExb6O+XqXnWWg1qjFG+pFaUwvioiz8Em6+lrkYZgg+DGn FuFIaM2eYzJ2kC0XF2fh8i+SmhZcM903H2oqIH6p44A5LfCnfcIX7TV6HwjECz X-Received: by 2002:a05:6000:4703:b0:43b:9fee:9392 with SMTP id ffacd0b85a97d-43b9fee94b4mr1195313f8f.4.1774594955964; Fri, 27 Mar 2026 00:02:35 -0700 (PDT) Received: from ?IPV6:2001:a61:2a4e:1a01:f18a:19a0:4691:a8ea? ([2001:a61:2a4e:1a01:f18a:19a0:4691:a8ea]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919df953sm13543801f8f.29.2026.03.27.00.02.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2026 00:02:35 -0700 (PDT) Message-ID: <04effda6-fdb9-4fb3-b73f-d951538f2fed@suse.com> Date: Fri, 27 Mar 2026 08:02:34 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/13] scsi: Core ALUA driver To: John Garry , Benjamin Marzinski Cc: martin.petersen@oracle.com, james.bottomley@hansenpartnership.com, jmeneghi@redhat.com, linux-scsi@vger.kernel.org, michael.christie@oracle.com, snitzer@kernel.org, dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org References: <20260317120703.3702387-1-john.g.garry@oracle.com> <10aab639-2fe8-47b7-b821-12d21b6af874@oracle.com> <43ca92bc-af38-4833-841c-421997ed90fe@oracle.com> <2f84e35f-3574-45e8-9567-4edcfdbe5a45@oracle.com> <7755e98f-5619-48ba-bcfc-b64eec930c40@oracle.com> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <7755e98f-5619-48ba-bcfc-b64eec930c40@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/26/26 13:16, John Garry wrote: > On 26/03/2026 10:19, Hannes Reinecke wrote: >>> @@ -80,6 +80,7 @@ config SCSI_MULTIPATH >>>          bool "SCSI multipath support" >>>          depends on SCSI_MOD >>>          select LIBMULTIPATH >>> +       select SCSI_DH_ALUA >>>          help >>>            This option enables support for native SCSI multipath >>> support for >>>            SCSI host. >>> >>> And that is even enough, as Kconfigs should only specify build >>> requirements. >>> >>> We really should be also calling something like scsi_dh_attach() for >>> scsi multipath to ensure that DH is attached (and running to update >>> sdev->access_state). >>> >>> And I am not sure how the dh alua module is even autoloaded. I think >>> that on my ubuntu machine the multipath-tools.service does it - >>> something like this would not be nice for native SCSI multipath support. >>> >> Gnaa. But then we don't need this patchset at all. >> Main point was that we _do not_ need to hook into scsi dh for implicit >> ALUA. > > But again I don't think that this is good enough. Native SCSI > multipathing will read sdev->access_state to know ALUA state. We can't > just rely on dh alua module running and doing what we need to know that > this value is valid. AFAICS, dm mpath relies on dh alua module to even > work at all: > > device-mapper: table: 252:1: multipath: error attaching hardware > handler (-EINVAL) > > At this point I am more inclined to just have a small SCSI core ALUA > support for implicit ALUA, and allow scsi_dh_alua.c reuse functions from > that but not use sdev->alua structure, like in this series - trying that > is turning into a mess, I am finding. > ... where one finds himself inclined to think: 'told you so' :-) And really, the SCSI alua handling doesn't need to be precise, in the sense that the state is always up-to-date. It should be sufficient to read the state once during startup, and then resend RTPG whenever we get a sense code indicating that the ALUA state doesn't match. We will be missing any changes between non-optimized and optimized, but they are meaningless for the SCSI core anyway. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.com +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich