[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <35866783-2312-4e31-904d-3746510eaf56@kernel.dk>
Date: Thu, 19 Feb 2026 08:24:38 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Tal Zussman <tz2294@...umbia.edu>,
"Tigran A. Aivazian" <aivazian.tigran@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Namjae Jeon <linkinjeon@...nel.org>, Sungjong Seo <sj1557.seo@...sung.com>,
Yuezhang Mo <yuezhang.mo@...y.com>, Dave Kleikamp <shaggy@...nel.org>,
Ryusuke Konishi <konishi.ryusuke@...il.com>,
Viacheslav Dubeyko <slava@...eyko.com>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
Bob Copeland <me@...copeland.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
jfs-discussion@...ts.sourceforge.net, linux-nilfs@...r.kernel.org,
ntfs3@...ts.linux.dev, linux-karma-devel@...ts.sourceforge.net
Subject: Re: [PATCH RFC] block: enable RWF_DONTCACHE for block devices
On 2/18/26 2:13 PM, Tal Zussman wrote:
> Block device buffered reads and writes already pass through
> filemap_read() and iomap_file_buffered_write() respectively, both of
> which handle IOCB_DONTCACHE. Enable RWF_DONTCACHE for block device files
> by setting FOP_DONTCACHE in def_blk_fops.
>
> For CONFIG_BUFFER_HEAD paths, thread the kiocb through
> block_write_begin() so that buffer_head-based I/O can use DONTCACHE
> behavior as well. Callers without a kiocb context (e.g. nilfs2 recovery)
> pass NULL, which preserves the existing behavior.
>
> This support is useful for databases that operate on raw block devices,
> among other userspace applications.
OOO right now so I'll take a real look when I'm back, but when I
originally did this work, it's not the issue side that's the issue. It's
the pruning done from completion context, and you need to ensure that's
sane context for that (non-irq).
--
Jens Axboe
Powered by blists - more mailing lists