From: Nikhilesh Reddy <reddyn-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Jann Horn <jann-XZ1E9jl8jIdeoWH0uzbU5w@public.gmane.org>
Cc: torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org>,
fuse-devel
<fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
Richard Weinberger
<richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org>,
jack-AlSwsSmVLrQ@public.gmane.org,
Antonio SJ Musumeci
<trapexit-wGTF+nt6ur047o9RxwvyTQ@public.gmane.org>,
sven.utcke-Mmb7MZpHnFY@public.gmane.org,
Nikolaus Rath <nikolaus-BTH8mxji4b0@public.gmane.org>,
Jann Horn <jannhorn-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Subject: Re: [PATCH v3] fuse: Add support for passthrough read/write
Date: Wed, 20 Jan 2016 16:15:52 -0800 [thread overview]
Message-ID: <56A02338.9000001@codeaurora.org> (raw)
In-Reply-To: <20160120233841.GA16235-J1fxOzX/cBvk1uMJSBkQmQ@public.gmane.org>
On Wed 20 Jan 2016 03:38:41 PM PST, Jann Horn wrote:
> On Wed, Jan 20, 2016 at 03:20:34PM -0800, Nikhilesh Reddy wrote:
>> Add support for filesystem passthrough read/write of files
>> when enabled in userspace through the option FUSE_PASSTHROUGH.
> [...]
>> + daemon_fd = (int)open_out->passthrough_fd;
>> + if (daemon_fd < 0)
>> + return;
>> +
>> + passthrough_filp = fget_raw(daemon_fd);
>> + if (!passthrough_filp)
>> + return;
>> +
>> + passthrough_inode = file_inode(passthrough_filp);
>> + passthrough_sb = passthrough_inode->i_sb;
>> + fs_stack_depth = passthrough_sb->s_stack_depth + 1;
>> +
>> + /* If we reached the stacking limit go through regular io */
>> + if (fs_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
>> + pr_err("FUSE: maximum fs stacking depth exceeded, cannot use passthrough for this file\n");
>> + return;
>> + }
>
> I think this needs an fput() in the error case to prevent a refcount leak.
Whoops my bad .. forgot to commit! :(
Thanks for the catch
fixed ... sending patch v4 in a few minutes
--
Thanks
Nikhilesh Reddy
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
WARNING: multiple messages have this Message-ID (diff)
From: Nikhilesh Reddy <reddyn@codeaurora.org>
To: Jann Horn <jann@thejh.net>
Cc: torvalds@linux-foundation.org, Miklos Szeredi <miklos@szeredi.hu>,
fuse-devel <fuse-devel@lists.sourceforge.net>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk,
Richard Weinberger <richard.weinberger@gmail.com>,
Theodore Ts'o <tytso@mit.edu>,
jack@suse.cz, Antonio SJ Musumeci <trapexit@spawn.link>,
sven.utcke@gmx.de, Nikolaus Rath <nikolaus@rath.org>,
Jann Horn <jannhorn@googlemail.com>
Subject: Re: [PATCH v3] fuse: Add support for passthrough read/write
Date: Wed, 20 Jan 2016 16:15:52 -0800 [thread overview]
Message-ID: <56A02338.9000001@codeaurora.org> (raw)
In-Reply-To: <20160120233841.GA16235@pc.thejh.net>
On Wed 20 Jan 2016 03:38:41 PM PST, Jann Horn wrote:
> On Wed, Jan 20, 2016 at 03:20:34PM -0800, Nikhilesh Reddy wrote:
>> Add support for filesystem passthrough read/write of files
>> when enabled in userspace through the option FUSE_PASSTHROUGH.
> [...]
>> + daemon_fd = (int)open_out->passthrough_fd;
>> + if (daemon_fd < 0)
>> + return;
>> +
>> + passthrough_filp = fget_raw(daemon_fd);
>> + if (!passthrough_filp)
>> + return;
>> +
>> + passthrough_inode = file_inode(passthrough_filp);
>> + passthrough_sb = passthrough_inode->i_sb;
>> + fs_stack_depth = passthrough_sb->s_stack_depth + 1;
>> +
>> + /* If we reached the stacking limit go through regular io */
>> + if (fs_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
>> + pr_err("FUSE: maximum fs stacking depth exceeded, cannot use passthrough for this file\n");
>> + return;
>> + }
>
> I think this needs an fput() in the error case to prevent a refcount leak.
Whoops my bad .. forgot to commit! :(
Thanks for the catch
fixed ... sending patch v4 in a few minutes
--
Thanks
Nikhilesh Reddy
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2016-01-21 0:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 23:20 [PATCH v3] fuse: Add support for passthrough read/write Nikhilesh Reddy
2016-01-20 23:20 ` Nikhilesh Reddy
2016-01-20 23:38 ` Jann Horn
[not found] ` <20160120233841.GA16235-J1fxOzX/cBvk1uMJSBkQmQ@public.gmane.org>
2016-01-21 0:15 ` Nikhilesh Reddy [this message]
2016-01-21 0:15 ` Nikhilesh Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A02338.9000001@codeaurora.org \
--to=reddyn-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jack-AlSwsSmVLrQ@public.gmane.org \
--cc=jann-XZ1E9jl8jIdeoWH0uzbU5w@public.gmane.org \
--cc=jannhorn-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org \
--cc=nikolaus-BTH8mxji4b0@public.gmane.org \
--cc=richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=sven.utcke-Mmb7MZpHnFY@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=trapexit-wGTF+nt6ur047o9RxwvyTQ@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.