From: Christoph Hellwig <hch@lst.de>
To: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
linux-fsdevel@vger.kernel.org, brauner@kernel.org,
djwong@kernel.org, hch@lst.de, linux-kernel@vger.kernel.org,
Viacheslav Dubeyko <slava@dubeyko.com>
Subject: Re: [RFC PATCH v2 3/8] fat: add iomap direct I/O support
Date: Fri, 20 Nov 2026 19:29:47 +0100 [thread overview]
Message-ID: <20261120182947.GA2339@lst.de> (raw)
In-Reply-To: <20261118020150.1023865-4-matheus.aalmeida@inf.ufrgs.br>
On Tue, Nov 17, 2026 at 11:01:43PM -0300, Matheus Alves de Almeida wrote:
> +{
> + struct inode *inode = file_inode(iocb->ki_filp);
> + ssize_t ret;
> +
> + if ((iocb->ki_flags & IOCB_DIRECT) == 0)
> + return generic_file_read_iter(iocb, iter);
Does fat never cause a fallback to buffered I/O?
> + /* Wait under the inode lock for size updates and partial-block zeroing. */
Overly long line.
> + if (iocb->ki_pos + iov_iter_count(iter) > i_size_read(inode) ||
> + !IS_ALIGNED(iocb->ki_pos | iov_iter_alignment(iter),
> + i_blocksize(inode)))
> + dio_flags |= IOMAP_DIO_FORCE_WAIT;
Explain why the wait is fored please.
> +static int fat_dio_write_end_io(struct kiocb *iocb, ssize_t size, int error,
> + unsigned int flags)
> +{
> + struct inode *inode = file_inode(iocb->ki_filp);
> +
> + if (error)
> + return error;
> +
> + if (size && i_size_read(inode) < iocb->ki_pos + size) {
> + i_size_write(inode, iocb->ki_pos + size);
> + mark_inode_dirty(inode);
> + }
> +
> + return 0;
And just as a I comment on the hfsplus thread, this really should be
the default in iomap if no need_io is provided. Please coordinate
with Slava so that we get this into iomap first and then rebase both
series on top.
next prev parent reply other threads:[~2026-11-20 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 2:01 [RFC PATCH v2 0/8] fat: convert to iomap Matheus Alves de Almeida
2026-11-18 2:01 ` [RFC PATCH v2 1/8] fat: support FIEMAP Matheus Alves de Almeida
2026-11-20 7:13 ` OGAWA Hirofumi
2026-11-18 2:01 ` [RFC PATCH v2 2/8] fat: use iomap for ->bmap() Matheus Alves de Almeida
2026-11-18 2:01 ` [RFC PATCH v2 3/8] fat: add iomap direct I/O support Matheus Alves de Almeida
2026-11-20 18:29 ` Christoph Hellwig [this message]
2026-11-18 2:01 ` [RFC PATCH v2 4/8] fat: clean stale bdev buffers of newly allocated clusters Matheus Alves de Almeida
2026-11-18 2:01 ` [RFC PATCH v2 5/8] fat: drop ->write_begin() and ->write_end() usage from fat_cont_expand() Matheus Alves de Almeida
2026-11-20 18:31 ` Christoph Hellwig
2026-11-18 2:01 ` [RFC PATCH v2 6/8] fat: add iomap buffered I/O support Matheus Alves de Almeida
2026-11-18 2:01 ` [RFC PATCH v2 7/8] fat: remove ->mmu_private Matheus Alves de Almeida
2026-11-18 2:01 ` [RFC PATCH v2 8/8] fat: add multi-cluster allocation for write Matheus Alves de Almeida
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=20261120182947.GA2339@lst.de \
--to=hch@lst.de \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matheus.aalmeida@inf.ufrgs.br \
--cc=slava@dubeyko.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.