Re: [PATCH v2 3/3] ntfs: do not convert a named $DATA stream when making room in a record
From: Namjae Jeon
Date: Fri Nov 06 2026 - 09:15:27 EST
On Fri, Nov 6, 2026 at 10:31 PM Wahid Khan <wahidzk0091@xxxxxxxxx> wrote:
>
> Hi Namjae,
Hi Wahid,
>
> The Sashiko review of 3/3 also suggests skipping every AT_DATA
> attribute in this loop, not only the named ones. I'd keep the unnamed
> case as it is, for three reasons:
>
> - Converting the unnamed $DATA from this loop is what the loop already
> did before the patch. The patch only stops it from pairing the length
> of a named stream with the unnamed inode.
>
> - The lock order the review points at (mrec_lock held while
> ntfs_attr_make_non_resident() locks folio 0) is the same one used by
> the direct conversion near the top of ntfs_resident_attr_resize(),
> before the loop. So it is not specific to the loop.
>
> - When an EA or a stream grows in a full record, converting the unnamed
> $DATA is what frees the space. Skipping all of $DATA would turn those
> writes into failures.
>
> If you'd rather drop the unnamed case from the loop too, I can send
> that as a separate patch so the two changes can be judged on their own.
I think making the lock ordering consistent and using ntfs_attr_iget()
for named $DATA would be the right approach. Please check it if you
have the time.
Thanks for the patches!