Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4271642pxf; Tue, 16 Mar 2021 09:24:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOC3prnDy4wrRA9N2Auwn55MCWChfBhApqRbzhVbSP1RenxGVG19iBMq5pTic2HB017tKW X-Received: by 2002:a17:906:3159:: with SMTP id e25mr20606312eje.303.1615911895896; Tue, 16 Mar 2021 09:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615911895; cv=none; d=google.com; s=arc-20160816; b=lGfJs9TOZfY+yLxCGo+YWHfMwxxyE4jz8DL5M2TLxR1Z5XppE0tUVr1C/LKgehQuFo pKQYe97Vs3WL08SgqLnMbgvIhlefIr2F5+8lR/EXHYKPWhh6J8IpTvXSAZxPd2tlcwui 3ixTqic2vv8tBqvFSuiMe6hGeQHVhZ0ycx+PQS2diqto2Tz+wMpu5b5OcDD+2kTnuOFz LsRGsQoH9vjnCwKMix1GI+F4hsHuhhvV5F/lrtKEtD+/FaLBWxkwqRBWEmCWzJqoWCbG P7Faa3MbeMqg2wilJlzSHverXuICIKiPNpAtWL3O8/ifoeo8B4dHyQuoTG6fgRCjvItR vlcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rP6CC9aFyoPKSVnxzeAObDkX6GZ6Hhe9Q4ri+l1u2pA=; b=Y06VF47KpZ5VjDQINIQJ/ZRRSJuH3/FxTWTvRiLtZ0C8LX1GAsPnQ4oUAMEXuDp8bk U0GJtDAtVZ9Wj5Dcjb88z+1wSp3eh6sd0CqYX//SQ0WfckR3MZRYcaU1gcgBHjr6ZuBB 69+0ETOOTNXqn6WKzRU0A4LL01/2tRF9K7emFwtMKtgY+ZEcREsmhMl5AxB6vx1ccSDp ImCPimTnaozGrkFQYQywaflpeXIbpoC9A+bcKPZFc+TabtE1HoTSrfKzB4WiS3X7NbjA O8dMkgWVtRH/SHVGM+aSafkcnCpUI/PxqABEHDnu3DDLzJnb5sKeChYz7PLWK0LV5tCR tgsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="cH/w8vwN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly3si13933042ejb.615.2021.03.16.09.24.33; Tue, 16 Mar 2021 09:24:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="cH/w8vwN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236672AbhCPOix (ORCPT + 99 others); Tue, 16 Mar 2021 10:38:53 -0400 Received: from casper.infradead.org ([90.155.50.34]:34912 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236705AbhCPOil (ORCPT ); Tue, 16 Mar 2021 10:38:41 -0400 X-Greylist: delayed 1491 seconds by postgrey-1.27 at vger.kernel.org; Tue, 16 Mar 2021 10:38:38 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rP6CC9aFyoPKSVnxzeAObDkX6GZ6Hhe9Q4ri+l1u2pA=; b=cH/w8vwNvLgG0SrRl2Nt+Fypv4 QOXU8VhtVPS06zEJcVM/wsZRBm/HxFuL7D91SfEotUGCMU+/gi+VzHXFtP6PNZre6qRjHKndk/wf6 z8AARNbhLCbMiMuvUhhhoyBo69Wo/Hwzj9NiIzU03/c5iR56Vx/eTWIhLr9nKcrcON+tphU0DDoim RJAaD6OXJH80dt+vLa6fUU3+FlwPldkltU1TStVILQpXKNqpFuu6ErwPUWUDdYmOo9b2kWDe+el9d nYJbWOCmcKwi1+QcVMtubksLCQqN413h1M3QvRxLihBxoVPaLGaE53BZY2nYC3pBwGh9162n2v8Ca 9j8ywUOA==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lMARq-0009xZ-QS; Tue, 16 Mar 2021 14:13:29 +0000 Date: Tue, 16 Mar 2021 14:13:26 +0000 From: Christoph Hellwig To: Matthew Wilcox Cc: Matteo Croce , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Lennart Poettering , Luca Boccassi , Jens Axboe , Alexander Viro , Damien Le Moal , Tejun Heo , Javier Gonz?lez , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke Subject: Re: [PATCH -next 1/5] block: add disk sequence number Message-ID: <20210316141326.GA37773@infradead.org> References: <20210315200242.67355-1-mcroce@linux.microsoft.com> <20210315200242.67355-2-mcroce@linux.microsoft.com> <20210315201824.GB2577561@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315201824.GB2577561@casper.infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 08:18:24PM +0000, Matthew Wilcox wrote: > On Mon, Mar 15, 2021 at 09:02:38PM +0100, Matteo Croce wrote: > > From: Matteo Croce > > > > Add a sequence number to the disk devices. This number is put in the > > uevent so userspace can correlate events when a driver reuses a device, > > like the loop one. > > Should this be documented as monotonically increasing? I think this > is actually a media identifier. Consider (if you will) a floppy disc. > Back when such things were common, it was possible with personal computers > of the era to have multiple floppy discs "in play" and be prompted to > insert them as needed. So shouldn't it be possible to support something > similar here -- you're really removing the media from the loop device. > With a monotonically increasing number, you're always destroying the > media when you remove it, but in principle, it should be possible to > reinsert the same media and have the same media identifier number. And we have some decent infrastructure related to media changes, grep for disk_events. I think this needs to plug into that infrastructure instead of duplicating it.