[RFC] add [GET/SET]_COMPRESSION ioctl support

David Disseldorp ddiss at samba.org
Mon Sep 16 09:52:45 CEST 2013


Hi,

This patch series adds support for the FSCTL_GET_COMPRESSION and
FSCTL_SET_COMPRESSION ioctls, as well as the reporting of the current
compression state via the FILE_ATTRIBUTE_COMPRESSED flag.

Hooks are added to btrfs VFS module, which translates such requests into
corresponding FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls.

One aspect of this patch-set that I'm a little uncomfortable with is the
combination of both fsp and smb_fname as arguments for the compression
VFS hooks - the smb_fname argument is needed due to the existing dosmode
code-path, which has not yet been converted to work with fsps.

Feedback appreciated.

Cheers, David

==

 docs-xml/manpages/vfs_full_audit.8.xml |   2 ++
 examples/VFS/skel_opaque.c             |  20 +++++++++++++++++
 examples/VFS/skel_transparent.c        |  22 +++++++++++++++++++
 source3/include/vfs.h                  |  21 ++++++++++++++++++
 source3/include/vfs_macros.h           |  12 ++++++++++-
 source3/modules/vfs_btrfs.c            | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 source3/modules/vfs_default.c          |  18 ++++++++++++++++
 source3/modules/vfs_full_audit.c       |  40 ++++++++++++++++++++++++++++++++++
 source3/modules/vfs_time_audit.c       |  48 +++++++++++++++++++++++++++++++++++++++++
 source3/smbd/dosmode.c                 |  90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 source3/smbd/open.c                    |  12 +++++++++++
 source3/smbd/smb2_ioctl_filesys.c      | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 source3/smbd/vfs.c                     |  22 +++++++++++++++++++
 source3/wscript                        |   2 +-
 source4/torture/smb2/ioctl.c           |  43 ++++++++++++++++++++++++++++++-------
 15 files changed, 602 insertions(+), 27 deletions(-)




More information about the samba-technical mailing list