Re: Linux 5.16-rc1

From: Linus Torvalds
Date: Wed Nov 17 2021 - 19:29:07 EST


On Wed, Nov 17, 2021 at 3:29 PM Anton Altaparmakov <anton@xxxxxxxxxx> wrote:
>
> What we need here is an array to store pointers to in-memory inodes that correspond to inodes in the inode table page being written out.

Do we actually need the array?

The ntfs_inode pointers in that array are always locked (using
'mrec_lock'), so ti could be just a linked list of entries.

Yeah, that would require adding a 'next' pointer to 'struct
_ntfs_inode', but maybe that would be the right thing to do?

I don't know the code, but it looks to me like it's literally just a
stack of locked ntfs_inode pointers - where the lock is taken before
adding it to the stack, and released after taking it off the stack. So
a singly-linked list would seem to be a very simple implementation.

Linus