From: Nikolaus Rath <Nikolaus@rath.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Jose Lopes <jabolopes@gmail.com>,
linux-fsdevel@vger.kernel.org, fuse-devel@lists.sourceforge.net
Subject: Re: [PATCH] Make file struct available to fchmod FS handlers.
Date: Thu, 03 Nov 2016 08:22:01 -0700 [thread overview]
Message-ID: <871sys7fmu.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <20161103005931.GB19539@ZenIV.linux.org.uk> (Al Viro's message of "Thu, 3 Nov 2016 00:59:31 +0000")
On Nov 03 2016, Al Viro <viro@ZenIV.linux.org.uk> wrote:
> On Wed, Nov 02, 2016 at 11:53:40PM +0100, Jose Lopes wrote:
>> Syscall 'ftruncate' makes the 'file' struct available to filesystem
>> handlers. This makes it possible, e.g., for filesystems, such as,
>> FUSE, to access the file handle associated with the file descriptor
>> that was passed to 'ftruncate'. In the specific case of FUSE, this
>> also makes it possible for (userspace) FUSE-based filesystems to
>> distinguish between calls to 'truncate' and 'ftruncate'.
>
> Why FUSE is such a precious snowflake that it needs to make that distinction,
> unlike all other filesystems?
FUSE filesystems are often used as an extra layer on top of another
filesystem (that stores the actual data). If the user opens a file (in
the fuse filesystem), deletes it, and then truncates it, FUSE currently
cannot do the same operation in the underlying filesystem: it receives
a truncate() call with the inode, but there is no syscall that allows
truncation for an inode. If FUSE had access to the file handle, it can
use that to store a file descriptor for the file on the underlying
filesystem and use ftruncate.
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
next prev parent reply other threads:[~2016-11-03 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 22:53 [PATCH] Make file struct available to fchmod FS handlers Jose Lopes
2016-11-03 0:59 ` Al Viro
2016-11-03 8:22 ` [fuse-devel] " Jean-Pierre André
[not found] ` <581AF3CB.3090001-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
2016-11-03 10:26 ` Jose Lopes
2016-11-17 17:44 ` [fuse-devel] " Eric W. Biederman
2016-11-17 18:39 ` Nikolaus Rath
2016-11-17 19:20 ` Eric W. Biederman
2016-11-17 23:03 ` Stef Bon
2016-11-03 15:22 ` Nikolaus Rath [this message]
2016-11-07 4:51 ` Nikolaus Rath
2016-11-09 17:54 ` Jose Lopes
2016-11-07 5:25 ` Nikolaus Rath
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=871sys7fmu.fsf@thinkpad.rath.org \
--to=nikolaus@rath.org \
--cc=fuse-devel@lists.sourceforge.net \
--cc=jabolopes@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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.