Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5714629pxj; Wed, 23 Jun 2021 07:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXrA18YneADw91q+21KoArUtMHOCqFNp0JJeklTI7c3QwztGPLkuaHFc//fLZD2xThLg6N X-Received: by 2002:a92:cd41:: with SMTP id v1mr2524806ilq.180.1624458618753; Wed, 23 Jun 2021 07:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624458618; cv=none; d=google.com; s=arc-20160816; b=lt0mRh8zotVO1giGatM2JtN98yNxUaIqzcH9QmC6FYGM6RWTad2zTabeJpNaoRcBya vQUMKct8/mCdInq26BnaN25aN3m+bwEBs4MOL3Nbn1fvbe1FiW283Y9vorZE3Vshmmx5 i1/vmpJ8C2RrRuU9iqriBngk5KCiFOoRYqevWFqyJgL7UR0o0ABPVEuMagmhlPSuwYDt vqIkWMOC4/AMUGQG/jV9oqCTiWEqUmqnX9BFSbRS11AL9D6aGGeC873cq4zvGBmB+Q0z Z0fV7yBxrV1L8knmk8VxE7sZ0kvnuXz4FdTE1Y7EUkm7lsa+kkFGWwYj+lboAr9glUf1 H0ug== 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=ieDdiT+cXnudy2hbSqWAlqdZ9AqoFLDbGiLjJtl0z+k=; b=P517XVX7j6A7FKFRAXu+6G8zhYS2DCJA36domVMgOwzRK96ZROAIVh/RlIFhh6wSaJ r4+61YphZVViaPx+mZOBOI8q79VwXhI7j6amvqrkyA9oqrOstZv5zppMdRmYreJGITmx 11twTB8khwVND9c83bp9a4/5wjMmXsDzAS0oifqjQeA82KvooIEUSDZ6S1OKjN/GYbYr byt8M5E28c2v8q8G5OkZWafSWQQ5czE0J/Vh+hiOtMqWYNb5YeNkbDAw1qQJqjqd1654 LWuK05GUDJVb4wPN83B6HOjlsqbni/S3asHfSec7gorwbjh5Ykh+UTZusl7PecjX0bzx z3Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IfuozOkc; 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 j20si5802087ilo.0.2021.06.23.07.30.06; Wed, 23 Jun 2021 07:30:18 -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=IfuozOkc; 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 S230498AbhFWObq (ORCPT + 99 others); Wed, 23 Jun 2021 10:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbhFWObp (ORCPT ); Wed, 23 Jun 2021 10:31:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2592C061574; Wed, 23 Jun 2021 07:29:27 -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=ieDdiT+cXnudy2hbSqWAlqdZ9AqoFLDbGiLjJtl0z+k=; b=IfuozOkc+1XSuEugMOC8GRdMVH gDDh3l4GzQvnjGpr60DReCardwRJoeWVVcH0ILI7WUAgVPKDtY0cG79Qjg3sQy+Y7YvS/g7dx1KAb gDHn6bXFVxNq4wFpK0VnA3t3t8dCnhDo+S/dKEasnkiBBtGYeppFFnHP785U/kEPvdBRTeFWX4mtZ 8bf7IEZt1GbBaKqkJmckjefsWeW0XO+KThOAK/CEgUhN8R2mxLjqBRlYSqKuXRvdSNQAbQQGIqs9Y k9acsCzUb+LcWgIgahctY+o9Oeva4ViK+vIug45xOLE7PjTYVO6pPW+PwJW2sXJmshIrEYwH1iEQF 6aNl3WGg==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw3rv-00FWMS-N2; Wed, 23 Jun 2021 14:28:51 +0000 Date: Wed, 23 Jun 2021 15:28:43 +0100 From: Christoph Hellwig To: Matteo Croce Cc: Christoph Hellwig , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , Linux Kernel Mailing List , Lennart Poettering , Luca Boccassi , Alexander Viro , Damien Le Moal , Tejun Heo , Javier Gonz??lez , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke , Matthew Wilcox , JeffleXu Subject: Re: [PATCH v3 1/6] block: add disk sequence number Message-ID: References: <20210623105858.6978-1-mcroce@linux.microsoft.com> <20210623105858.6978-2-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Wed, Jun 23, 2021 at 03:10:21PM +0200, Matteo Croce wrote: > I just didn't want to clobber that file namespace, as that is the only > point where it's used. It doesn't really clobber the file namespace. Declaring it normally at the top of the file makes it very clear we have global state. Hiding it in a function just causes obsfucation. > > Can you explain a little more why we need a global sequence count vs > > a per-disk one here? > > The point of the whole series is to have an unique sequence number for > all the disks. > Events can arrive to the userspace delayed or out-of-order, so this > helps to correlate events to the disk. > It might seem strange, but there isn't a way to do this yet, so I come > up with a global, monotonically incrementing number. Maybe add a comment to explain that?