All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"
@ 2020-12-08  7:39 ` Laszlo Ersek
  0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2020-12-08  7:39 UTC (permalink / raw)
  To: qemu-devel, virtio-fs
  Cc: Miklos Szeredi, Dr. David Alan Gilbert, Stefan Hajnoczi

Miklos confirms it's *only* the FUSE_FORGET request that the client can
use for decrementing "lo_inode.nlookup".

Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 tools/virtiofsd/passthrough_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 06543b20dcbb..d3be680e92c3 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -113,7 +113,7 @@ struct lo_inode {
      * This counter keeps the inode alive during the FUSE session.
      * Incremented when the FUSE inode number is sent in a reply
      * (FUSE_LOOKUP, FUSE_READDIRPLUS, etc).  Decremented when an inode is
-     * released by requests like FUSE_FORGET, FUSE_RMDIR, FUSE_RENAME, etc.
+     * released by a FUSE_FORGET request.
      *
      * Note that this value is untrusted because the client can manipulate
      * it arbitrarily using FUSE_FORGET requests.
-- 
2.19.1.3.g30247aa5d201


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Virtio-fs] [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"
@ 2020-12-08  7:39 ` Laszlo Ersek
  0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2020-12-08  7:39 UTC (permalink / raw)
  To: qemu-devel, virtio-fs

Miklos confirms it's *only* the FUSE_FORGET request that the client can
use for decrementing "lo_inode.nlookup".

Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 tools/virtiofsd/passthrough_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 06543b20dcbb..d3be680e92c3 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -113,7 +113,7 @@ struct lo_inode {
      * This counter keeps the inode alive during the FUSE session.
      * Incremented when the FUSE inode number is sent in a reply
      * (FUSE_LOOKUP, FUSE_READDIRPLUS, etc).  Decremented when an inode is
-     * released by requests like FUSE_FORGET, FUSE_RMDIR, FUSE_RENAME, etc.
+     * released by a FUSE_FORGET request.
      *
      * Note that this value is untrusted because the client can manipulate
      * it arbitrarily using FUSE_FORGET requests.
-- 
2.19.1.3.g30247aa5d201


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"
  2020-12-08  7:39 ` [Virtio-fs] " Laszlo Ersek
  (?)
@ 2020-12-08 16:56 ` Vivek Goyal
  2020-12-17 15:01   ` Dr. David Alan Gilbert
  -1 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2020-12-08 16:56 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: virtio-fs, qemu-devel

On Tue, Dec 08, 2020 at 08:39:36AM +0100, Laszlo Ersek wrote:
> Miklos confirms it's *only* the FUSE_FORGET request that the client can
> use for decrementing "lo_inode.nlookup".
> 
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> Cc: Miklos Szeredi <mszeredi@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Looks correct. unref_inode() calls in lo_rmdir() lo_rename() are dropping
->nlookup they have taken internally during the function execution.

Reviewed-by: Vivek Goyal <vgoyal@redhat.com>

Thanks
Vivek

> ---
>  tools/virtiofsd/passthrough_ll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> index 06543b20dcbb..d3be680e92c3 100644
> --- a/tools/virtiofsd/passthrough_ll.c
> +++ b/tools/virtiofsd/passthrough_ll.c
> @@ -113,7 +113,7 @@ struct lo_inode {
>       * This counter keeps the inode alive during the FUSE session.
>       * Incremented when the FUSE inode number is sent in a reply
>       * (FUSE_LOOKUP, FUSE_READDIRPLUS, etc).  Decremented when an inode is
> -     * released by requests like FUSE_FORGET, FUSE_RMDIR, FUSE_RENAME, etc.
> +     * released by a FUSE_FORGET request.
>       *
>       * Note that this value is untrusted because the client can manipulate
>       * it arbitrarily using FUSE_FORGET requests.
> -- 
> 2.19.1.3.g30247aa5d201
> 
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Virtio-fs] [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup"
  2020-12-08 16:56 ` Vivek Goyal
@ 2020-12-17 15:01   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2020-12-17 15:01 UTC (permalink / raw)
  To: Vivek Goyal; +Cc: virtio-fs, Laszlo Ersek, qemu-devel

* Vivek Goyal (vgoyal@redhat.com) wrote:
> On Tue, Dec 08, 2020 at 08:39:36AM +0100, Laszlo Ersek wrote:
> > Miklos confirms it's *only* the FUSE_FORGET request that the client can
> > use for decrementing "lo_inode.nlookup".
> > 
> > Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > Cc: Miklos Szeredi <mszeredi@redhat.com>
> > Cc: Stefan Hajnoczi <stefanha@redhat.com>
> > Fixes: 1222f015558fc34cea02aa3a5a92de608c82cec8
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> 
> Looks correct. unref_inode() calls in lo_rmdir() lo_rename() are dropping
> ->nlookup they have taken internally during the function execution.
> 
> Reviewed-by: Vivek Goyal <vgoyal@redhat.com>

Queued.

> 
> Thanks
> Vivek
> 
> > ---
> >  tools/virtiofsd/passthrough_ll.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> > index 06543b20dcbb..d3be680e92c3 100644
> > --- a/tools/virtiofsd/passthrough_ll.c
> > +++ b/tools/virtiofsd/passthrough_ll.c
> > @@ -113,7 +113,7 @@ struct lo_inode {
> >       * This counter keeps the inode alive during the FUSE session.
> >       * Incremented when the FUSE inode number is sent in a reply
> >       * (FUSE_LOOKUP, FUSE_READDIRPLUS, etc).  Decremented when an inode is
> > -     * released by requests like FUSE_FORGET, FUSE_RMDIR, FUSE_RENAME, etc.
> > +     * released by a FUSE_FORGET request.
> >       *
> >       * Note that this value is untrusted because the client can manipulate
> >       * it arbitrarily using FUSE_FORGET requests.
> > -- 
> > 2.19.1.3.g30247aa5d201
> > 
> > _______________________________________________
> > Virtio-fs mailing list
> > Virtio-fs@redhat.com
> > https://www.redhat.com/mailman/listinfo/virtio-fs
> 
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-17 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08  7:39 [PATCH] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup" Laszlo Ersek
2020-12-08  7:39 ` [Virtio-fs] " Laszlo Ersek
2020-12-08 16:56 ` Vivek Goyal
2020-12-17 15:01   ` Dr. David Alan Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.