Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Miklos Szeredi
On Mon, Mar 15, 2021 at 2:41 PM David Howells wrote: > > Miklos Szeredi wrote: > > > > (2) We can use the file position to represent the mnt_id and can jump to > > > it directly - ie. using seek() to jump to a mount object by its ID. > > > > What happens if the mount at the current position

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread David Howells
Miklos Szeredi wrote: > > (2) We can use the file position to represent the mnt_id and can jump to > > it directly - ie. using seek() to jump to a mount object by its ID. > > What happens if the mount at the current position is removed? umount_tree() requires the namespace_sem to be write

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Matthew Wilcox
On Mon, Mar 15, 2021 at 02:14:35PM +0100, Miklos Szeredi wrote: > On Mon, Mar 15, 2021 at 1:07 PM David Howells wrote: > > > > > > Hi Al, Miklós, > > > > Can we consider replacing the "insert cursor" approach we're currently > > using for proc files to scan the current namespace's mount list[1] wi

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Miklos Szeredi
On Mon, Mar 15, 2021 at 1:07 PM David Howells wrote: > > > Hi Al, Miklós, > > Can we consider replacing the "insert cursor" approach we're currently > using for proc files to scan the current namespace's mount list[1] with > something that uses an xarray of mounts indexed by mnt_id? > > This has s

Re: [RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread Matthew Wilcox
On Mon, Mar 15, 2021 at 12:07:39PM +, David Howells wrote: > > Hi Al, Miklós, > > Can we consider replacing the "insert cursor" approach we're currently > using for proc files to scan the current namespace's mount list[1] with > something that uses an xarray of mounts indexed by mnt_id? > >

[RFC][PATCH 0/3] vfs: Use an xarray instead of inserted bookmarks to scan mount list

2021-03-15 Thread David Howells
Hi Al, Miklós, Can we consider replacing the "insert cursor" approach we're currently using for proc files to scan the current namespace's mount list[1] with something that uses an xarray of mounts indexed by mnt_id? This has some advantages: (1) It's simpler. We don't need to insert dummy m