Re: [RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-06 Thread Miklos Szeredi
On Mon, Oct 5, 2020 at 9:40 PM Alexander Mikhalitsyn wrote: > Oh, yes, it's just another one choice for us ;) > I decided to create ioctl which opens fd for transferring > data about overlayfs. > Sure, let's look on sys fs. I will dive into it! Or maybe use fsinfo(2) or whatever it's going to be

Re: [RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-05 Thread Alexander Mikhalitsyn
On Mon, 5 Oct 2020 20:22:47 +0300 Amir Goldstein wrote: > On Mon, Oct 5, 2020 at 8:13 PM Alexander Mikhalitsyn > wrote: > > > > On Mon, 5 Oct 2020 10:08:42 -0700 > > Randy Dunlap wrote: > > > > > On 10/5/20 10:02 AM, Alexander Mikhalitsyn wrote: > > > > #defineOVL_IOC_GETLWRFHNDLSNUM

Re: [RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-05 Thread Amir Goldstein
On Mon, Oct 5, 2020 at 8:13 PM Alexander Mikhalitsyn wrote: > > On Mon, 5 Oct 2020 10:08:42 -0700 > Randy Dunlap wrote: > > > On 10/5/20 10:02 AM, Alexander Mikhalitsyn wrote: > > > #defineOVL_IOC_GETLWRFHNDLSNUM _IO('o', 1) > > > // DISCUSS: what if MAX_HANDLE_SZ will chang

Re: [RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-05 Thread Alexander Mikhalitsyn
On Mon, 5 Oct 2020 10:08:42 -0700 Randy Dunlap wrote: > On 10/5/20 10:02 AM, Alexander Mikhalitsyn wrote: > > #defineOVL_IOC_GETLWRFHNDLSNUM _IO('o', 1) > > // DISCUSS: what if MAX_HANDLE_SZ will change? > > #defineOVL_IOC_GETLWRFHNDL _IOR('o', 2, st

Re: [RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-05 Thread Randy Dunlap
On 10/5/20 10:02 AM, Alexander Mikhalitsyn wrote: > #define OVL_IOC_GETLWRFHNDLSNUM _IO('o', 1) > // DISCUSS: what if MAX_HANDLE_SZ will change? > #define OVL_IOC_GETLWRFHNDL _IOR('o', 2, struct > ovl_mnt_opt_fh) > #define OVL_IOC_GETUPPRFHNDL

[RFC PATCH] overlayfs: add OVL_IOC_GETINFOFD ioctl that opens ovlinfofd

2020-10-05 Thread Alexander Mikhalitsyn
Second variant of possible interface to get source-dirs fhandles from userspace. OVL_IOC_GETINFOFD ioctls opens special [ovlinfofd] descriptor which is really just seq_file. When read from this seq_file we will get something like this: === numlower: 2 L fhandle-bytes:c fhandle-type:1 f_handle:9685a