Deleted Added
full compact
zfs_ioctl.c (228103) zfs_ioctl.c (230397)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 67 unchanged lines hidden (view full) ---

76#include "zfs_namecheck.h"
77#include "zfs_prop.h"
78#include "zfs_deleg.h"
79#include "zfs_comutil.h"
80#include "zfs_ioctl_compat.h"
81
82CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX);
83
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 67 unchanged lines hidden (view full) ---

76#include "zfs_namecheck.h"
77#include "zfs_prop.h"
78#include "zfs_deleg.h"
79#include "zfs_comutil.h"
80#include "zfs_ioctl_compat.h"
81
82CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX);
83
84static int snapshot_list_prefetch;
85SYSCTL_DECL(_vfs_zfs);
86TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch);
87SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW,
88 &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots");
89
84static struct cdev *zfsdev;
85
86extern void zfs_init(void);
87extern void zfs_fini(void);
88
89typedef int zfs_ioc_func_t(zfs_cmd_t *);
90typedef int zfs_secpolicy_func_t(zfs_cmd_t *, cred_t *);
91

--- 1947 unchanged lines hidden (view full) ---

2039 */
2040static int
2041zfs_ioc_snapshot_list_next(zfs_cmd_t *zc)
2042{
2043 objset_t *os;
2044 int error;
2045
2046top:
90static struct cdev *zfsdev;
91
92extern void zfs_init(void);
93extern void zfs_fini(void);
94
95typedef int zfs_ioc_func_t(zfs_cmd_t *);
96typedef int zfs_secpolicy_func_t(zfs_cmd_t *, cred_t *);
97

--- 1947 unchanged lines hidden (view full) ---

2045 */
2046static int
2047zfs_ioc_snapshot_list_next(zfs_cmd_t *zc)
2048{
2049 objset_t *os;
2050 int error;
2051
2052top:
2047 if (zc->zc_cookie == 0)
2053 if (snapshot_list_prefetch && zc->zc_cookie == 0)
2048 (void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch,
2049 NULL, DS_FIND_SNAPSHOTS);
2050
2051 error = dmu_objset_hold(zc->zc_name, FTAG, &os);
2052 if (error)
2053 return (error == ENOENT ? ESRCH : error);
2054
2055 /*

--- 3363 unchanged lines hidden ---
2054 (void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch,
2055 NULL, DS_FIND_SNAPSHOTS);
2056
2057 error = dmu_objset_hold(zc->zc_name, FTAG, &os);
2058 if (error)
2059 return (error == ENOENT ? ESRCH : error);
2060
2061 /*

--- 3363 unchanged lines hidden ---