Linux NILFS development
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <slava@dubeyko.com>
To: konishi.ryusuke@gmail.com, hch@lst.de
Cc: linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Viacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH 0/2] nilfs2: convert O_DIRECT reads to iomap
Date: Fri, 24 Jul 2026 15:27:43 -0700	[thread overview]
Message-ID: <20260724222745.2107464-1-slava@dubeyko.com> (raw)

This series removes NILFS2 using of blockdev_direct_IO() by
converting the O_DIRECT read path to iomap. NILFS2 is
a log-structured, copy-on-write filesystem, which makes it
a poor fit for a full iomap conversion. Newly allocated blocks
are delay-allocated by nilfs_get_block() and only receive a real
disk address when the segment constructor writes them out
as part of a log. The segment constructor walks buffer_head lists
directly and is not integrated with the generic address_space
writeback path. First patch adds a new, read-only nilfs_iomap_ops
wrapping the existing nilfs_bmap_lookup_contig() lookup.
The second patch wires that ops table into O_DIRECT reads via
iomap_dio_rw(), sets FMODE_CAN_ODIRECT explicitly on open, and
removes nilfs_direct_IO() and the .direct_IO callback entirely.
O_DIRECT writes are explicitly downgraded to the ordinary buffered
write path in nilfs_file_write_iter().

Viacheslav Dubeyko (2):
  nilfs2: add iomap operations for direct I/O reads
  nilfs2: switch O_DIRECT reads to iomap

 fs/nilfs2/Kconfig  |  2 +-
 fs/nilfs2/Makefile |  2 +-
 fs/nilfs2/file.c   | 40 ++++++++++++++++++++++++--
 fs/nilfs2/inode.c  | 13 ---------
 fs/nilfs2/iomap.c  | 71 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/nilfs2/iomap.h  | 13 +++++++++
 6 files changed, 123 insertions(+), 18 deletions(-)
 create mode 100644 fs/nilfs2/iomap.c
 create mode 100644 fs/nilfs2/iomap.h

-- 
2.43.0


             reply	other threads:[~2026-07-24 22:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 22:27 Viacheslav Dubeyko [this message]
2026-07-24 22:27 ` [PATCH 1/2] nilfs2: add iomap operations for direct I/O reads Viacheslav Dubeyko
2026-07-25 22:33   ` Ryusuke Konishi
2026-07-28  0:46     ` Viacheslav Dubeyko
2026-07-28  3:49       ` Ryusuke Konishi
2026-07-24 22:27 ` [PATCH 2/2] nilfs2: switch O_DIRECT reads to iomap Viacheslav Dubeyko
2026-07-25 23:00   ` Ryusuke Konishi
2026-07-27  9:43 ` [PATCH 0/2] nilfs2: convert " Christian Brauner
2026-07-28  3:54 ` Christoph Hellwig
2026-07-28 23:19   ` Viacheslav Dubeyko
2026-07-29  6:28     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260724222745.2107464-1-slava@dubeyko.com \
    --to=slava@dubeyko.com \
    --cc=hch@lst.de \
    --cc=konishi.ryusuke@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox