Re: [RFC PATCH v5 3/4] ocfs2: switch dio write path from buffer_head to iomap

From: Christoph Hellwig

Date: Fri Nov 06 2026 - 05:58:06 EST


On Thu, Nov 05, 2026 at 03:19:27PM +0800, Heming Zhao wrote:
> Converts OCFS2's DIO write path from the legacy buffer_head
> infrastructure to the modern iomap framework.
>
> Key modifications and designs are as follows:

That's a not very useful style of usually AI generated text.

If a change is not key it should not be mentioned here.

As should "modifications" in general - what is changed is pretty
obvious in the diff itself (and if it isn't it should be made more
clear in the code/comments). So what should go into the commit
log really is the high-level considerations, pitfals and not quite
clear bits. The rest is just unhelpful noise.


> +static int ocfs2_lock_map_blocks(struct inode *inode,
> + struct ocfs2_map_block *map, int flags)
> +{
> + int ret = 0;
> + struct ocfs2_inode_info *oi = OCFS2_I(inode);
> +
> + down_read(&oi->ip_alloc_sem);
> + ret = ocfs2_map_blocks(inode, map, flags);
> + up_read(&oi->ip_alloc_sem);
> +
> + return ret;
> +}

This pattern already showed up in the previous patch, why isn't the
helper added there and used for reads as well?

Also this and the next one have a very similar diffstat. It would
help reviewers a lot if you merged the two patches and did any pure
code movements in a separate patch, so that the actual changes stick
out instead of just adding a wall of new code here, and removing
lots of old code in the next one.