Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3824671pxf; Mon, 15 Mar 2021 21:18:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/NWe3hswUYgpw9pkMBAs2Wu8VqonY+xa0bXypoayoK9onXs23a/bAWrQawG8YK7k1dLVW X-Received: by 2002:aa7:dc49:: with SMTP id g9mr32698608edu.60.1615868313397; Mon, 15 Mar 2021 21:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615868313; cv=none; d=google.com; s=arc-20160816; b=fT6ZPyMhRzbNS8JQEs8inrZMQ2xwg1IuZ381X8Fi7eTlfpklUIwVvPh0C3q5k9QxFw znZSYtRdIXh8UTr71TDZW6k+vc0Nkm/bXrXvZOjt06nrwmZGWMOVzx7Et6Kjd2BpHDEY PR5utm91Salirp1thlNsFM5Oqkk4qkZ91m/HlA5EBZNZ3MmG+Cw+T/n0vrK8hMxWoQrh pB8AD6PkjudC9WaYEUWJv0IDZvMjx4iik3D+CUyjyqN9riLtxTv2N2rjFC514vNrKGdM s6CnQY9Ydo22xJjNqpeL/MjkhT0qZgAVecjkYPZc/+JJmI78AUt430vVB7WqcX9XzDXE HfvQ== 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=UW3UTD4AhKTrj1fB4wgUfBKoKLloAvTw+EnFzkAK904=; b=VuYW3779sJ6q75bFuDmXvzWAh/iDfqbrs4g0/EMUTtRGOMTLYE5aIkSdoy5SsSiepI HCGD7aAVQGhpzEA89GLJsvt9C68w5qj7PHc4YfaQE9Nk3CrmMIx8lHzeiSof+IikooyG CQ87p6lqGsmfSEEwoEjzzXkVOpK6cv40NdJ654MXfOCARnB05+f7rYoUxV7luGW8ddEs cWq7x6dMNtrVPSWl2JWC0JMQ0lEGtmDE8AqKrghMOW59IB3sbYPtKMymYQIenlUNa6BV 2U1wo9/DFpTLOGw313VXziGfWts/QZFDHqUVCkUfnKfIKfNT+hEKht99m5hQX9hiMUi3 zy/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=voXbyzKW; 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 t16si13372249edc.448.2021.03.15.21.18.09; Mon, 15 Mar 2021 21:18:33 -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=voXbyzKW; 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 S232579AbhCOUTJ (ORCPT + 99 others); Mon, 15 Mar 2021 16:19:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231942AbhCOUSy (ORCPT ); Mon, 15 Mar 2021 16:18:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C3B5C06174A; Mon, 15 Mar 2021 13:18:54 -0700 (PDT) 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=UW3UTD4AhKTrj1fB4wgUfBKoKLloAvTw+EnFzkAK904=; b=voXbyzKWfsQUUAwFzMchcMoBGF V5v6vsHGLN8Y1wE803Q/UAnvZNUtxpG+l7lfOLU3lsoEOfFCbDVYWJpXc4F3PyaNaw9WK7lukIry8 hobRGysYs6WdS4yWX4HZFgZQf2Mqh3F81b14BJrqsm4iCbbz4G1fOlsCpYJWIx/1/inWVY6UidUmL FccCt+aJeQE3wNGLh6c0NBG4EZeWpLHuMr6KNYTIkZLYIVj2Gp4aYpFriSkqxXo2+aQdUbo0wNsgJ Mi7Y/jOudBFOiuHzLh+UBX0U8DtLgtFpC4ALrD3udL7bq5b45TcRKmH4kwN96OCbPIx25B8Xrg6GJ 7Goi/8dQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lLtfU-000iKd-KA; Mon, 15 Mar 2021 20:18:33 +0000 Date: Mon, 15 Mar 2021 20:18:24 +0000 From: Matthew Wilcox To: Matteo Croce Cc: 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 =?iso-8859-1?Q?Gonz=E1lez?= , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke Subject: Re: [PATCH -next 1/5] block: add disk sequence number Message-ID: <20210315201824.GB2577561@casper.infradead.org> References: <20210315200242.67355-1-mcroce@linux.microsoft.com> <20210315200242.67355-2-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315200242.67355-2-mcroce@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.