mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Linux 4.8 compat: new s_user_ns member of struct super_block
Kernel 4.8 paved the way to enabling mounting a file system inside a non-init user namespace. To facilitate this a s_user_ns member was added holding the userns in which the filesystem's instance was mounted. This enables doing the uid/gid translation relative to this particular username space and not the default init_user_ns. Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4928
This commit is contained in:
committed by
Brian Behlendorf
parent
cf2731e65b
commit
938cfeb0f2
@@ -0,0 +1,21 @@
|
||||
dnl #
|
||||
dnl # 4.8 API change
|
||||
dnl # struct user_namespace was added to struct super_block as
|
||||
dnl # super->s_user_ns member
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SUPER_USER_NS], [
|
||||
AC_MSG_CHECKING([whether super_block->s_user_ns exists])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/fs.h>
|
||||
#include <linux/user_namespace.h>
|
||||
],[
|
||||
struct super_block super;
|
||||
super.s_user_ns = (struct user_namespace *)NULL;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SUPER_USER_NS, 1,
|
||||
[super_block->s_user_ns exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
@@ -8,6 +8,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_CONFIG
|
||||
ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
|
||||
ZFS_AC_KERNEL_CURRENT_BIO_TAIL
|
||||
ZFS_AC_KERNEL_SUPER_USER_NS
|
||||
ZFS_AC_KERNEL_SUBMIT_BIO
|
||||
ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
|
||||
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
||||
|
||||
Reference in New Issue
Block a user