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 - 20:21:26 EST


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.

> + 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