Re: [PATCH v3 4/5] minix: add file operation functions

From: Christoph Hellwig

Date: Mon Jul 13 2026 - 05:53:18 EST


On Sat, Jul 11, 2026 at 01:59:08PM -0700, Jeremy Bingham wrote:
> This adds the minix iomap file operation functions, including direct I/O
> functions, and updates the minix_file_operations struct to use them.
> Previously, most of the function pointers in minix_file_operations were
> the defaults. With the iomap changes, though, the defaults are no longer
> sufficient and minix-specific functions are required.
>
> The previously static minix_setattr function is also now exported; it will
> be used by minix_symlink_inode_operations.

How does this work without the next patch?

> + struct inode *inode = iocb->ki_filp->f_mapping->host;
> + ssize_t ret;
> +
> + inode_lock_shared(inode);
> +
> + const struct iomap_ops *ops = minix_iomap_ops_ver(inode);

Please keep all variable declarations at the top of the file.

> +
> + ret = iomap_dio_rw(iocb, to, ops, NULL, 0, NULL, 0);
> + inode_unlock_shared(inode);
> + return ret;
> +}

But more importantly please explain the use case for adding direct I/O
support to minix, as adding new barely tested code to a legacy file
needs a very good justification. And it really needs to be split into
a separate patch.