Skip to content

Commit

Permalink
Simplify get/set NFS4 ACL (openzfs#113)
Browse files Browse the repository at this point in the history
This removes an extra memory allocation / free from the
NFS4 ACL xattr handler. Initially this was written rather
quickly in the alpha cycle of SCALE and implemented in a
way to ensure that xattr was exactly matching format
used internally in samba's vfs_acl_xattr module. Since
this time a more efficient conversion between the Samba
format and various other ones was added for the purpose
of inclusion in the Kernel NFS server.

This change simplifies conversion between internal NFS ACL and
external xattr representation, but has no impact on userspace
and kernel consumers of this xattr (format does not change).

Signed-off-by: Andrew Walker <[email protected]>
  • Loading branch information
anodos325 authored and arter97 committed Nov 23, 2023
1 parent 317053b commit 2a98b53
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 213 deletions.
1 change: 0 additions & 1 deletion module/Kbuild.in
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ ZFS_OBJS_OS := \
abd_os.o \
arc_os.o \
mmp_os.o \
nfs41acl_xdr.o \
policy.o \
qat.o \
qat_compress.o \
Expand Down
9 changes: 0 additions & 9 deletions module/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ FMAKE = env -u MAKEFLAGS make $(FMAKEFLAGS)
modules-Linux:
mkdir -p $(sort $(dir $(spl-objs) $(spl-)))
mkdir -p $(sort $(dir $(zfs-objs) $(zfs-)))
@# Generate the nfs41acl XDR header.
rpcgen -h "@abs_srcdir@/os/linux/zfs/nfs41acl.x" > "@abs_srcdir@/os/linux/zfs/nfs41acl.h"
sed -i "/\<rpc\/rpc.h\>/c\\#include \<rpc\/xdr.h\>" "@abs_srcdir@/os/linux/zfs/nfs41acl.h"
sed -i "9i #include <sys/sysmacros.h>" "@abs_srcdir@/os/linux/zfs/nfs41acl.h"
@# Generate the nfs41acl XDR code.
rpcgen -c "@abs_srcdir@/os/linux/zfs/nfs41acl.x" > "@abs_srcdir@/os/linux/zfs/nfs41acl_xdr.c"
sed -i "5i #pragma GCC diagnostic push" "@abs_srcdir@/os/linux/zfs/nfs41acl_xdr.c"
sed -i "6i #pragma GCC diagnostic ignored \"-Wunused-variable\"" "@abs_srcdir@/os/linux/zfs/nfs41acl_xdr.c"
echo "#pragma GCC diagnostic pop" >> "@abs_srcdir@/os/linux/zfs/nfs41acl_xdr.c"
@# Build the kernel modules.
$(MAKE) -C @LINUX_OBJ@ $(if @KERNEL_CC@,CC=@KERNEL_CC@) \
$(if @KERNEL_LD@,LD=@KERNEL_LD@) $(if @KERNEL_LLVM@,LLVM=@KERNEL_LLVM@) \
Expand Down
74 changes: 0 additions & 74 deletions module/os/linux/zfs/nfs41acl.x

This file was deleted.

Loading

0 comments on commit 2a98b53

Please sign in to comment.