Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-20 Thread Vivek Goyal
On Wed, Oct 20, 2021 at 04:10:51PM +0200, Hanna Reitz wrote: > On 20.10.21 14:29, Vivek Goyal wrote: > > On Wed, Oct 20, 2021 at 12:02:32PM +0200, Hanna Reitz wrote: > > > On 19.10.21 22:02, Vivek Goyal wrote: > > > > On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: > > > > > Currently,

Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-20 Thread Hanna Reitz
On 20.10.21 14:29, Vivek Goyal wrote: On Wed, Oct 20, 2021 at 12:02:32PM +0200, Hanna Reitz wrote: On 19.10.21 22:02, Vivek Goyal wrote: On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Ther

Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-20 Thread Vivek Goyal
On Wed, Oct 20, 2021 at 12:02:32PM +0200, Hanna Reitz wrote: > On 19.10.21 22:02, Vivek Goyal wrote: > > On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: > > > Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH > > > FD in lo_inode.fd. Therefore, when the respectiv

Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-20 Thread Vivek Goyal
On Wed, Oct 20, 2021 at 12:02:32PM +0200, Hanna Reitz wrote: > On 19.10.21 22:02, Vivek Goyal wrote: > > On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: > > > Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH > > > FD in lo_inode.fd. Therefore, when the respectiv

Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-20 Thread Hanna Reitz
On 19.10.21 22:02, Vivek Goyal wrote: On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our lo_in

Re: [PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-10-19 Thread Vivek Goyal
On Thu, Sep 16, 2021 at 10:40:43AM +0200, Hanna Reitz wrote: > Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH > FD in lo_inode.fd. Therefore, when the respective inode is unlinked, > its inode ID will remain in use until we drop our lo_inode (and > lo_inode_put() thus clos

[PATCH v4 10/12] virtiofsd: Add inodes_by_handle hash table

2021-09-16 Thread Hanna Reitz
Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our lo_inode (and lo_inode_put() thus closes the FD). Therefore, lo_find() can safely use the inode ID as an l