Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5589365pxj; Wed, 23 Jun 2021 04:52:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh7lwRBZL+EjU2HAeqSQaGMVfMiq/9OzvyIboeopkvnatSAwwC30TwnkIjuDUFr/nUdVG5 X-Received: by 2002:a17:906:c2ca:: with SMTP id ch10mr9541302ejb.305.1624449146613; Wed, 23 Jun 2021 04:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624449146; cv=none; d=google.com; s=arc-20160816; b=vdKJ+JE4q1AWaBo3rVS6iM57KvJp/iz5J4yAj4tyfw895elwPGfDgu4/V8WYnixNPr I8Qh0NVss76jDZ4tX2RVv+N/NZv7qL2gwRstLyNjc/BplHJv5HvQ6IK16MIFEtTtOdB1 uMydMoYRpEtuT6Eqp+r0f33wGh4s9MjRTLBuRCOc5UuPhNclivX7cUL5I/VK3WA70Su1 td0CnGA0G/3cE+uZQZdTQrMwGzuN7ZmhokLT15rXkOv2tPS1GTDR5fwDhZiI3tOjMRmM keIRuQYQWE9WAswQgW6qjpB8cTcSLE6FZx5wLgxrJy/phIDYTJs1foouhDJugDJK/lKs lQcg== 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=b1RayldO4nvcoESER3Xz5ONjlHOB5LDTTaLrHfeN1ho=; b=Mhed3gDSwSnZrktEL2eAaeXR1mGbK/2F4VmZuw2rhCjc5ZiVk25F1mQeOFLE1KZUBO 54RqLZ7iUJYWwF7/3b3ARpL9QLezeE6DxV+j3GdDUzK4PvEXDn+ztgOgw8gdsovPcDP/ 8ygE3hUHpom2ibD+nwTq3mC3mAQkbnf2zSKun6D/zWvFpGG2FXZ2jY6BJkxLjtWnupVB C04nRXu7fTmxAFFVSUpMRUexcyGOwJJrKuLf3XoiRnEtNax4GewHXSS+Uphzf794WYef vM/9fCeRFabTAgTalW/sTHj3HDfoIGQtanu6cGBjZ+tIRWNSCYcVTnLKU/R9sfbix0Q4 DNyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nCvfZawv; 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 h19si2260964ejl.666.2021.06.23.04.52.03; Wed, 23 Jun 2021 04:52:26 -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=nCvfZawv; 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 S230212AbhFWLvZ (ORCPT + 99 others); Wed, 23 Jun 2021 07:51:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhFWLvY (ORCPT ); Wed, 23 Jun 2021 07:51:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5FAC061574; Wed, 23 Jun 2021 04:49:07 -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=b1RayldO4nvcoESER3Xz5ONjlHOB5LDTTaLrHfeN1ho=; b=nCvfZawva1HhJxn/bnxl4VCvvK WYnkbSoarlik1hjX9RXd2wMGNc8gXB7GxeqaLVmQvnw2C10eu6c9hT/kNqQGOM7tMVaJXi4A3aGMt ytMH9Ve53R6Ikq3a8i85+pDj0vGughLhQT4w8a2/iEtCOuWi0vMPq6YYIgXdfRn9H04f3TQ91tCQn /9AWAPyk/JnZ4zyaKJqDl6GfngNvhAh7TvHaqTGOx2jMcMrBgESLnAwaTiEBnq51fffv0w2OZXWs+ naSPswyYmh5+SmabtODLlgEZ8G/u6N/FM5+8khKaPP4my5Gh4J+iYePB/5h+/P2rTRF/h+MJ6P1Jx YvAJPI9A==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lw1Ma-00FNZe-V3; Wed, 23 Jun 2021 11:48:18 +0000 Date: Wed, 23 Jun 2021 12:48:12 +0100 From: Christoph Hellwig To: Matteo Croce Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org, Lennart Poettering , Luca Boccassi , Alexander Viro , Damien Le Moal , Tejun Heo , Javier Gonz??lez , Niklas Cassel , Johannes Thumshirn , Hannes Reinecke , Matthew Wilcox , Christoph Hellwig , 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: <20210623105858.6978-2-mcroce@linux.microsoft.com> 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 12:58:53PM +0200, Matteo Croce wrote: > +void inc_diskseq(struct gendisk *disk) > +{ > + static atomic64_t diskseq; Please don't hide file scope variables in functions. Can you explain a little more why we need a global sequence count vs a per-disk one here?