Message ID | 20241220154831.1086649-12-axboe@kernel.dk (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50AFCE7718B for <linux-mm@archiver.kernel.org>; Fri, 20 Dec 2024 15:49:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 898096B009E; Fri, 20 Dec 2024 10:48:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 849826B009F; Fri, 20 Dec 2024 10:48:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64D236B00A0; Fri, 20 Dec 2024 10:48:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 41D2B6B009E for <linux-mm@kvack.org>; Fri, 20 Dec 2024 10:48:53 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F2B93C0AC9 for <linux-mm@kvack.org>; Fri, 20 Dec 2024 15:48:52 +0000 (UTC) X-FDA: 82915769454.23.5C65638 Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by imf03.hostedemail.com (Postfix) with ESMTP id 8B7D920008 for <linux-mm@kvack.org>; Fri, 20 Dec 2024 15:48:35 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=IbK7xUiv; spf=pass (imf03.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.54 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734709714; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ol/7y93UZDywrWGNYi5AP2kj1AIRWUpJ2p+2aggyqzo=; b=uVoBVcpOeuigX1FPMguOJciyBXm3/j7EesIs4oUVbTtmF8/DMeboafx9RB+mOQkuhbLiB8 ftONcKlulfQRTja2VYLAi05iTCOmzly70rA/BCXBUZb1BuX8F/ptZqqq5nJfH1am5kFOwY ip7W97WvOom71y4gBOcwrV4pUx94dh0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734709714; a=rsa-sha256; cv=none; b=xpPTF4fR6xy4OkFQgN7dmV7LBraklUx0ey2l1EAwWwWM4WxgMLmHKYYXUw0PrFdXm8JuQd MJwph3nmq15/15jKGZ8SRLhzzaB1j507TFRZ+EZW8ehku9WYq93lGKQi+dY7Dpf7LVGZ6b gyPoPlyLnKQl21KzgdwknNsNfd0iJ64= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=IbK7xUiv; spf=pass (imf03.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.54 as permitted sender) smtp.mailfrom=axboe@kernel.dk; dmarc=none Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-844ee15d6f4so158521439f.1 for <linux-mm@kvack.org>; Fri, 20 Dec 2024 07:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1734709730; x=1735314530; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ol/7y93UZDywrWGNYi5AP2kj1AIRWUpJ2p+2aggyqzo=; b=IbK7xUivchFkmTsx/h1hvsaU5DF7oLka4F1ocNpHLOy1CJLdqvsazsTgDK0OGkKiOr qVK73UTM0y8/TmWQz/6QPUUcr3fYDtMfvQpacWZPKW+NzXU2wqnSmughgvYUyCLc/i5f o9QeIrZI9810EpNOikoX3DNzG7lSsDEib53uhEpBoLf+9R8UcY6C7mDeinpBPClxv/Pl MM8cVbh3fdJXHCIz+xeBhxVtObUOUgqi0ZTcWyND7EQZ/FgkplWk3sgfhCHaJvtbEPuG TdQyKYXEa/+VdnEbAP9Vn7Kq8SJ1E/t4B/YSpQlLS3GcqyqLOwJKlW28LMz1YITwxD6u OCBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734709730; x=1735314530; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ol/7y93UZDywrWGNYi5AP2kj1AIRWUpJ2p+2aggyqzo=; b=i+ZrFJ9O11R8IOYxE3+sz8tn1IWsAvQ687WudwZUfk1IlC/VbqakTon2+Q0jPkYsUG I06+FA0C2B1RPaDcOK2izZpedjW8g4tUDeCAtsFmOYLC/eo7E+JJ59UYz30PFDib11ku OdhvlojI/Hqzmy1YqxrqoMEMdWMzn9cExAac9ug3W4R7RI87pA3kZzs7lQtEmc1DvnoW nbvXBR+QFl7MDinbcA4CS79VErqxZ9kIkel+Me0b3BZ2/1rVuWQbBTAnyFIJr+kyrugo CB2vlXg4UFeKVmZuJYI8F3HrdGCQEJ8gNU9oVNbW0VyawFwwRcUyv2Jcqzo5Klklr+rZ xezw== X-Gm-Message-State: AOJu0YwzdA3kyXR7kpBjeT7yiR/CT/tS6tJWNVqj9bnFMZCw/DFBRnl0 Ds3I7qaqUOw7nSDqs29tryI8Sa6GisQS8l7RvGiLelh93kubQ1unZ6TWxbMztSEkovZvIUR0Kg9 A X-Gm-Gg: ASbGncsf642PK90a+oDUJxwXWAtVbom4aml9bgQUngaOR53LXDHPk4QLUjaRLtGUdIX YDRfK0IWWD0oO5rqsVVO9ZkmWfxtDa7JK/iFs2FQkG61GB7pSEC0SSimeaR/+tjG3AmpcPalMWk v7iRETOwjcwgLrbuk/5HQ9OSKiVkTY5bS1qLDahn+ptJJxh0zGFd/RseyjJZp/tJJBYmMppZaKU 1T44GcDqHmbJDFDV0iuzYFxNER2OGcQYM0/tEV2EM5jIvY7sxnMTiinTR5R X-Google-Smtp-Source: AGHT+IHBkJtXw0hIyGWIXWPfQ49T4FfZrn/htFVCpySmbejAxdhZ6x6C0BhRXfs8Jh6Ol55mQ+pxBw== X-Received: by 2002:a05:6e02:17cf:b0:3a7:70a4:6872 with SMTP id e9e14a558f8ab-3c2d257934dmr36428035ab.9.1734709729627; Fri, 20 Dec 2024 07:48:49 -0800 (PST) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e68bf66ed9sm837821173.45.2024.12.20.07.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 07:48:48 -0800 (PST) From: Jens Axboe <axboe@kernel.dk> To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: hannes@cmpxchg.org, clm@meta.com, linux-kernel@vger.kernel.org, willy@infradead.org, kirill@shutemov.name, bfoster@redhat.com, Jens Axboe <axboe@kernel.dk> Subject: [PATCH 11/12] mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue Date: Fri, 20 Dec 2024 08:47:49 -0700 Message-ID: <20241220154831.1086649-12-axboe@kernel.dk> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241220154831.1086649-1-axboe@kernel.dk> References: <20241220154831.1086649-1-axboe@kernel.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 8B7D920008 X-Stat-Signature: fyrmrosgxp4c5jzdu43dz15xw6nydk79 X-Rspam-User: X-HE-Tag: 1734709715-444908 X-HE-Meta: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hfnBy8FTQWUDlum2v9iRHRwT/osGtjZJDWJtNoT/vI1vI0JD85OFyoTtMtn9f0iGNYVp9gA8zHivQrGz3oj7+mEcSxesuVeCreSoRVpkC9g4Trr53hzWgb+wAqDnIG8XjHomDwDM4ndltTtaroAGthe2GYGUjQdNYtYEAhPQVpoCdgOVA+R8A3UVipfUYr8BROhzzov4I7925TbMo0QSTj7s+ysXtrI4Ls5cHqKKxMLTWVg7BQypBiU/lN X-Bogosity: Ham, tests=bogofilter, spamicity=0.009639, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Uncached buffered IO
|
expand
|
diff --git a/include/linux/fs.h b/include/linux/fs.h index 653b5efa3d3f..58a618853574 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2912,6 +2912,11 @@ static inline ssize_t generic_write_sync(struct kiocb *iocb, ssize_t count) (iocb->ki_flags & IOCB_SYNC) ? 0 : 1); if (ret) return ret; + } else if (iocb->ki_flags & IOCB_DONTCACHE) { + struct address_space *mapping = iocb->ki_filp->f_mapping; + + filemap_fdatawrite_range_kick(mapping, iocb->ki_pos, + iocb->ki_pos + count); } return count;
When a buffered write submitted with IOCB_DONTCACHE has been successfully submitted, call filemap_fdatawrite_range_kick() to kick off the IO. File systems call generic_write_sync() for any successful buffered write submission, hence add the logic here rather than needing to modify the file system. Signed-off-by: Jens Axboe <axboe@kernel.dk> --- include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+)