Re: [PATCH] fanotify: introduce unique event identifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I agree expanding fanotify_event_metadata painful. After all that's the
reason why we've invented the additional info records in the first place :).
So I agree with putting the id either in a separate info record or overload
something in fanotify_event_metadata.

On Sun 29-06-25 08:50:05, Amir Goldstein wrote:
> I may have mentioned this before, but I'll bring it up again.
> If we want to overload event->fd with response id I would consider
> allocating response_id with idr_alloc_cyclic() that starts at 256
> and then set event->fd = -response_id.
> We want to skip the range -1..-255 because it is used to report
> fd open errors with FAN_REPORT_FD_ERROR.

I kind of like this. It looks elegant. The only reason I'm hesitating is
that as you mentioned with persistent notifications we'll likely need
64-bit type for identifying event. But OTOH requirements there are unclear
and I can imagine even userspace assigning the ID. In the worst case we
could add info record for this persistent event id. So ok, let's do it as
you suggest.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux