Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp1193683pjo; Wed, 8 Jan 2020 13:34:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzrMWhhht7z0L+eWmWCq/SUI/As6f6mFAClsmZrJhxyqvCsoMtC1sufj3E6DKvfldZwtPTl X-Received: by 2002:aca:1309:: with SMTP id e9mr551622oii.7.1578519289735; Wed, 08 Jan 2020 13:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578519289; cv=none; d=google.com; s=arc-20160816; b=ZwAmRVkaqO6MhEWeRkt6X89N5b6HWPmFMQyBbRAi7wByhiiwu8MCtwGnY7ONFTaOca 2KRw8FDHR34YzON1iqFs8TEkxvS6N3GayojUcpS8kkB6YjET9jDWsYvQMnWIrMvkH07X /QiuBMqxoFNz7RR8KzEEje2xV38e4F7bPymf/n9N/eFjliAQXoMD4s0zX+JqFAxlzT+q mq5UBQHzv0NHEjUqP/RweYffTKg8udGhvcwybZ+XjqZMxylZAMW1gCZslvsCDCA+M2BW rWN84U/6Y/3i+nqI4pjm7HrWbOukul8LlBD2DxNKBWD1lKSVeXl1yxDYhkK8tH5kv7g/ T+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=c2Tl300doSUHOEtlULkq/YaFUqcc7K1ac46TaKPX0Ws=; b=kmihGxgXkPnSGjHU2PDB150qTVP5mJjMETy0YT4gJiaERTHp4k0xT+Sriby88N7WUw +pwvyEnFyz1GIYmDqm5A/uTRUVz4GqE3jepsLArkQoqN9r/DZe9Z2+i1IiP8Gs/fb1d9 ThybeZog4nWhlY0PC/0GWWY1RDH4kX9tgQGjhT7YtJaOgg0H4aitlosbnA3wG8Cu3g7T LqwCFsYkxGpXoXF3eha8WT8LHO+Jo8KuBpdLNmto4+lhLWkprWMoCVcWdu3rKAFitFgZ OE8no4KyhM6G2FfwU1KDBL+JVFZqsewvL0H237Cj+Icy9uhnwzog4CIsh2twtgbKHH8o wAkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KvqER5h6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k23si2389688oiw.238.2020.01.08.13.34.38; Wed, 08 Jan 2020 13:34:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KvqER5h6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727237AbgAHVcm (ORCPT + 99 others); Wed, 8 Jan 2020 16:32:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32482 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726179AbgAHVcl (ORCPT ); Wed, 8 Jan 2020 16:32:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578519160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2Tl300doSUHOEtlULkq/YaFUqcc7K1ac46TaKPX0Ws=; b=KvqER5h6nfNv97BtxSzWw2QUj108fHrw75OMdkKgq3qBnAX5dvvGoYNL5DzZp5JKFsnBaz /0j/t/M5xOTUVKsqtbJzv8DGBd8HC/a3rkqCPYKifYh8839iVZRHFcD0HOPNOq2sIYS2su YGI8I1tQ+KCCTci2wkIj89l63i+8Eao= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-4JXflz8VOOWLa-f3AACnGQ-1; Wed, 08 Jan 2020 16:32:37 -0500 X-MC-Unique: 4JXflz8VOOWLa-f3AACnGQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7C190800D48; Wed, 8 Jan 2020 21:32:32 +0000 (UTC) Received: from emilne (unknown [10.18.25.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id E33A586C54; Wed, 8 Jan 2020 21:32:28 +0000 (UTC) Message-ID: <8339b890eec74c423fa2260a90fcc2154cf05b53.camel@redhat.com> Subject: Re: [resend v1 5/5] drivers/scsi/sd.c: Convert to use disk_set_capacity From: "Ewan D. Milne" To: "Martin K. Petersen" , "Singh, Balbir" Cc: "axboe@kernel.dk" , "Chaitanya.Kulkarni@wdc.com" , "mst@redhat.com" , "jejb@linux.ibm.com" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-block@vger.kernel.org" , "Sangaraju, Someswarudu" , "hch@lst.de" Date: Wed, 08 Jan 2020 16:32:28 -0500 In-Reply-To: References: <20200102075315.22652-1-sblbir@amazon.com> <20200102075315.22652-6-sblbir@amazon.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-01-07 at 22:15 -0500, Martin K. Petersen wrote: > Balbir, > > > > We already emit an SDEV_EVT_CAPACITY_CHANGE_REPORTED event if device > > > capacity changes. However, this event does not automatically cause > > > revalidation. > > > > The proposed idea is to not reinforce revalidation, unless explictly > > specified (in the thread before Bob Liu had suggestions). The goal is > > to notify user space of changes via RESIZE. SCSI sd can opt out of > > this IOW, I can remove this if you feel > > SDEV_EVT_CAPACITY_CHANGE_REPORTED is sufficient for current use cases. Remember that this event is generated because of a Unit Attention from the device. We are only passing on this indication to udev. It basically allows automation without having to scrape the log file. We don't proactively look. e.g. in the case of SCSI unless you have commands being sent to the device to return the UA status you won't hear about it. > > I have no particular objection to the code change. I was just observing > that in the context of sd.c, RESIZE=1 is more of a "your request to > resize was successful" notification due to the requirement of an > explicit userland action in case a device reports a capacity change. >