Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp601103pxb; Tue, 15 Feb 2022 23:24:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXG8wfl5zP7T66iClq6wLQ0ri0ELhFep2SoQDzn9yi+QvNNS75IZ9sNzlp4F4t3P25RNt0 X-Received: by 2002:a05:6a00:1a91:b0:4e1:35d:751f with SMTP id e17-20020a056a001a9100b004e1035d751fmr1809054pfv.52.1644996282474; Tue, 15 Feb 2022 23:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644996282; cv=none; d=google.com; s=arc-20160816; b=OU6qSZxQisA3vteaCW3FI5/qZw+/1UTfdbLGdC90txHYQfJyImxGlfMPIW5EhrXGMK rNhKNSXcc6YmswyvLCh0stLzQrnOsWLNM9W3V6T7hQYazeKsofei4Llo1LczMBlTiQU7 anr05VlTpCBcUAv1ZBPiiKmWewCGU7jKkJzQqNuGZiDvcA3EmV8MWhZSOncQOSdk39uZ B2wekEDTZJPAOMgai/rKHrhOFykwgZBrDecSenSxnEW+YY/T+ssFXw4sA59lOzeA5qAO zxyfU+g92RTWTudqJ1c5HpR7O171IxLMJYZQStD6mdXlCEpsuOCb+eYkbkn7t4NMRaei +9UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UF22wzNFpm2IeXFXPkRt/7QTNpA2ZS3NNacg1G/BHTA=; b=KbsL6Aos4aI7gbipz/b5V/a8t3tVZvUklQGHx5o8cnrk5VaqVfDVXIyEBRdLMHe2Xl pUrsvQt4MTBrW3s8sPg9teLNUK0nCA9MAYlJgW53Z+Aw/tDBv1mnE/LXGgHJJOviU5Uk dvR1Y5S/yJy0Mdp9M2xqoZaE0LPys4xi1Rx3FIGZEQs8Ac/1qOhghaKlaOhSsBp7bBzp s/rxS46sAoJMep0ysKkTFeziWDal1UxNnOKog+kWsF08Jaic//QTJNL8YvwGEXd23Y3T SA/KkDAFRXkTXWSqn8jyralWmAE5qmtWbOwZfOg2ROAn9Klea1zFL75AvfjsgROktML4 /o0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=aLkLiUl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p11si14619016plf.521.2022.02.15.23.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=aLkLiUl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 465F62860E1; Tue, 15 Feb 2022 22:53:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241164AbiBOVvg (ORCPT + 99 others); Tue, 15 Feb 2022 16:51:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240925AbiBOVv3 (ORCPT ); Tue, 15 Feb 2022 16:51:29 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4044BE370B for ; Tue, 15 Feb 2022 13:51:18 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id v13-20020a17090ac90d00b001b87bc106bdso4424441pjt.4 for ; Tue, 15 Feb 2022 13:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UF22wzNFpm2IeXFXPkRt/7QTNpA2ZS3NNacg1G/BHTA=; b=aLkLiUl2q3+S6eeMXpypsrxoD5fjO9umu93awZL2f4DtK7iBq9t1st5HRP4P9rgAKQ vbbbxGJdWSs0YTXYqaQOXspsbJuV/Ut61sGZKXIhgZ+Ao1l2oLI2a3lopePAqvNg0AM/ kDMZ1kpGbiLtcFI4B2ZqtAbaAHRBWRiCwoQbOyqM63uY3euR9sdAmumj5oYMSCVi95Ns 1sW4wxDTlXLSh9B6p0n0D3UkJbjeDvFRKeSYt2Q+/kQzExnf7VeE2lpE7rMUEQZ5fScV u6euyIJCEvIB0kJrnAAehROqriwI5p8Dq4L2NbjbKWOUOEKsNVQpkAWi+LR6NKEvikDK GEWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UF22wzNFpm2IeXFXPkRt/7QTNpA2ZS3NNacg1G/BHTA=; b=2tTe9xQfJd48MwdsR2nEdyxCzyG1/Nynx+r8XpRGEpD/6YslvUFSY6uf27PqktGeW2 Y7nuO5JoN1wfyxYhB2ew/BhCFCUNYXUDmrqVazSsVgMuLjKBmIVdCYcaYZiCsmAvcaxi tekq680SrUXXDO/wwRi2zLMpFDuTQjjflcyQZ+HsV60M2fHoelAUAVi87SiNs3ehHXvl FUmsP7qmBWfI5pDO61Gyh8JL+ARiIxwDEmAzN1fCB6jXWazSr1wWymsGuWkM2ZF6+L1R Xcb9WQa8oXwjXOzVqHogVBeh/x4Q3ZUQu++zonbtM+9FPudVYOxQXbZmaNGJ/HatFxWE mQKw== X-Gm-Message-State: AOAM533dRyZURi1W6cZVZovU9J2JuNpdvxyFeBtJUjj+SzVtYvVsd3hM Rp3G5qQQGR2ECar1f7QV96AdBK97F+5C4Hajh1D9rw== X-Received: by 2002:a17:902:b20a:: with SMTP id t10mr753705plr.132.1644961876547; Tue, 15 Feb 2022 13:51:16 -0800 (PST) MIME-Version: 1.0 References: <20220105181230.GC398655@magnolia> <20220105185626.GE398655@magnolia> <20220105224727.GG398655@magnolia> <20220105235407.GN656707@magnolia> <76f5ed28-2df9-890e-0674-3ef2f18e2c2f@fujitsu.com> <20220121022200.GG13563@magnolia> In-Reply-To: <20220121022200.GG13563@magnolia> From: Dan Williams Date: Tue, 15 Feb 2022 13:51:10 -0800 Message-ID: Subject: Re: [PATCH v9 02/10] dax: Introduce holder for dax_device To: "Darrick J. Wong" Cc: Shiyang Ruan , Christoph Hellwig , Linux Kernel Mailing List , linux-xfs , Linux NVDIMM , Linux MM , linux-fsdevel , david , Jane Chu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 6:22 PM Darrick J. Wong wrote: > > On Fri, Jan 21, 2022 at 09:26:52AM +0800, Shiyang Ruan wrote: > > > > > > =E5=9C=A8 2022/1/20 16:46, Christoph Hellwig =E5=86=99=E9=81=93: > > > On Wed, Jan 05, 2022 at 04:12:04PM -0800, Dan Williams wrote: > > > > We ended up with explicit callbacks after hch balked at a notifier > > > > call-chain, but I think we're back to that now. The partition mista= ke > > > > might be unfixable, but at least bdev_dax_pgoff() is dead. Notifier > > > > call chains have their own locking so, Ruan, this still does not ne= ed > > > > to touch dax_read_lock(). > > > > > > I think we have a few options here: > > > > > > (1) don't allow error notifications on partitions. And error retur= n from > > > the holder registration with proper error handling in the file > > > system would give us that > > Hm, so that means XFS can only support dax+pmem when there aren't > partitions in use? Ew. > > > > (2) extent the holder mechanism to cover a rangeo > > I don't think I was around for the part where "hch balked at a notifier > call chain" -- what were the objections there, specifically? I would > hope that pmem problems would be infrequent enough that the locking > contention (or rcu expiration) wouldn't be an issue...? > > > > (3) bite the bullet and create a new stacked dax_device for each > > > partition > > > > > > I think (1) is the best option for now. If people really do need > > > partitions we'll have to go for (3) > > > > Yes, I agree. I'm doing it the first way right now. > > > > I think that since we can use namespace to divide a big NVDIMM into mul= tiple > > pmems, partition on a pmem seems not so meaningful. > > I'll try to find out what will happen if pmem suddenly stops supporting > partitions... Finally catching up with this thread... Given that XFS already has the policy of disabling DAX rather than failing the mount in some cases, I think it is workable for XFS to fail a DAX mount if reflink is enabled on a partition. This should not regress anyone's current setup since the FS will not even mount with dax+reflink today. As to the specific concern about registering failure handlers for other purposes I expect that can be done by registering failure notification handlers on block devices, not dax devices. So it's not that pmem will suddenly stop supporting partitions, dax will simply never gain support for reflink in the presence of partitions.