Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-07-21 Thread Max Reitz
On 20.07.21 16:50, Vivek Goyal wrote: On Tue, Jul 13, 2021 at 05:07:31PM +0200, Max Reitz wrote: [..] The next question is, how do we detect temporary failure, because if we look up some new inode, name_to_handle_at() fails, we ignore it, and then it starts to work and we fail all further

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-07-20 Thread Vivek Goyal
On Tue, Jul 13, 2021 at 05:07:31PM +0200, Max Reitz wrote: [..] > > The next question is, how do we detect temporary failure, because if we > > look up some new inode, name_to_handle_at() fails, we ignore it, and > > then it starts to work and we fail all further lookups, that’s not > > good.  We

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-07-13 Thread Max Reitz
So I’m coming back to this after three weeks (well, PTO), and this again turns into a bit of a pain, actually. I don’t think it’s anything serious, but I had thought we had found something that would make us both happy because it wouldn’t be too ugly, and now it’s turning ugly again...  So

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Vivek Goyal
On Mon, Jun 21, 2021 at 07:07:19PM +0200, Max Reitz wrote: > On 21.06.21 17:51, Vivek Goyal wrote: > > On Mon, Jun 21, 2021 at 11:02:16AM +0200, Max Reitz wrote: > > > On 18.06.21 20:29, Vivek Goyal wrote: > > [snip] > > > > > What am I not able to understand is that why we can't return error if

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Max Reitz
On 21.06.21 17:51, Vivek Goyal wrote: On Mon, Jun 21, 2021 at 11:02:16AM +0200, Max Reitz wrote: On 18.06.21 20:29, Vivek Goyal wrote: [snip] What am I not able to understand is that why we can't return error if we run into a temporary issue and can't generate file handle. What's that

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Vivek Goyal
On Mon, Jun 21, 2021 at 11:02:16AM +0200, Max Reitz wrote: > On 18.06.21 20:29, Vivek Goyal wrote: > > On Fri, Jun 18, 2021 at 10:28:38AM +0200, Max Reitz wrote: > > > On 17.06.21 23:21, Vivek Goyal wrote: > > > > On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: > > > > > On 11.06.21

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-21 Thread Max Reitz
On 18.06.21 20:29, Vivek Goyal wrote: On Fri, Jun 18, 2021 at 10:28:38AM +0200, Max Reitz wrote: On 17.06.21 23:21, Vivek Goyal wrote: On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote:

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Vivek Goyal
On Fri, Jun 18, 2021 at 10:28:38AM +0200, Max Reitz wrote: > On 17.06.21 23:21, Vivek Goyal wrote: > > On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: > > > On 11.06.21 22:04, Vivek Goyal wrote: > > > > On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: > > > > > Currently,

Re: [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 09.06.21 17:55, Max 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 closes the FD). Therefore,

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-18 Thread Max Reitz
On 17.06.21 23:21, Vivek Goyal wrote: On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd.

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-17 Thread Vivek Goyal
On Wed, Jun 16, 2021 at 03:38:13PM +0200, Max Reitz wrote: > On 11.06.21 22:04, Vivek Goyal wrote: > > On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max 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

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-16 Thread Max Reitz
On 11.06.21 22:04, Vivek Goyal wrote: On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max 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

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-11 Thread Vivek Goyal
On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max 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

[PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-09 Thread Max 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