Re: [PATCH v2 2/6] ntfs: do not turn an unmappable runlist fragment into delalloc on write

From: Hyunchul Lee

Date: Sun Sep 27 2026 - 21:46:49 EST


On Mon, Sep 28, 2026 at 09:21:16AM +0900, Hyunchul Lee wrote:
> Hi Matthias,
>
> > + /*
> > + * As in ntfs_attr_vcn_to_rl(): a runlist fragment that could not be
> > + * mapped is not a hole. Treating it as one would put a delalloc
> > + * extent over clusters that are allocated on disk but unknown to us.
> > + */
> > + if (lcn == LCN_RL_NOT_MAPPED) {
>
> We should handle LCN_ENOENT also.

Please ignore the my previous comment about handling LCN_ENOENT. I had
misunderstood the code.

>
> > + up_write(&ni->runlist.lock);
> > + mutex_unlock(&ni->mrec_lock);
> > + return map_err == -ENOMEM ? -ENOMEM : -EIO;
> > + }
> > +
> > max_clu_count = min(max_clu_count, rl->length - (vcn - rl->vcn));
> > if (max_clu_count == 0) {
> > ntfs_error(inode->i_sb,
> > --
> > 2.55.0
> >
>
> --
> Thanks,
> Hyunchul

--
Thanks,
Hyunchul