Message ID | 20241213155557.105419-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 26F46E77180 for <linux-mm@archiver.kernel.org>; Fri, 13 Dec 2024 15:56:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 947886B009D; Fri, 13 Dec 2024 10:56:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F5E96B009E; Fri, 13 Dec 2024 10:56:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74FFD6B009F; Fri, 13 Dec 2024 10:56:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 539156B009D for <linux-mm@kvack.org>; Fri, 13 Dec 2024 10:56:22 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 15BFAA04D6 for <linux-mm@kvack.org>; Fri, 13 Dec 2024 15:56:22 +0000 (UTC) X-FDA: 82890385956.20.A70E506 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by imf22.hostedemail.com (Postfix) with ESMTP id DDA63C000A for <linux-mm@kvack.org>; Fri, 13 Dec 2024 15:55:52 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=YSXQNuDo; dmarc=none; spf=pass (imf22.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.51 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734105367; a=rsa-sha256; cv=none; b=wW9GtsadMoFR9yTjdwp0gvYMX5qp6hqi2chDd02cHnJCP7zoBZXUUEZveSzwf+i1xmkbT7 CzAaf4rDAMTuYvsop1kbwxsq14fHHFBHThuJ/yXU8AdFi7FuP7ph85bZ9MGEjKAZbQGDcz efDFFIlEJhWmzSbZKkAgCnHJM9trt6M= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=YSXQNuDo; dmarc=none; spf=pass (imf22.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.51 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734105367; 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=kJwGVPn+96aSQWxE6BU2tishKGRyQtlCS0vMJXC51wPeH0PCWQ8dw5uZjP+lP82IEkPY+/ q8A1ftEYNiUXG1SfwSolQgzq9MmXZnV8vwu4/Hdk2UZJbGiHIbzJ6vzbyT12uUgr7TH7fW 3dBKDdB+rkjTole+mDIBxIDGKJKH8B0= Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-844ee43460aso34513639f.1 for <linux-mm@kvack.org>; Fri, 13 Dec 2024 07:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1734105378; x=1734710178; 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=YSXQNuDoBcvucr28t/C7xBGIg6teIT8mwgtc/UB7OpLu5o/AghTKsffTGZSlmsMV4L lzKrWQ0mus9PUFwCjZw9/VL7FWi+9+uEKwdQ752nBo9oDg0wn+9j/5lRm2hKzc/Xc/u3 xTZ1d01HPlKo2pcGfa5h/LoVH0d4nQ42UY5xwc5lMwS8oVSX6wH61cHBpJFr/x843ZVr 02voPR9Zln9LdsZ6X/PRbkKQYfSCJwFxswIEJTv6a10GLuAHhBwVJY4kZW2o05dOyQBc 7BJvpQ97veO263odt+SMQZS616/SUg905PhqZHYwmmFjBiH+fZOGXRCXrKnRdxRMGdQS 6fBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734105378; x=1734710178; 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=sl0PBpQcQ2KlfTHqOHuamt6B+4uyyXlCov1V5fMZZ0/DSyZ6C8K7z/KIjEfJPz1kqi 99zOxZ7t/mQoGA+v21J8oPxqT0V1OFaM9GQlVZ/zz0IYrOmEKjD2CyAR8zhFBXno9Zk/ YVqKJ0JwK5S2Qvi9Tv74cwZ72cpA243lQcslUE6yFMDZtX+4jY2YHLCexFebTRzStR5c hOMnkJpVqGZaUZ4kek7Z0p9v6XQswKa/88xHlcaaZBDcllTcwoS0aTponTHD8SBmokAb npENowUPLgMVqv3o4UkDe3MbTGmhNco7qFujSV1A/QrMrHqqSeD2C6PGPWW4zsOpklIn JUtw== X-Gm-Message-State: AOJu0YxHQ1Ep7sKAst/3iLqKeLJMXI+HiFfsHW6H7p6lpVqMcea0bY0z RZH4CfogAdeRMjcDd+Y34i/nJ01Z2qfcwU4ikNsqrRTWhwRUWTp9sV6WKRH1PH0wekxy32jEmho V X-Gm-Gg: ASbGnctvV10J49cU8bTQhbeubg2b1U8Z0fgNMXVDT++swFGEkRA1tTgEkTjCrZaggZL RHVyKcyOgclCCdtc5yT/5nXpdqqOxNjbHIkWOqBIq+2OaQwqB+fF+InIEOyOIvVg1WSC4WXE/ey SW1PyX7zlFZsYb+GQLhyllP9fgZ+wKhZIaAz6BedSUz0kvTY98X21NgL2ZvekcWrQj0eCoE9dTE 6a2RTq7Ag4gtC9ZPBwWucnH/ITj6vi/yHZhjy5a+XNyohk0Hmnwd0jMEFv8 X-Google-Smtp-Source: AGHT+IFA+GuHLn3+MK1ZeRZZP3C9VMVBGmb7rBcbA1fV4I0OGtHKvL+W7OoGXWUKvvS+Tr+1pcK1JQ== X-Received: by 2002:a05:6e02:2169:b0:3a7:7d26:4ce4 with SMTP id e9e14a558f8ab-3afee2d0367mr35186015ab.9.1734105378594; Fri, 13 Dec 2024 07:56:18 -0800 (PST) Received: from localhost.localdomain ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a9ca03ae11sm35258405ab.41.2024.12.13.07.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 07:56:17 -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/11] mm: call filemap_fdatawrite_range_kick() after IOCB_DONTCACHE issue Date: Fri, 13 Dec 2024 08:55:25 -0700 Message-ID: <20241213155557.105419-12-axboe@kernel.dk> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241213155557.105419-1-axboe@kernel.dk> References: <20241213155557.105419-1-axboe@kernel.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DDA63C000A X-Stat-Signature: 1qwbsmzht8zg1uz36z6o9yfxogjt8upz X-HE-Tag: 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sE8RlipojzEohtSM9IxCy5K3468lkO33twgQMIHEfxCn8JqCh8sdwO3kNn2n1LPlkQPrSV8Z3hHgdw+GI/x4rYWzog9oxjGujrWeEBeXqBGMwhD71h7UwPZsRoHVuW8gNHQQe44+D+HPalCqeOLQi3OzIWKvGDXbwHguPTNlqFjL3CHtzAzCIF+3blNiu/1HgjzmVN5pwgCcb4VrzBuaJ2JcsPInZ/dmpQ20HK4buaaNFRiozjacYz616p+niDceaOE8CCFPxt6XYjEA7dSdWRXgHdhleE18g X-Bogosity: Ham, tests=bogofilter, spamicity=0.001286, 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(+)