Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp667420rwb; Thu, 8 Dec 2022 01:05:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf42kl4XtuKvTsBKh3ASkTvEUBBwCDB/QBAWwf01ea5EYREYowMGZ+rkcdIjJncUNSO+0lez X-Received: by 2002:a17:906:b241:b0:7bc:1f2c:41b5 with SMTP id ce1-20020a170906b24100b007bc1f2c41b5mr49149401ejb.463.1670490339325; Thu, 08 Dec 2022 01:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670490339; cv=none; d=google.com; s=arc-20160816; b=sKo1QVxu5Rrlwtaw+j49/CtFZtkqqoGpaiX5ua436hbgHD9Glp+ICHFeRVnY+/c2Ak N8BZaPHnxcw8dsv0ZY+ARYWPNL3Jzavi6nCuDjkVj1CBy632TPcXFXDhlmVzAQJrNrC1 LRZs8QnbJsLCWJNAcXEqamZrq+Q4MJyb/8q1nzdJ/YDfX/e+jPFpPccB2Qtu86Vb3W8A HNXwgTmHu0qrq1KmzNiRXUa+/zkX6YDrGGxWJLy3gPhmB7FhLIHWje6OxH8eWrN8tedg Dd13qBMv2qFy8WdVLlqj/GHEfchTXoY459GeXdXaqTUKJW6VNCRmFf9KycbWxnbaXXAi RXug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6VayokB70LyrjXyEVWXgl8dkywJiJ31ush1u5QME9Tk=; b=BMeO8+l239fnRxst2rW6Romq0cZ7PE0egS9GMPVILW7A9q1S7f8FKF++55Y5EkW0bq DKhWJ+4yipNsZisp5Opsw5ZnElfylv3/0ZKawR16ZQzK7P146v65QJ3uPklxP1csTttE elhySlZxaNYB+24udjHAubAUlzaC2LcUvAYc6pF/75imBaUJALQ+VYO6bCF7GuQKscw+ gPLhcc9wbwAOuhtSZRLNT2bwwNS0Cy5lmwD+YPuAB6fS1eJJ9x7gPUzyjXivvZxewHSv PiFEKndcSQPAtMW9a40ogcq0d1AH5mA5EiC+go/5EoobvgyAtkWNUfFYUyd2cN/x8EWB VW7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=C0p48f4z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd19-20020a170907629300b007af041e40b4si18521037ejc.129.2022.12.08.01.05.20; Thu, 08 Dec 2022 01:05:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=C0p48f4z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbiLHIza (ORCPT + 74 others); Thu, 8 Dec 2022 03:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiLHIz1 (ORCPT ); Thu, 8 Dec 2022 03:55:27 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68494220FC for ; Thu, 8 Dec 2022 00:55:26 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id t18so753122pfq.13 for ; Thu, 08 Dec 2022 00:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6VayokB70LyrjXyEVWXgl8dkywJiJ31ush1u5QME9Tk=; b=C0p48f4zpfmKrFRC7iJWW38eFBvFreifFdLYzew/eWTOnEWLrf4Rec7rra16DB2OAv g6pUj+47xCV17nBOXuIjD7gYLZbqPXHjodmrpj8SzA0wctQqsrnMCMtUk3JCVUJnQJDL f2c8wvIDA1W0GLJMHx4g55gxi5D1SIXU4cwLWkUlqqNnmsam/sEOGOu0gnXgzucoo+b5 TPLidokkjGh6Sg7WH9BftcmV6TzjWzmNLzSj0769x+lj/9q5sJnfimWRxewpTGQFv6Hh +DXVSIm1aPR0H1QvYu/5Zw8cH/2JJZBW0975UEhnzrYYpfjvIlAodMbKcEc8e9hWM4uY SKJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6VayokB70LyrjXyEVWXgl8dkywJiJ31ush1u5QME9Tk=; b=0Uw2Iqnir2wjBLvXi5t5mONPb1rgwgvbFNa1ScZ8WzUThXl8fmhIhxzf361Ug3AtLk UZ7r3tAQ0jX7kIRjQ1vGmFCDeymfuwZEy1gBXpH4zpDEgU2Pu5XPmoFlABsUcw72Qplw gj50MAK8aD6/UNkZFk9oDV+xFUO4RF8Ea5hAI/lajOboEoCQ6z1Khen6bgWRctR6kCSB pelFgGmrXsuG8MepNDHD5FIphKcFaNTAIknF263+5CnI9TMALaEunjFe+iWqmVAtFZtg PJgvnXbPMwLCUqcAzfcoD8bOgzChXPtBo3T68YeiY1JR/776mEFIuDxUZLunxD4xDvax QxgA== X-Gm-Message-State: ANoB5plLTydzS3Ad9S/YYj4tPLSshyl+eBIzfoJSjEi8MLB4IvazxOkd sMLstF42yQdQE+PaAESE8Yp8LQ== X-Received: by 2002:a62:6d46:0:b0:563:54fd:3638 with SMTP id i67-20020a626d46000000b0056354fd3638mr97634913pfc.44.1670489725917; Thu, 08 Dec 2022 00:55:25 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.253]) by smtp.gmail.com with ESMTPSA id w10-20020a170902e88a00b00183c67844aesm16158990plg.22.2022.12.08.00.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 00:55:25 -0800 (PST) From: Qi Zheng To: dan.j.williams@intel.com, willy@infradead.org, jack@suse.cz, muchun.song@linux.dev Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, Qi Zheng Subject: [PATCH] dax: Kconfig: add depends on !FS_DAX_LIMITED for ARCH_HAS_PMEM_API Date: Thu, 8 Dec 2022 16:55:14 +0800 Message-Id: <20221208085514.8529-1-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 The implementation of dax_flush() is non-NULL if CONFIG_ARCH_HAS_PMEM_API is selected. Then if we select CONFIG_FS_DAX_LIMITED with CONFIG_ARCH_HAS_PMEM_API in the future, the dax_flush() in the dax_writeback_one() will cause a panic since it accepts the struct page by default: dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PAGE_SIZE); Instead of fixing this, it is better to declare in Kconfig that pmem does not support CONFIG_FS_DAX_LIMITED now. Signed-off-by: Qi Zheng --- BTW, it seems that CONFIG_FS_DAX_LIMITED currently only has DCSSBLK as a user, but this makes filesystems dax must support the case that the struct page is not required, which makes the code complicated. Is it possible to remove DCSSBLK or change it to also require struct page? lib/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig b/lib/Kconfig index a7cd6605cc6c..6989ad3fea99 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -672,6 +672,7 @@ config ARCH_NO_SG_CHAIN config ARCH_HAS_PMEM_API bool + depends on !FS_DAX_LIMITED config MEMREGION bool -- 2.20.1