Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-05 Thread Ian Kent
On Wed, 2020-08-05 at 09:43 +0200, Miklos Szeredi wrote: > On Wed, Aug 5, 2020 at 3:54 AM Ian Kent wrote: > > > > It's way more useful to have these in the notification than > > > > obtainable > > > > via fsinfo() IMHO. > > > > > > What is it useful for? > > > > Only to verify that you have

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-05 Thread Miklos Szeredi
On Wed, Aug 5, 2020 at 1:36 PM Ian Kent wrote: > > I can see in the kernel code that an error is returned if the message > buffer is full when trying to add a message, I just can't see where > to get it in the libmount code. > > That's not really a communication protocol problem. > > Still I

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-05 Thread Miklos Szeredi
On Wed, Aug 5, 2020 at 3:54 AM Ian Kent wrote: > > > > It's way more useful to have these in the notification than > > > obtainable > > > via fsinfo() IMHO. > > > > What is it useful for? > > Only to verify that you have seen all the notifications. > > If you have to grab that info with a

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-04 Thread Ian Kent
On Tue, 2020-08-04 at 15:19 +0200, Miklos Szeredi wrote: > On Tue, Aug 4, 2020 at 1:39 PM Ian Kent wrote: > > On Mon, 2020-08-03 at 11:29 +0200, Miklos Szeredi wrote: > > > On Thu, Jul 23, 2020 at 12:48 PM David Howells < > > > dhowe...@redhat.com> > > > wrote: > > > > > > > > >

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-04 Thread Miklos Szeredi
On Tue, Aug 4, 2020 at 1:39 PM Ian Kent wrote: > > On Mon, 2020-08-03 at 11:29 +0200, Miklos Szeredi wrote: > > On Thu, Jul 23, 2020 at 12:48 PM David Howells > > wrote: > > > > > > > __u32 topology_changes; > > > > > __u32 attr_changes; > > > > >

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-04 Thread Ian Kent
On Mon, 2020-08-03 at 11:29 +0200, Miklos Szeredi wrote: > On Thu, Jul 23, 2020 at 12:48 PM David Howells > wrote: > > > > > __u32 topology_changes; > > > > __u32 attr_changes; > > > > __u32 aux_topology_changes; > > > > > > Being 32bit this

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread Ian Kent
On Mon, 2020-08-03 at 13:31 +0100, David Howells wrote: > Ian Kent wrote: > > > > I'm changing it so that the fields are 64-bit, but initialised > > > with the > > > existing mount ID in the notifications set. The fsinfo set > > > changes that > > > to a unique ID. I'm tempted to make the

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread David Howells
Ian Kent wrote: > > I'm changing it so that the fields are 64-bit, but initialised with the > > existing mount ID in the notifications set. The fsinfo set changes that > > to a unique ID. I'm tempted to make the unique IDs start at UINT_MAX+1 to > > disambiguate them. > > Mmm ... so what

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread Ian Kent
On Mon, 2020-08-03 at 12:49 +0100, David Howells wrote: > Miklos Szeredi wrote: > > > OTOH mount notification is way smaller and IMO a more mature > > interface. So just picking the unique ID patch into this set might > > make sense. > > But userspace can't retrieve the unique ID without

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread David Howells
Miklos Szeredi wrote: > OTOH mount notification is way smaller and IMO a more mature > interface. So just picking the unique ID patch into this set might > make sense. But userspace can't retrieve the unique ID without fsinfo() as things stand. I'm changing it so that the fields are 64-bit,

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread Miklos Szeredi
On Mon, Aug 3, 2020 at 12:18 PM David Howells wrote: > > Miklos Szeredi wrote: > > > > fsinfo() then allows you to retrieve them by path or by mount ID. > > > > Shouldn't the notification interface provide the unique ID? > > Hmmm... If I'm going to do that, I have to put the fsinfo-core branch

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread David Howells
Miklos Szeredi wrote: > > fsinfo() then allows you to retrieve them by path or by mount ID. > > Shouldn't the notification interface provide the unique ID? Hmmm... If I'm going to do that, I have to put the fsinfo-core branch first otherwise you can't actually retrieve the unique ID - and

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread David Howells
Miklos Szeredi wrote: > > fsinfo() then allows you to retrieve them by path or by mount ID. > > Shouldn't the notification interface provide the unique ID? It could make sense - instead of the reusable mnt_id. David

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread Miklos Szeredi
On Fri, Jul 24, 2020 at 1:36 PM David Howells wrote: > > Ian Kent wrote: > > > I was wondering about id re-use. > > > > Assuming that ids that are returned to the idr db are re-used > > what would the chance that a recently used id would end up > > being used? > > > > Would that chance increase

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-08-03 Thread Miklos Szeredi
On Thu, Jul 23, 2020 at 12:48 PM David Howells wrote: > > > > __u32 topology_changes; > > > __u32 attr_changes; > > > __u32 aux_topology_changes; > > > > Being 32bit this introduces wraparound effects. Is that really worth it? > > You'd have

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-07-24 Thread David Howells
Ian Kent wrote: > I was wondering about id re-use. > > Assuming that ids that are returned to the idr db are re-used > what would the chance that a recently used id would end up > being used? > > Would that chance increase as ids are consumed and freed over > time? I've added something to

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-07-24 Thread Ian Kent
On Fri, 2020-07-24 at 11:19 +0100, David Howells wrote: > David Howells wrote: > > > > What guarantees that mount_id is going to remain a 32bit entity? > > > > You think it likely we'd have >4 billion concurrent mounts on a > > system? That > > would require >1.2TiB of RAM just for the struct

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-07-24 Thread David Howells
David Howells wrote: > > What guarantees that mount_id is going to remain a 32bit entity? > > You think it likely we'd have >4 billion concurrent mounts on a system? That > would require >1.2TiB of RAM just for the struct mount allocations. > > But I can expand it to __u64. That said,

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-07-23 Thread David Howells
Miklos Szeredi wrote: > On Wed, Mar 18, 2020 at 4:05 PM David Howells wrote: > > > > Add a mount notification facility whereby notifications about changes in > > mount topology and configuration can be received. Note that this only > > covers vfsmount topology changes and not superblock

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-06-15 Thread Miklos Szeredi
On Sun, Jun 14, 2020 at 5:07 AM Ian Kent wrote: > > On Thu, 2020-04-02 at 17:19 +0200, Miklos Szeredi wrote: > > > > > Firstly, a watch queue needs to be created: > > > > > > pipe2(fds, O_NOTIFICATION_PIPE); > > > ioctl(fds[1], IOC_WATCH_QUEUE_SET_SIZE, 256); > > > > > > then a

Re: [PATCH 13/17] watch_queue: Implement mount topology and attribute change notifications [ver #5]

2020-06-13 Thread Ian Kent
On Thu, 2020-04-02 at 17:19 +0200, Miklos Szeredi wrote: > > > Firstly, a watch queue needs to be created: > > > > pipe2(fds, O_NOTIFICATION_PIPE); > > ioctl(fds[1], IOC_WATCH_QUEUE_SET_SIZE, 256); > > > > then a notification can be set up to report notifications via that > >