Re: [PATCH] Make file struct available to fchmod FS handlers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 03 2016, Jose Lopes <jabolopes@xxxxxxxxx> 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'.
>
> From an implementation point of view, this is possible because the
> 'ftruncate' syscall passes the 'file' struct to the underlying
> filesystem handlers via the 'ia_file' field and the 'ia_valid' field
> mask.
>
> Similarly to 'ftruncate', pass the 'file' struct to 'fchmod', which
> allows filesystem handlers to get the file handle associated with the
> file descriptor passed to 'fchmod' and allows FUSE-based filesystems
> to distinguish between calls to 'chmod' and 'fchmod'.
>
> In a future patch, make a similar change to the 'fchown' and
> 'futimens' syscalls.
>
> Signed-off-by: Jose Lopes <jabolopes@xxxxxxxxx>

Tested-by: Nikolaus Rath <Nikolaus@xxxxxxxx>



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.«
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux