From patchwork Fri Feb 16 20:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 202348 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp767187dyb; Fri, 16 Feb 2024 12:24:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQbOWOueTnxJ9v4Ije/FC+/Lm5n/iPWy5gTWSh0bV7Q6MLXtVUEywW/l7ljoQ6m/OsfadC9i8i7fSWxZd3++OYOmlLdg== X-Google-Smtp-Source: AGHT+IHBqd19ObTRFipadBsiMR/DF7R53BpVSaP32ALHSwM0aptT2/8tHGSzVpyXZj+/LB8CYKZx X-Received: by 2002:a05:6358:706:b0:17a:eca6:36e8 with SMTP id e6-20020a056358070600b0017aeca636e8mr5772447rwj.17.1708115065202; Fri, 16 Feb 2024 12:24:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708115065; cv=pass; d=google.com; s=arc-20160816; b=LIa1w5Cz9wA4e3cZtTOgQG3nmmW6mKWCegnI9DmtDs4aVRdZlKKdRI7IE9/b3fQfhq XKqMd8qq0K46DYYYUddtb3XNNy6TKwydSC1UE/3k/4akbZpqx/ypTRCOeFLD+S8u46Lg fS80RhlyJTuIQAQ4B8nKWazOQOXCFWdyJAelu5OKhRcnRhm9p62nqherN3vHXQkfAkE0 ky/T5ZROCiMY0DGQw8PDqMVvozCrOldaJBflZ8nIUGTqzYlp7RN4VI/PCD4mJqI0aL+2 UK2/6RaQCWVzj8cjqkGod4Pb5wT+bYLZqcHjhqJmKPh/zXExJGr6KcFWy5nhktkC5a+6 0DqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=0DaI2pIyGSJ1SELcJ87ssU3dTkRH7XwjAGMkh6ZvNzU=; fh=eaK2q8ufH/7M9RakXw0KZvQq0ZtqQ7Qa0NOs66nevIQ=; b=n2kFbufGM7juYj0ZFRtx9fsXw9X7NFAzaLLC5lEss/95xkjmoVjdIGTyuAKyuZQUbK uz3eeFTUXBN+Xl/tlWv0/pG+iziq6MfwaZGbbOOTfUHUHIhJ1xWrZQm+C/pjJFUf+3x0 Rt/cWvafQyTdn/T9RdUD83prR/1wRr7Z/+rFq3nSpRXtj+IHEeG+vQ3Bg5cd+fvSq2LN Ko8G6k6eTvQOW5OWtijM4sZP4Hrpz5dbdEucRyVRGIP9lY5z4Gr4YKOq24s1upcPqKVH 1yKW8SLIvcz8nYXR3SXQXRnZHAhJR4AG1tuoMBS54GOK5bSzAu7Yoha5vQnYDodWulcB L6aw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JPDdKcSU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69290-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69290-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u16-20020a056a00099000b006e119887572si414324pfg.383.2024.02.16.12.24.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 12:24:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69290-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JPDdKcSU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69290-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69290-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A2E56B20EF9 for ; Fri, 16 Feb 2024 20:23:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE1FC1420B8; Fri, 16 Feb 2024 20:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JPDdKcSU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43ACF139567; Fri, 16 Feb 2024 20:23:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708114986; cv=none; b=R7io9+kEB8xovDRzbgFsEo9zat2LDSeKSFA1+8KefKMbwzxsXr1NFzw8vuzgeZVdhDp3TXQEucon/Oram7JXrTk4UcthzhBAKyrgd+OYMAJDJAUeQHi7C3i7XTf7ZJKUTlyZEsBuLdgCSxqswNvkrmIHcOhHlGbw7lf8qSjz6fw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708114986; c=relaxed/simple; bh=FZKDvxwOLKdXeXYFLErtJaz9RUHYu0Q/oOHwXC/6poQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WCgLuNVpUkf5v7Tn/K0dcy1R7B3+6ZBGQTSf3dzRf2zRGgOOcuzSkljcKIJxbCzqG+8sR2kyh0f/eQyXni5Zvxm+vqkEA4G0grikH7TPrnIcUwJ3hm08orjb/zw+ACczGMfsaewcfywmO6J7qlzblVnNv8sD9sYkWyqTPxCV6FI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JPDdKcSU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 881A8C433C7; Fri, 16 Feb 2024 20:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708114985; bh=FZKDvxwOLKdXeXYFLErtJaz9RUHYu0Q/oOHwXC/6poQ=; h=From:To:Cc:Subject:Date:From; b=JPDdKcSU1v7J4n2vhyqtW0wo+yuczCaaDoXyAiVLDiVfD4fjvF8z33nTw5/YUrgxF 4hfexzkX3VXEJRBNJH/XXBwUIdfTjbRSUmXTyxkbID0oYvjKDkhxsQOOiGNK1wnJhE OUzxHdS6lE9CA/1zP8cRM0RP35hSBLZGivQSNIYLqZ/IGAVJ0yF9XN8pPyfpkORUjX m/OorVNf1LFJeMU8fNHEQmLwfSPOi9GO+igiUmg574vQlkr9KX+G8GpQUJQRdtPyxS utLzqNDPLEK0p6RlWee0BCXZ5iwwPkQ5pJq4Oyb5OQyMHcAB8fnSGkGKPM6iF5D5Or ElmtWeeTJO8mg== From: Arnd Bergmann To: Dan Williams , Mathieu Desnoyers , Andrew Morton Cc: Arnd Bergmann , kernel test robot , Matthew Wilcox , Jan Kara , Jane Chu , linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] dax: add set_dax_nomc() and set_dax_nocache() stub helpers Date: Fri, 16 Feb 2024 21:22:51 +0100 Message-Id: <20240216202300.2492566-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791088462629557686 X-GMAIL-MSGID: 1791088462629557686 From: Arnd Bergmann In some randconfig builds, the IS_ERR() check appears to not get completely eliminated, resulting in the compiler to insert references to these two functions that cause a link failure: ERROR: modpost: "set_dax_nocache" [drivers/md/dm-mod.ko] undefined! ERROR: modpost: "set_dax_nomc" [drivers/md/dm-mod.ko] undefined! Add more stub functions for the dax-disabled case here to make it build again. Fixes: d888f6b0a766 ("dm: treat alloc_dax() -EOPNOTSUPP failure as non-fatal") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402160420.e4QKwoGO-lkp@intel.com/ Signed-off-by: Arnd Bergmann --- include/linux/dax.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/dax.h b/include/linux/dax.h index df2d52b8a245..4527c10016fb 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -64,6 +64,9 @@ void dax_write_cache(struct dax_device *dax_dev, bool wc); bool dax_write_cache_enabled(struct dax_device *dax_dev); bool dax_synchronous(struct dax_device *dax_dev); void set_dax_synchronous(struct dax_device *dax_dev); +void set_dax_nocache(struct dax_device *dax_dev); +void set_dax_nomc(struct dax_device *dax_dev); + size_t dax_recovery_write(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, size_t bytes, struct iov_iter *i); /* @@ -108,6 +111,12 @@ static inline bool dax_synchronous(struct dax_device *dax_dev) static inline void set_dax_synchronous(struct dax_device *dax_dev) { } +static inline void set_dax_nocache(struct dax_device *dax_dev) +{ +} +static inline void set_dax_nomc(struct dax_device *dax_dev) +{ +} static inline bool daxdev_mapping_supported(struct vm_area_struct *vma, struct dax_device *dax_dev) { @@ -120,9 +129,6 @@ static inline size_t dax_recovery_write(struct dax_device *dax_dev, } #endif -void set_dax_nocache(struct dax_device *dax_dev); -void set_dax_nomc(struct dax_device *dax_dev); - struct writeback_control; #if defined(CONFIG_BLOCK) && defined(CONFIG_FS_DAX) int dax_add_host(struct dax_device *dax_dev, struct gendisk *disk);