mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92e0d9d183 | |||
| 232fc23c6e | |||
| 11bdc5c8e8 |
@@ -1,7 +1,7 @@
|
|||||||
Meta: 1
|
Meta: 1
|
||||||
Name: zfs
|
Name: zfs
|
||||||
Branch: 1.0
|
Branch: 1.0
|
||||||
Version: 2.1.8
|
Version: 2.1.9
|
||||||
Release: 1
|
Release: 1
|
||||||
Release-Tags: relext
|
Release-Tags: relext
|
||||||
License: CDDL
|
License: CDDL
|
||||||
|
|||||||
+28
-3
@@ -165,6 +165,9 @@ dnl #
|
|||||||
dnl # 5.15 API change,
|
dnl # 5.15 API change,
|
||||||
dnl # Added the bool rcu argument to get_acl for rcu path walk.
|
dnl # Added the bool rcu argument to get_acl for rcu path walk.
|
||||||
dnl #
|
dnl #
|
||||||
|
dnl # 6.2 API change,
|
||||||
|
dnl # get_acl() was renamed to get_inode_acl()
|
||||||
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
@@ -230,7 +233,22 @@ dnl #
|
|||||||
dnl # 5.12 API change,
|
dnl # 5.12 API change,
|
||||||
dnl # set_acl() added a user_namespace* parameter first
|
dnl # set_acl() added a user_namespace* parameter first
|
||||||
dnl #
|
dnl #
|
||||||
|
dnl # 6.2 API change,
|
||||||
|
dnl # set_acl() second paramter changed to a struct dentry *
|
||||||
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||||
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [
|
||||||
|
#include <linux/fs.h>
|
||||||
|
|
||||||
|
int set_acl_fn(struct user_namespace *userns,
|
||||||
|
struct dentry *dent, struct posix_acl *acl,
|
||||||
|
int type) { return 0; }
|
||||||
|
|
||||||
|
static const struct inode_operations
|
||||||
|
iops __attribute__ ((unused)) = {
|
||||||
|
.set_acl = set_acl_fn,
|
||||||
|
};
|
||||||
|
],[])
|
||||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
|
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
@@ -263,11 +281,18 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
|||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
||||||
AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
|
AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
|
||||||
],[
|
],[
|
||||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
|
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns_dentry], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
|
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
||||||
|
AC_DEFINE(HAVE_SET_ACL_USERNS_DENTRY_ARG2, 1,
|
||||||
|
[iops->set_acl() takes 4 args, arg2 is struct dentry *])
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT(no)
|
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
|
||||||
|
],[
|
||||||
|
ZFS_LINUX_REQUIRE_API([i_op->set_acl()], [3.14])
|
||||||
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
|
|||||||
#if defined(HAVE_SET_ACL_USERNS)
|
#if defined(HAVE_SET_ACL_USERNS)
|
||||||
extern int zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
extern int zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
||||||
struct posix_acl *acl, int type);
|
struct posix_acl *acl, int type);
|
||||||
|
#elif defined(HAVE_SET_ACL_USERNS_DENTRY_ARG2)
|
||||||
|
extern int zpl_set_acl(struct user_namespace *userns, struct dentry *dentry,
|
||||||
|
struct posix_acl *acl, int type);
|
||||||
#else
|
#else
|
||||||
extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
|
extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
|
||||||
#endif /* HAVE_SET_ACL_USERNS */
|
#endif /* HAVE_SET_ACL_USERNS */
|
||||||
|
|||||||
@@ -1004,11 +1004,18 @@ int
|
|||||||
#ifdef HAVE_SET_ACL_USERNS
|
#ifdef HAVE_SET_ACL_USERNS
|
||||||
zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
||||||
struct posix_acl *acl, int type)
|
struct posix_acl *acl, int type)
|
||||||
|
#elif defined(HAVE_SET_ACL_USERNS_DENTRY_ARG2)
|
||||||
|
zpl_set_acl(struct user_namespace *userns, struct dentry *dentry,
|
||||||
|
struct posix_acl *acl, int type)
|
||||||
#else
|
#else
|
||||||
zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
|
zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
|
||||||
#endif /* HAVE_SET_ACL_USERNS */
|
#endif /* HAVE_SET_ACL_USERNS */
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_SET_ACL_USERNS_DENTRY_ARG2
|
||||||
|
return (zpl_set_acl_impl(d_inode(dentry), acl, type));
|
||||||
|
#else
|
||||||
return (zpl_set_acl_impl(ip, acl, type));
|
return (zpl_set_acl_impl(ip, acl, type));
|
||||||
|
#endif /* HAVE_SET_ACL_USERNS_DENTRY_ARG2 */
|
||||||
}
|
}
|
||||||
#endif /* HAVE_SET_ACL */
|
#endif /* HAVE_SET_ACL */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2827,7 +2827,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
|
|||||||
* have a third copy.
|
* have a third copy.
|
||||||
*/
|
*/
|
||||||
gbh_copies = MIN(copies + 1, spa_max_replication(spa));
|
gbh_copies = MIN(copies + 1, spa_max_replication(spa));
|
||||||
if (BP_IS_ENCRYPTED(bp) && gbh_copies >= SPA_DVAS_PER_BP)
|
if (gio->io_prop.zp_encrypt && gbh_copies >= SPA_DVAS_PER_BP)
|
||||||
gbh_copies = SPA_DVAS_PER_BP - 1;
|
gbh_copies = SPA_DVAS_PER_BP - 1;
|
||||||
|
|
||||||
int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER;
|
int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER;
|
||||||
|
|||||||
Reference in New Issue
Block a user