Merge commit 'refs/top-bases/linux-debug-zerocopy' into linux-debug-zerocopy
This commit is contained in:
commit
bb5e111dde
|
@ -0,0 +1,52 @@
|
|||
#
|
||||
# N.B.
|
||||
# This is the toplevel .gitignore file.
|
||||
# This is not the place for entries that are specific to
|
||||
# a subdirectory. Instead add those files to the
|
||||
# .gitignore file in that subdirectory.
|
||||
#
|
||||
# N.B.
|
||||
# Please use 'git ls-files -i --exclude-standard'
|
||||
# command after changing this file, to see if there are
|
||||
# any tracked files which get ignored after the change.
|
||||
|
||||
#
|
||||
# Normal rules
|
||||
#
|
||||
*.[oa]
|
||||
*.ko
|
||||
*.ko.unsigned
|
||||
*.ko.out
|
||||
*.ko.out.sig
|
||||
*.lo
|
||||
*.la
|
||||
*.mod.c
|
||||
*~
|
||||
*.swp
|
||||
.*.cmd
|
||||
.deps
|
||||
.libs
|
||||
.DS_Store
|
||||
modules.order
|
||||
Makefile
|
||||
|
||||
#
|
||||
# Top level generated files specific to this top level dir
|
||||
#
|
||||
/Makefile
|
||||
/config.log
|
||||
/config.status
|
||||
/libtool
|
||||
/zfs_config.h
|
||||
/zfs.spec
|
||||
/zfs-modules.spec
|
||||
/stamp-h1
|
||||
/.script-config
|
||||
|
||||
#
|
||||
# Top level generic files
|
||||
#
|
||||
!.gitignore
|
||||
tags
|
||||
TAGS
|
||||
cscope.*
|
126
ChangeLog
126
ChangeLog
|
@ -1,3 +1,127 @@
|
|||
2010-03-11 Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
* : Tag zfs-0.4.8 - Use 'git log --no-merges' for full change log.
|
||||
|
||||
* : Build system improvements:
|
||||
- Remove Module.markers and Module.symver{s} in clean target.
|
||||
- Improved kernel source detection when none specified.
|
||||
- Fix RPM definitions for the unknown distro/installation.
|
||||
- Check for spl in ../spl if not found in install path.
|
||||
- Include all headers regardless of depth in packages.
|
||||
- Allow recursive configure/make.
|
||||
|
||||
* lib/libzpool/kernel.c: Fixed several zdb bugs when opening a pool
|
||||
- zdb wasn't getting the correct device size when the vdev is a
|
||||
block device. In Solaris, fstat64() returns the device size but
|
||||
in Linux an ioctl() is needed.
|
||||
- make sure that we don't try to open a block device in write mode
|
||||
from userspace. This shouldn't happen, because zdb opens devices
|
||||
in read-only mode, and ztest only uses files.
|
||||
|
||||
* lib/libspl/include/umem.h: Add umem_alloc_aligned() and honor
|
||||
cache_align field for umem cache. Under linux we open block devices
|
||||
with O_DIRECT which means we must provide aligned memory buffers.
|
||||
|
||||
* lib/libzpool/kernel.c: Fix some incorrect error handling. In
|
||||
vn_open(), if fstat64() returned an error, the real errno was being
|
||||
obscured by calling close().
|
||||
|
||||
* scripts/*: Fix scripts to work when invoked from other directories.
|
||||
|
||||
* module/zfs/arc.c: Fix struct ht_lock padding in arc.c.
|
||||
|
||||
* lib/libefi/include/sys/uuid.h: Fix duplicate uuid_t typedef.
|
||||
|
||||
* module/zfs/txg.c: Use CPU percentages for number of commit cb
|
||||
threads. This doesn't change number of threads in the kernel, but it
|
||||
reduces number of threads in ztest (important due to 32-bit address
|
||||
limitations).
|
||||
|
||||
* cmd/ztest/ztest.c: Clean up emulation of kernel threads in
|
||||
userspace. Updated to use pthread thread specific data rather than
|
||||
keeping a global list. This also fixes at least one easily
|
||||
reproducible crash in ztest
|
||||
|
||||
* META, config/kernel.m4: Add configure check for kernel build
|
||||
options which are incompatible with the license. If your building
|
||||
against a kernel deemed incompatible configure will fail and
|
||||
suggest how you should rebuild your kernel.
|
||||
|
||||
* config/kernel-fmode-t.m4: Linux 2.6.28 compat, add a check for the
|
||||
fmode_t type. This typedef first appears in 2.6.28 kernels as part
|
||||
of some block device operation reworking.
|
||||
|
||||
* module/zfs/dmu_send.c: No inline to keep dmu_recv_stream() stack
|
||||
frame less than 1024 bytes. Recent builds against 2.6.31 flagged
|
||||
dmu_recv_stream() as stack heavy. Further analysis of this function
|
||||
should be performed to further reduce its stack usage.
|
||||
|
||||
* scripts/common.sh: Split the udev rule from a specific configuration
|
||||
by providing a generic 60-zpool.rules file which uses a small helper
|
||||
util 'zpool_id' to parse a configuration file by default located in
|
||||
/etc/zfs/zdev.conf. The helper script maps a by-path udev name to a
|
||||
more friendly name of <channel><rank> for large configurations.
|
||||
|
||||
Additionally, when running zpool-create.sh in-tree it will no longer
|
||||
use udev because we would have to copy certain helper scripts in to
|
||||
the installed system. To avoid this the config file in simply
|
||||
parsed and symlinks are created in your working tree. The script
|
||||
will use udev if it as run as part of an installed zfs-test package.
|
||||
|
||||
* module/zfs/zvol.c: Use check_disk_change() instead of
|
||||
revalidate_disk(). For 2.6.27 kernels are earlier revalidate_disk()
|
||||
was not available. However, check_disk_change() has been available
|
||||
for far longer and will properly inform the kernel of the volume
|
||||
change for both older and newer kernels.
|
||||
|
||||
* module/zfs/dmu.c: Fixed incorrect ASSERT3S() added by ZVOL.
|
||||
|
||||
* module/zfs/vdev_raidz.c, module/zfs/zvol.c: Minor fixes for 32-bit.
|
||||
|
||||
* scripts/zfs-update.sh, man/man8/*: Added man pages based on the
|
||||
latest documentation and modified zfs-update.sh script to update them.
|
||||
|
||||
* .gitignore: Updated .gitignore rules to exclude build products.
|
||||
|
||||
2009-11-24 Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
* : Tag zfs-0.4.7 - Use 'git log --no-merges' for full change log.
|
||||
|
||||
* module/zcommon/include/sys/fs/zfs.h, module/zfs/include/sys/blkdev.h,
|
||||
module/zfs/include/sys/dmu.h, module/zfs/dmu.c,
|
||||
module/zfs/include/sys/zvol.h, module/zfs/zvol.c,
|
||||
module/zfs/zfs_ioctl.c:
|
||||
Added the ZVOL block device, with the addition of the ZVOL real ZFS
|
||||
based block devices are available and can be compared head to head
|
||||
with Linux's MD and LVM block drivers. The Linux ZVOL has not yet
|
||||
had any performance work done but from a user perspective it should
|
||||
be functionally complete and behave like any other Linux block device.
|
||||
The ZVOL has so far been tested using zconfig.sh on the following
|
||||
x86_64 based platforms: FC11, CHAOS4, RHEL5, RHEL6, and SLES11.
|
||||
However, more testing is required to ensure everything is working
|
||||
as designed.
|
||||
|
||||
* scripts/udev-rules/99-zpool.rules.promise,
|
||||
scripts/zpool-config/promise-raid0-1x16.sh,
|
||||
scripts/zpool-config/promise-raid10-8x2.sh,
|
||||
scripts/zpool-config/promise-raidz-2x8.sh,
|
||||
scripts/zpool-config/promise-raidz2-2x8.sh:
|
||||
Additional test configurations for a small 16 drive JBOD.
|
||||
|
||||
* module/zfs/arc.c: Linux 2.6.31 compat, mutexes can now exceed 64
|
||||
bytes depending on the the kernel build options. To account for
|
||||
this increase the pad size to 256 bytes.
|
||||
|
||||
* module/zfs/vdev_disk.c: Linux 2.6.31 compat, to get the hard
|
||||
sector size use bdev_logical_block_size() this function replaces
|
||||
bdev_hardsect_size().
|
||||
|
||||
* module/zfs/zfs_rlock.c: Prevent gcc uninit compiler warning in
|
||||
zfs_range_unlock_reader().
|
||||
|
||||
* Makefile.am: Ensure *.order and *.markers build products are
|
||||
removed by distclean rule.
|
||||
|
||||
2009-11-02 Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
||||
* : Tag zfs-0.4.6 - Use 'git log --no-merges' for full change log.
|
||||
|
@ -333,7 +457,7 @@
|
|||
- Minor build system improvements
|
||||
- Minor script improvements
|
||||
- Create a full copy and not a link tree with quilt
|
||||
- KPIOS_MAJOR changed from 231 to 232
|
||||
- ZPIOS_MAJOR changed from 231 to 232
|
||||
- BIO_RW_BARRIER flag removed from IO request
|
||||
|
||||
2008-06-30 Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
|
|
4
META
4
META
|
@ -1,6 +1,8 @@
|
|||
Meta: 1
|
||||
Name: zfs
|
||||
Branch: 1.0
|
||||
Version: 0.4.6
|
||||
Version: 0.4.8
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: CDDL
|
||||
Author: Sun Microsystems/Oracle, Lawrence Livermore National Laboratory
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include $(top_srcdir)/config/rpm.am
|
||||
|
||||
if CONFIG_USER
|
||||
USER_DIR = config doc scripts lib cmd
|
||||
USER_DIR = config etc man scripts lib cmd
|
||||
endif
|
||||
if CONFIG_KERNEL
|
||||
KERNEL_DIR = module
|
||||
|
@ -9,10 +9,11 @@ endif
|
|||
SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dist-zip
|
||||
EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in
|
||||
EXTRA_DIST = autogen.sh config/config.awk
|
||||
EXTRA_DIST += zfs.spec.in zfs-modules.spec.in
|
||||
EXTRA_DIST += META DISCLAIMER GIT
|
||||
EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE
|
||||
noinst_HEADERS = zfs_config.h zfs_unconfig.h
|
||||
noinst_HEADERS = zfs_config.h
|
||||
|
||||
distclean-local::
|
||||
-$(RM) -R autom4te*.cache
|
||||
|
@ -23,6 +24,7 @@ distclean-local::
|
|||
-o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \
|
||||
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \
|
||||
-o -name 'Makefile' -o -name 'Module.symvers' \
|
||||
-o -name '*.order' -o -name '*.markers' \
|
||||
-o -name '.script-config' \) \
|
||||
-type f -print | xargs $(RM)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
SUBDIRS = zfs zpool zdb zinject ztest
|
||||
SUBDIRS = zfs zpool zpool_id zdb zinject ztest
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/zdb
|
|
@ -0,0 +1 @@
|
|||
/zfs
|
|
@ -0,0 +1 @@
|
|||
/zinject
|
|
@ -0,0 +1 @@
|
|||
/zpool
|
|
@ -7,6 +7,7 @@ DEFAULT_INCLUDES += \
|
|||
-I${top_srcdir}/lib/libzfs/include \
|
||||
-I${top_srcdir}/lib/libnvpair/include \
|
||||
-I${top_srcdir}/module/zcommon/include \
|
||||
-I${top_srcdir}/module/zfs/include \
|
||||
-I${top_srcdir}/module/nvpair/include \
|
||||
-I${top_srcdir}/module/avl/include \
|
||||
-I${top_srcdir}/module/unicode/include
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
dist_bin_SCRIPTS = zpool_id
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
|
||||
PATH_ID=${PATH_ID:-/lib/udev/path_id}
|
||||
AWK=${AWK:-/bin/awk}
|
||||
|
||||
die() {
|
||||
echo "Error: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat << EOF
|
||||
Usage: zpool_id [h] [-c configfile] <devpath>
|
||||
-c Alternate config file [default /etc/zfs/zdev.conf]
|
||||
-d Use path_id from device as the mapping key
|
||||
-h Show this message
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
while getopts 'c:d:h' OPTION; do
|
||||
case ${OPTION} in
|
||||
c)
|
||||
CONFIG=${OPTARG}
|
||||
;;
|
||||
d)
|
||||
DEVICE=${OPTARG}
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check that a device was requested
|
||||
[ -z ${DEVICE} ] && usage
|
||||
|
||||
# Check for the existence of a configuration file
|
||||
[ ! -f ${CONFIG} ] && die "Missing config file: ${CONFIG}"
|
||||
|
||||
# Use udev's path_id to generate a unique persistent key
|
||||
eval `${PATH_ID} ${DEVICE}`
|
||||
[ -z ${ID_PATH} ] && die "Missing ID_PATH for ${DEVICE}"
|
||||
|
||||
# Use the persistent key to lookup the zpool device id in the
|
||||
# configuration file which is of the format <device id> <key>.
|
||||
# Lines starting with #'s are treated as comments and ignored.
|
||||
# Exact matches are required, wild cards are not supported,
|
||||
# and only the first match is returned.
|
||||
ID_ZPOOL=`${AWK} "/${ID_PATH}\>/ && !/^#/ { print \\$1; exit }" ${CONFIG}`
|
||||
[ -z ${ID_ZPOOL} ] && die "Missing ID_ZPOOL for ID_PATH: ${ID_PATH}"
|
||||
|
||||
if [ ${ID_ZPOOL} ]; then
|
||||
echo "ID_PATH=${ID_PATH}"
|
||||
echo "ID_ZPOOL=${ID_ZPOOL}"
|
||||
echo "ID_ZPOOL_PATH=disk/zpool/${ID_ZPOOL}"
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1 @@
|
|||
/ztest
|
|
@ -58,6 +58,9 @@
|
|||
* the transaction group number is less than the current, open txg.
|
||||
* If you add a new test, please do this if applicable.
|
||||
*
|
||||
* (7) Threads are created with a reduced stack size, for sanity checking.
|
||||
* Therefore, it's important not to allocate huge buffers on the stack.
|
||||
*
|
||||
* When run with no arguments, ztest runs for about five minutes and
|
||||
* produces no output if successful. To get a little bit of information,
|
||||
* specify -V. To get more information, specify -VV, and so on.
|
||||
|
@ -141,7 +144,6 @@ typedef struct ztest_args {
|
|||
objset_t *za_os;
|
||||
zilog_t *za_zilog;
|
||||
kthread_t *za_thread;
|
||||
kt_did_t za_threadid;
|
||||
uint64_t za_instance;
|
||||
uint64_t za_random;
|
||||
uint64_t za_diroff;
|
||||
|
@ -157,6 +159,7 @@ typedef struct ztest_args {
|
|||
ztest_block_tag_t za_wbt;
|
||||
dmu_object_info_t za_doi;
|
||||
dmu_buf_t *za_dbuf;
|
||||
boolean_t za_exited;
|
||||
} ztest_args_t;
|
||||
|
||||
typedef void ztest_func_t(ztest_args_t *);
|
||||
|
@ -253,6 +256,8 @@ typedef struct ztest_shared {
|
|||
kmutex_t zs_sync_lock[ZTEST_SYNC_LOCKS];
|
||||
uint64_t zs_seq[ZTEST_SYNC_LOCKS];
|
||||
ztest_cb_list_t zs_cb_list;
|
||||
kmutex_t zs_thr_lock;
|
||||
kcondvar_t zs_thr_cv;
|
||||
} ztest_shared_t;
|
||||
|
||||
static char ztest_dev_template[] = "%s/%s.%llua";
|
||||
|
@ -264,6 +269,7 @@ static int ztest_dump_core = 1;
|
|||
|
||||
static uint64_t metaslab_sz;
|
||||
static boolean_t ztest_exiting;
|
||||
static boolean_t resume_thr_exited;
|
||||
|
||||
extern uint64_t metaslab_gang_bang;
|
||||
extern uint64_t metaslab_df_alloc_threshold;
|
||||
|
@ -2571,7 +2577,7 @@ ztest_dmu_write_parallel(ztest_args_t *za)
|
|||
uint64_t off, txg, txg_how;
|
||||
kmutex_t *lp;
|
||||
char osname[MAXNAMELEN];
|
||||
char iobuf[SPA_MAXBLOCKSIZE];
|
||||
char *iobuf;
|
||||
blkptr_t blk;
|
||||
uint64_t blkoff;
|
||||
zbookmark_t zb;
|
||||
|
@ -2741,6 +2747,8 @@ ztest_dmu_write_parallel(ztest_args_t *za)
|
|||
ASSERT3U(BP_GET_LEVEL(&blk), ==, 0);
|
||||
ASSERT3U(BP_GET_LSIZE(&blk), ==, bs);
|
||||
|
||||
iobuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
|
||||
|
||||
/*
|
||||
* Read the block that dmu_sync() returned to make sure its contents
|
||||
* match what we wrote. We do this while still txg_suspend()ed
|
||||
|
@ -2759,10 +2767,10 @@ ztest_dmu_write_parallel(ztest_args_t *za)
|
|||
bcopy(&iobuf[blkoff], rbt, btsize);
|
||||
|
||||
if (rbt->bt_objset == 0) /* concurrent free */
|
||||
return;
|
||||
goto out;
|
||||
|
||||
if (wbt->bt_objset == 0) /* all-zero overwrite */
|
||||
return;
|
||||
goto out;
|
||||
|
||||
ASSERT3U(rbt->bt_objset, ==, wbt->bt_objset);
|
||||
ASSERT3U(rbt->bt_object, ==, wbt->bt_object);
|
||||
|
@ -2778,6 +2786,8 @@ ztest_dmu_write_parallel(ztest_args_t *za)
|
|||
ASSERT3U(rbt->bt_seq, ==, wbt->bt_seq);
|
||||
else
|
||||
ASSERT3U(rbt->bt_seq, >, wbt->bt_seq);
|
||||
out:
|
||||
umem_free(iobuf, SPA_MAXBLOCKSIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3819,6 +3829,8 @@ ztest_resume_thread(void *arg)
|
|||
ztest_resume(spa);
|
||||
}
|
||||
|
||||
resume_thr_exited = B_TRUE;
|
||||
|
||||
thread_exit();
|
||||
return (NULL);
|
||||
}
|
||||
|
@ -3884,6 +3896,13 @@ ztest_thread(void *arg)
|
|||
break;
|
||||
}
|
||||
|
||||
mutex_enter(&zs->zs_thr_lock);
|
||||
za->za_exited = B_TRUE;
|
||||
mutex_exit(&zs->zs_thr_lock);
|
||||
|
||||
/* Announce that the thread has finished */
|
||||
cv_broadcast(&zs->zs_thr_cv);
|
||||
|
||||
thread_exit();
|
||||
return (NULL);
|
||||
}
|
||||
|
@ -3900,13 +3919,14 @@ ztest_run(char *pool)
|
|||
spa_t *spa;
|
||||
char name[100];
|
||||
kthread_t *resume_thread;
|
||||
kt_did_t resume_id;
|
||||
|
||||
ztest_exiting = B_FALSE;
|
||||
|
||||
mutex_init(&zs->zs_vdev_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
rw_init(&zs->zs_name_lock, NULL, RW_DEFAULT, NULL);
|
||||
mutex_init(&zs->zs_cb_list.zcl_callbacks_lock,NULL,MUTEX_DEFAULT,NULL);
|
||||
mutex_init(&zs->zs_thr_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
cv_init(&zs->zs_thr_cv, NULL, CV_DEFAULT, NULL);
|
||||
|
||||
list_create(&zs->zs_cb_list.zcl_callbacks, sizeof (ztest_cb_data_t),
|
||||
offsetof(ztest_cb_data_t, zcd_node));
|
||||
|
@ -3979,9 +3999,9 @@ ztest_run(char *pool)
|
|||
/*
|
||||
* Create a thread to periodically resume suspended I/O.
|
||||
*/
|
||||
resume_thr_exited = B_FALSE;
|
||||
VERIFY3P((resume_thread = thread_create(NULL, 0, ztest_resume_thread,
|
||||
spa, THR_BOUND, NULL, 0, 0)), !=, NULL);
|
||||
resume_id = resume_thread->t_tid;
|
||||
spa, TS_RUN, NULL, 0, 0)), !=, NULL);
|
||||
|
||||
/*
|
||||
* Verify that we can safely inquire about about any object,
|
||||
|
@ -4057,13 +4077,18 @@ ztest_run(char *pool)
|
|||
za[d].za_zilog = zil_open(za[d].za_os, NULL);
|
||||
}
|
||||
|
||||
za[t].za_exited = B_FALSE;
|
||||
|
||||
VERIFY3P((za[t].za_thread = thread_create(NULL, 0, ztest_thread,
|
||||
&za[t], THR_BOUND, NULL, 0, 0)), !=, NULL);
|
||||
za[t].za_threadid = za[t].za_thread->t_tid;
|
||||
&za[t], TS_RUN, NULL, 0, 0)), !=, NULL);
|
||||
}
|
||||
|
||||
while (--t >= 0) {
|
||||
VERIFY(thread_join(za[t].za_threadid, NULL, NULL) == 0);
|
||||
mutex_enter(&zs->zs_thr_lock);
|
||||
while (!za[t].za_exited)
|
||||
cv_wait(&zs->zs_thr_cv, &zs->zs_thr_lock);
|
||||
mutex_exit(&zs->zs_thr_lock);
|
||||
|
||||
if (t < zopt_datasets) {
|
||||
zil_close(za[t].za_zilog);
|
||||
dmu_objset_close(za[t].za_os);
|
||||
|
@ -4102,7 +4127,11 @@ ztest_run(char *pool)
|
|||
|
||||
/* Kill the resume thread */
|
||||
ztest_exiting = B_TRUE;
|
||||
VERIFY(thread_join(resume_id, NULL, NULL) == 0);
|
||||
|
||||
/* Wait for the resume thread to exit */
|
||||
while (!resume_thr_exited)
|
||||
(void) poll(NULL, 0, 200);
|
||||
|
||||
ztest_resume(spa);
|
||||
|
||||
/*
|
||||
|
@ -4118,6 +4147,8 @@ ztest_run(char *pool)
|
|||
|
||||
list_destroy(&zs->zs_cb_list.zcl_callbacks);
|
||||
|
||||
cv_destroy(&zs->zs_thr_cv);
|
||||
mutex_destroy(&zs->zs_thr_lock);
|
||||
mutex_destroy(&zs->zs_cb_list.zcl_callbacks_lock);
|
||||
rw_destroy(&zs->zs_name_lock);
|
||||
mutex_destroy(&zs->zs_vdev_lock);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
DEFAULT_INCLUDES = -I${top_srcdir}
|
||||
DEFAULT_INCLUDES = -include ${top_srcdir}/zfs_config.h
|
||||
|
||||
# FIXME: Add -Wshadow once everything is working
|
||||
AM_LIBTOOLFLAGS = --silent
|
||||
AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -Werror
|
||||
|
||||
# Expected defines not covered by zfs_config.h or spl_config.h
|
||||
AM_CFLAGS += -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT
|
||||
AM_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64
|
||||
AM_CFLAGS += -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\"
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# Remove default preprocessor define's from config.h
|
||||
# PACKAGE
|
||||
# PACKAGE_BUGREPORT
|
||||
# PACKAGE_NAME
|
||||
# PACKAGE_STRING
|
||||
# PACKAGE_TARNAME
|
||||
# PACKAGE_VERSION
|
||||
# STDC_HEADERS
|
||||
# VERSION
|
||||
|
||||
BEGIN { RS = "" ; FS = "\n" } \
|
||||
!/.#define PACKAGE./ && \
|
||||
!/.#define VERSION./ && \
|
||||
!/.#define STDC_HEADERS./ \
|
||||
{ print $0"\n" }
|
|
@ -0,0 +1,33 @@
|
|||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
|
||||
AC_MSG_CHECKING([block device operation prototypes])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
int (*blk_open) (struct block_device *, fmode_t) = NULL;
|
||||
int (*blk_release) (struct gendisk *, fmode_t) = NULL;
|
||||
int (*blk_ioctl) (struct block_device *, fmode_t,
|
||||
unsigned, unsigned long) = NULL;
|
||||
int (*blk_compat_ioctl) (struct block_device *, fmode_t,
|
||||
unsigned, unsigned long) = NULL;
|
||||
struct block_device_operations blk_ops = {
|
||||
.open = blk_open,
|
||||
.release = blk_release,
|
||||
.ioctl = blk_ioctl,
|
||||
.compat_ioctl = blk_compat_ioctl,
|
||||
};
|
||||
|
||||
blk_ops.open(NULL, 0);
|
||||
blk_ops.release(NULL, 0);
|
||||
blk_ops.ioctl(NULL, 0, 0, 0);
|
||||
blk_ops.compat_ioctl(NULL, 0, 0, 0);
|
||||
],[
|
||||
AC_MSG_RESULT(struct block_device)
|
||||
AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
|
||||
[struct block_device_operations use bdevs])
|
||||
],[
|
||||
AC_MSG_RESULT(struct inode)
|
||||
])
|
||||
])
|
|
@ -7,7 +7,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_SYNCIO], [
|
|||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/bio.h>
|
||||
],[
|
||||
int flags = BIO_RW_SYNCIO;
|
||||
int flags;
|
||||
flags = BIO_RW_SYNCIO;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BIO_RW_SYNCIO, 1,
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
dnl #
|
||||
dnl # 2.6.31 API change
|
||||
dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
|
||||
dnl # changed in 2.6.31 so it may be used by non-GPL modules.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
|
||||
AC_MSG_CHECKING([whether blk_end_request() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_end_request(req, 0, 0);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
|
||||
[blk_end_request() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/module.h>
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
MODULE_LICENSE("CDDL");
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_end_request(req, 0, 0);
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
|
||||
[blk_end_request() is GPL-only])
|
||||
])
|
||||
])
|
|
@ -0,0 +1,22 @@
|
|||
dnl #
|
||||
dnl # 2.6.31 API change
|
||||
dnl # Request queue peek/retrieval interface cleanup, the blk_fetch_request()
|
||||
dnl # function replaces the elv_next_request() and blk_fetch_request()
|
||||
dnl # functions. The updated blk_fetch_request() function returns the
|
||||
dnl # next available request and removed it from the request queue.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_FETCH_REQUEST], [
|
||||
AC_MSG_CHECKING([whether blk_fetch_request() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request_queue *q = NULL;
|
||||
(void) blk_fetch_request(q);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_FETCH_REQUEST, 1,
|
||||
[blk_fetch_request() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,22 @@
|
|||
dnl #
|
||||
dnl # 2.6.31 API change
|
||||
dnl # Request queue peek/retrieval interface cleanup, the
|
||||
dnl # elv_requeue_request() function has been replaced with the
|
||||
dnl # blk_requeue_request() function.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_REQUEUE_REQUEST], [
|
||||
AC_MSG_CHECKING([whether blk_requeue_request() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request_queue *q = NULL;
|
||||
struct request *req = NULL;
|
||||
blk_requeue_request(q, req);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_REQUEUE_REQUEST, 1,
|
||||
[blk_requeue_request() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,38 @@
|
|||
dnl #
|
||||
dnl # 2.6.29 API change
|
||||
dnl # In the 2.6.29 kernel blk_rq_bytes() was available as a GPL-only symbol.
|
||||
dnl # So we need to check the symbol license as well. As of 2.6.31 the
|
||||
dnl blk_rq_bytes() helper was changed to a static inline which we can use.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_BYTES], [
|
||||
AC_MSG_CHECKING([whether blk_rq_bytes() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_rq_bytes(req);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_RQ_BYTES, 1,
|
||||
[blk_rq_bytes() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether blk_rq_bytes() is GPL-only])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/module.h>
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
MODULE_LICENSE("CDDL");
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_rq_bytes(req);
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_RQ_BYTES_GPL_ONLY, 1,
|
||||
[blk_rq_bytes() is GPL-only])
|
||||
])
|
||||
])
|
|
@ -0,0 +1,18 @@
|
|||
dnl #
|
||||
dnl # 2.6.31 API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_POS], [
|
||||
AC_MSG_CHECKING([whether blk_rq_pos() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_rq_pos(req);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_RQ_POS, 1,
|
||||
[blk_rq_pos() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,18 @@
|
|||
dnl #
|
||||
dnl # 2.6.31 API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLK_RQ_SECTORS], [
|
||||
AC_MSG_CHECKING([whether blk_rq_sectors() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) blk_rq_sectors(req);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_RQ_SECTORS, 1,
|
||||
[blk_rq_sectors() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,18 @@
|
|||
dnl #
|
||||
dnl # 2.6.28 API change,
|
||||
dnl # check if fmode_t typedef is defined
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_TYPE_FMODE_T],
|
||||
[AC_MSG_CHECKING([whether kernel defines fmode_t])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/types.h>
|
||||
],[
|
||||
fmode_t *ptr;
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_FMODE_T, 1,
|
||||
[kernel defines fmode_t])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
|
@ -0,0 +1,18 @@
|
|||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
|
||||
AC_MSG_CHECKING([whether get_disk_ro() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct gendisk *disk = NULL;
|
||||
(void) get_disk_ro(disk);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GET_DISK_RO, 1,
|
||||
[blk_disk_ro() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,20 @@
|
|||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT], [
|
||||
AC_MSG_CHECKING([whether rq_for_each_segment() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct bio_vec *bv;
|
||||
struct req_iterator iter;
|
||||
struct request *req = NULL;
|
||||
rq_for_each_segment(bv, req, iter) { }
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_RQ_FOR_EACH_SEGMENT, 1,
|
||||
[rq_for_each_segment() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -0,0 +1,18 @@
|
|||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_RQ_IS_SYNC], [
|
||||
AC_MSG_CHECKING([whether rq_is_sync() is available])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
struct request *req = NULL;
|
||||
(void) rq_is_sync(req);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_RQ_IS_SYNC, 1,
|
||||
[rq_is_sync() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
|
@ -4,22 +4,33 @@ dnl #
|
|||
AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL
|
||||
ZFS_AC_SPL
|
||||
ZFS_AC_KERNEL_CONFIG
|
||||
ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
|
||||
ZFS_AC_KERNEL_TYPE_FMODE_T
|
||||
ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE
|
||||
ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
|
||||
ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE
|
||||
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
|
||||
ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
|
||||
ZFS_AC_KERNEL_BIO_RW_SYNCIO
|
||||
ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
|
||||
|
||||
dnl # Kernel build make options
|
||||
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
|
||||
KERNELMAKE_PARAMS=
|
||||
ZFS_AC_KERNEL_BLK_END_REQUEST
|
||||
ZFS_AC_KERNEL_BLK_FETCH_REQUEST
|
||||
ZFS_AC_KERNEL_BLK_REQUEUE_REQUEST
|
||||
ZFS_AC_KERNEL_BLK_RQ_BYTES
|
||||
ZFS_AC_KERNEL_BLK_RQ_POS
|
||||
ZFS_AC_KERNEL_BLK_RQ_SECTORS
|
||||
ZFS_AC_KERNEL_GET_DISK_RO
|
||||
ZFS_AC_KERNEL_RQ_IS_SYNC
|
||||
ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT
|
||||
|
||||
dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other
|
||||
dnl # compiler options are added by the kernel build system.
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -Werror -DHAVE_SPL -D_KERNEL"
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$TOPDIR -I$SPL -I$SPL/include"
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$SPL"
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$SPL/include"
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -include $SPL/spl_config.h"
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -include $TOPDIR/zfs_config.h"
|
||||
|
||||
if test "$LINUX_OBJ" != "$LINUX"; then
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
|
||||
|
@ -30,7 +41,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
|||
])
|
||||
|
||||
dnl #
|
||||
dnl # Detect name used more Module.symvers file
|
||||
dnl # Detect name used for Module.symvers file in kernel
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_MODULE_SYMVERS], [
|
||||
modpost=$LINUX/scripts/Makefile.modpost
|
||||
|
@ -64,8 +75,14 @@ AC_DEFUN([ZFS_AC_KERNEL], [
|
|||
|
||||
AC_MSG_CHECKING([kernel source directory])
|
||||
if test -z "$kernelsrc"; then
|
||||
sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1`
|
||||
headersdir="/lib/modules/$(uname -r)/build"
|
||||
if test -e "$headersdir"; then
|
||||
sourcelink=$(readlink -f "$headersdir")
|
||||
else
|
||||
sourcelink=$(ls -1d /usr/src/kernels/* \
|
||||
/usr/src/linux-* \
|
||||
2>/dev/null | grep -v obj | tail -1)
|
||||
fi
|
||||
|
||||
if test -e $sourcelink; then
|
||||
kernelsrc=`readlink -f ${sourcelink}`
|
||||
|
@ -135,7 +152,14 @@ AC_DEFUN([ZFS_AC_KERNEL], [
|
|||
])
|
||||
|
||||
dnl #
|
||||
dnl # Detect name used for the additional SPL Module.symvers file
|
||||
dnl # Detect name used for the additional SPL Module.symvers file. If one
|
||||
dnl # does not exist this is likely because the SPL has been configured
|
||||
dnl # but not built. To allow recursive builds a good guess is made as to
|
||||
dnl # what this file will be named based on what it is named in the kernel
|
||||
dnl # build products. This file will first be used at link time so if
|
||||
dnl # the guess is wrong the build will fail then. This unfortunately
|
||||
dnl # means the ZFS package does not contain a reliable mechanism to
|
||||
dnl # detect symbols exported by the SPL at configure time.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_SPL_MODULE_SYMVERS], [
|
||||
AC_MSG_CHECKING([spl file name for module symbols])
|
||||
|
@ -144,7 +168,7 @@ AC_DEFUN([ZFS_AC_SPL_MODULE_SYMVERS], [
|
|||
elif test -r $SPL_OBJ/Modules.symvers; then
|
||||
SPL_SYMBOLS=Modules.symvers
|
||||
else
|
||||
SPL_SYMBOLS=NONE
|
||||
SPL_SYMBOLS=$LINUX_SYMBOLS
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$SPL_SYMBOLS])
|
||||
|
@ -171,6 +195,10 @@ AC_DEFUN([ZFS_AC_SPL], [
|
|||
sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \
|
||||
2>/dev/null | tail -1`
|
||||
|
||||
if test -z "$sourcelink" || test ! -e $sourcelink; then
|
||||
sourcelink=../spl
|
||||
fi
|
||||
|
||||
if test -e $sourcelink; then
|
||||
splsrc=`readlink -f ${sourcelink}`
|
||||
else
|
||||
|
@ -227,6 +255,30 @@ AC_DEFUN([ZFS_AC_SPL], [
|
|||
ZFS_AC_SPL_MODULE_SYMVERS
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # There are certain kernel build options which when enabled are
|
||||
dnl # completely incompatible with non GPL kernel modules. It is best
|
||||
dnl # to detect these at configure time and fail with a clear error
|
||||
dnl # rather than build everything and fail during linking.
|
||||
dnl #
|
||||
dnl # CONFIG_DEBUG_LOCK_ALLOC - Maps mutex_lock() to mutex_lock_nested()
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
|
||||
|
||||
if test "$ZFS_META_LICENSE" = CDDL; then
|
||||
ZFS_LINUX_CONFIG([DEBUG_LOCK_ALLOC],
|
||||
AC_MSG_ERROR([
|
||||
*** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is
|
||||
*** incompatible with the CDDL license. You must rebuild
|
||||
*** your kernel without this option.]), [])
|
||||
fi
|
||||
|
||||
if test "$ZFS_META_LICENSE" = GPL; then
|
||||
AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
|
||||
[Define to 1 if licensed under the GPL])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LINUX_CONFTEST
|
||||
dnl #
|
||||
|
@ -307,7 +359,7 @@ dnl #
|
|||
AC_DEFUN([ZFS_CHECK_SYMBOL_EXPORT],
|
||||
[AC_MSG_CHECKING([whether symbol $1 is exported])
|
||||
grep -q -E '[[[:space:]]]$1[[[:space:]]]' \
|
||||
$LINUX_OBJ/Module*.symvers $SPL_OBJ/Module*.symvers 2>/dev/null
|
||||
$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
export=0
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
AC_DEFUN([ZFS_AC_LICENSE], [
|
||||
AC_MSG_CHECKING([zfs license])
|
||||
LICENSE=`grep MODULE_LICENSE module/zfs/zfs_ioctl.c | cut -f2 -d'"'`
|
||||
AC_MSG_RESULT([$LICENSE])
|
||||
if test "$LICENSE" = GPL; then
|
||||
AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
|
||||
[Define to 1 if module is licensed under the GPL])
|
||||
fi
|
||||
AC_MSG_CHECKING([zfs author])
|
||||
AC_MSG_RESULT([$ZFS_META_AUTHOR])
|
||||
|
||||
AC_SUBST(LICENSE)
|
||||
AC_MSG_CHECKING([zfs license])
|
||||
AC_MSG_RESULT([$ZFS_META_LICENSE])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_DEBUG], [
|
||||
|
@ -52,19 +48,22 @@ LIBDIR=${LIBDIR}
|
|||
CMDDIR=${CMDDIR}
|
||||
MODDIR=${MODDIR}
|
||||
SCRIPTDIR=${SCRIPTDIR}
|
||||
UDEVDIR=\${TOPDIR}/scripts/udev-rules
|
||||
ETCDIR=\${TOPDIR}/etc
|
||||
DEVDIR=\${TOPDIR}/dev
|
||||
ZPOOLDIR=\${TOPDIR}/scripts/zpool-config
|
||||
|
||||
ZDB=\${CMDDIR}/zdb/zdb
|
||||
ZFS=\${CMDDIR}/zfs/zfs
|
||||
ZINJECT=\${CMDDIR}/zinject/zinject
|
||||
ZPOOL=\${CMDDIR}/zpool/zpool
|
||||
ZPOOL_ID=\${CMDDIR}/zpool_id/zpool_id
|
||||
ZTEST=\${CMDDIR}/ztest/ztest
|
||||
|
||||
COMMON_SH=\${SCRIPTDIR}/common.sh
|
||||
ZFS_SH=\${SCRIPTDIR}/zfs.sh
|
||||
ZPOOL_CREATE_SH=\${SCRIPTDIR}/zpool-create.sh
|
||||
|
||||
INTREE=1
|
||||
LDMOD=/sbin/insmod
|
||||
|
||||
KERNEL_MODULES=( \\
|
||||
|
@ -98,6 +97,7 @@ AC_DEFUN([ZFS_AC_CONFIG], [
|
|||
CMDDIR=$TOPDIR/cmd
|
||||
MODDIR=$TOPDIR/module
|
||||
SCRIPTDIR=$TOPDIR/scripts
|
||||
TARGET_ASM_DIR=asm-generic
|
||||
|
||||
AC_SUBST(TOPDIR)
|
||||
AC_SUBST(BUILDDIR)
|
||||
|
@ -105,11 +105,12 @@ AC_DEFUN([ZFS_AC_CONFIG], [
|
|||
AC_SUBST(CMDDIR)
|
||||
AC_SUBST(MODDIR)
|
||||
AC_SUBST(SCRIPTDIR)
|
||||
AC_SUBST(TARGET_ASM_DIR)
|
||||
|
||||
ZFS_CONFIG=all
|
||||
AC_ARG_WITH([config],
|
||||
AS_HELP_STRING([--with-config=CONFIG],
|
||||
[Config file 'kernel|user|all']),
|
||||
[Config file 'kernel|user|all|srpm']),
|
||||
[ZFS_CONFIG="$withval"])
|
||||
|
||||
AC_MSG_CHECKING([zfs config])
|
||||
|
@ -121,10 +122,11 @@ AC_DEFUN([ZFS_AC_CONFIG], [
|
|||
user) ZFS_AC_CONFIG_USER ;;
|
||||
all) ZFS_AC_CONFIG_KERNEL
|
||||
ZFS_AC_CONFIG_USER ;;
|
||||
srpm) ;;
|
||||
*)
|
||||
AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Bad value "$ZFS_CONFIG" for --with-config,
|
||||
user kernel|user|all]) ;;
|
||||
user kernel|user|all|srpm]) ;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL([CONFIG_USER],
|
||||
|
|
|
@ -48,6 +48,14 @@ AC_DEFUN([ZFS_AC_META], [
|
|||
AC_SUBST([ZFS_META_RELEASE])
|
||||
fi
|
||||
|
||||
ZFS_META_LICENSE=_ZFS_AC_META_GETVAL([LICENSE]);
|
||||
if test -n "$ZFS_META_LICENSE"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_LICENSE], ["$ZFS_META_LICENSE"],
|
||||
[Define the project license.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_LICENSE])
|
||||
fi
|
||||
|
||||
if test -n "$ZFS_META_NAME" -a -n "$ZFS_META_VERSION"; then
|
||||
ZFS_META_ALIAS="$ZFS_META_NAME-$ZFS_META_VERSION"
|
||||
test -n "$ZFS_META_RELEASE" &&
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -35,10 +35,13 @@ AC_LANG(C)
|
|||
ZFS_AC_META
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([$ZFS_META_NAME], [$ZFS_META_VERSION])
|
||||
AC_CONFIG_HEADERS([zfs_config.h])
|
||||
AH_BOTTOM([#include <zfs_unconfig.h>])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_SILENT_RULES
|
||||
AM_INIT_AUTOMAKE([$ZFS_META_NAME], [$ZFS_META_VERSION])
|
||||
AC_CONFIG_HEADERS([zfs_config.h], [
|
||||
(mv zfs_config.h zfs_config.h.tmp &&
|
||||
awk -f config/config.awk zfs_config.h.tmp >zfs_config.h &&
|
||||
rm zfs_config.h.tmp) || exit 1])
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
|
@ -52,7 +55,9 @@ ZFS_AC_DEBUG
|
|||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
config/Makefile
|
||||
doc/Makefile
|
||||
etc/Makefile
|
||||
man/Makefile
|
||||
man/man8/Makefile
|
||||
lib/Makefile
|
||||
lib/libavl/Makefile
|
||||
lib/libefi/Makefile
|
||||
|
@ -67,6 +72,7 @@ AC_CONFIG_FILES([
|
|||
cmd/zfs/Makefile
|
||||
cmd/zinject/Makefile
|
||||
cmd/zpool/Makefile
|
||||
cmd/zpool_id/Makefile
|
||||
cmd/ztest/Makefile
|
||||
module/Makefile
|
||||
module/avl/Makefile
|
||||
|
|
113
doc/LEGAL
113
doc/LEGAL
|
@ -1,113 +0,0 @@
|
|||
From: Chris Dunlap <cdunlap@llnl.gov>
|
||||
To: tak1@llnl.gov (James Tak)
|
||||
Cc: rogers11@llnl.gov (Leah Rogers), garlick@llnl.gov (Jim Garlick),
|
||||
mgary@llnl.gov (Mark Gary), kimcupps@llnl.gov (Kim Cupps)
|
||||
Date: Mon, 26 Mar 2007 15:37:07 -0700
|
||||
Subject: CDDL/GPL licensing issues for ZFS Linux port
|
||||
|
||||
James,
|
||||
|
||||
We want to port Sun's Zettabyte File System (ZFS) to Linux and
|
||||
ultimately redistribute the source code of our work. We've been
|
||||
talking with Leah about this and have a meeting scheduled with you
|
||||
for this coming Thursday at 2pm. I just wanted to give you a summary
|
||||
before the meeting of what we're proposing.
|
||||
|
||||
ZFS is part of OpenSolaris which is licensed under the Common
|
||||
Development and Distribution License (CDDL):
|
||||
|
||||
http://www.opensolaris.org/os/licensing/cddllicense.txt
|
||||
|
||||
The Linux kernel is licensed under the GNU General Public License (GPL)
|
||||
(specifically, under version 2 of the license only):
|
||||
|
||||
http://www.fsf.org/licensing/licenses/gpl.html
|
||||
|
||||
While these are both Open-Source licenses, the Free Software Foundation
|
||||
(FSF) states they are incompatible with one another:
|
||||
|
||||
http://www.fsf.org/licensing/licenses/index_html
|
||||
|
||||
"[CDDL] is a free software license which is not a strong copyleft;
|
||||
it has some complex restrictions that make it incompatible with the
|
||||
GNU GPL. It requires that all attribution notices be maintained,
|
||||
while the GPL only requires certain types of notices. Also, it
|
||||
terminates in retaliation for certain aggressive uses of patents.
|
||||
So, a module covered by the GPL and a module covered by the CDDL
|
||||
cannot legally be linked together."
|
||||
|
||||
As an aside, Sun is reportedly considering releasing OpenSolaris under
|
||||
GPL3 (i.e., the upcoming version 3 of the GNU General Public License):
|
||||
|
||||
http://blogs.sun.com/jonathan/entry/hp_and_sun_partnering_around
|
||||
|
||||
http://arstechnica.com/news.ars/post/20060130-6074.html
|
||||
|
||||
http://news.com.com/Sun+considers+GPL+3+license+for+Solaris/2100-1016_3-6032893.html
|
||||
|
||||
Since the GPL3 has not been finalized, it is unclear whether
|
||||
incompatibilities will exist between GPL2 and GPL3.
|
||||
|
||||
Linus Torvalds (the original creator of Linux) describes his views
|
||||
on the licensing of Linux kernel modules in the following email thread:
|
||||
|
||||
http://linuxmafia.com/faq/Kernel/proprietary-kernel-modules.html
|
||||
|
||||
Most of this thread is in regards to proprietary closed-source
|
||||
binary-only modules for Linux. Linus generally considers modules
|
||||
written for Linux using the kernel infrastructures to be derived
|
||||
works of Linux, even if they don't copy any existing Linux code.
|
||||
However, he specifically singles out drivers and filesystems ported
|
||||
from other operating systems as not being derived works:
|
||||
|
||||
"It would be rather preposterous to call the Andrew FileSystem a
|
||||
'derived work' of Linux, for example, so I think it's perfectly
|
||||
OK to have a AFS module, for example."
|
||||
|
||||
"The original binary-only modules were for things that were
|
||||
pre-existing works of code, i.e., drivers and filesystems ported
|
||||
from other operating systems, which thus could clearly be argued
|
||||
to not be derived works..."
|
||||
|
||||
Based on this, it seems our port of Sun's ZFS filesystem to Linux
|
||||
would not be considered a derived work of Linux, and therefore not
|
||||
covered by the GPL. The issue of the CDDL/GPL license incompatibility
|
||||
becomes moot. As such, we should be able to redistribute our changes
|
||||
to ZFS in source-code form licensed under the CDDL since this will
|
||||
be a derived work of the original ZFS code. There seems to be some
|
||||
dissent as to whether a binary module could be redistributed as well,
|
||||
but that issue does not concern us. In this instance, we are only
|
||||
interested in redistribution of our work in source-code form.
|
||||
|
||||
-Chris
|
||||
|
||||
To: Chris Dunlap <cdunlap@llnl.gov>
|
||||
From: James Tak <tak1@llnl.gov>
|
||||
Subject: Re: CDDL/GPL licensing issues for ZFS Linux port
|
||||
Cc: rogers11@llnl.gov (Leah Rogers), garlick@llnl.gov (Jim Garlick),
|
||||
mgary@llnl.gov (Mark Gary), kimcupps@llnl.gov (Kim Cupps)
|
||||
Date: Thu, 29 Mar 2007 14:53:01 -0700
|
||||
|
||||
Hi Chris,
|
||||
As per our discussion today, the ZFS port you are proposing releasing under
|
||||
the CDDL license should be o.k. since it is a derivative work of the
|
||||
original ZFS module (under CDDL) and is therefore also subject to CDDL
|
||||
under the distribution terms of that license. While the issue of linking
|
||||
has been greatly debated in the OS community, I think it is fair to say in
|
||||
this instance the ZFS port is not a derivative work of Linux and thus not
|
||||
subject to the GPL. Furthermore, it shouldn't be a problem especially
|
||||
since even Linus Torvald has expressed that modules such as yours are not
|
||||
derived works of Linux.
|
||||
|
||||
Let me know if you have any further questions at x27274. Thanks.
|
||||
|
||||
Regards,
|
||||
James
|
||||
|
||||
James S. Tak
|
||||
Assistant Laboratory Counsel for Intellectual Property
|
||||
Office of Laboratory Counsel
|
||||
Lawrence Livermore National Laboratory
|
||||
phone: (925) 422-7274
|
||||
fax: (925) 423-2231
|
||||
tak1@llnl.gov
|
|
@ -1 +0,0 @@
|
|||
EXTRA_DIST = LEGAL
|
|
@ -0,0 +1,3 @@
|
|||
sysconfdir = /etc
|
||||
nobase_dist_sysconf_DATA = zfs/*
|
||||
nobase_dist_sysconf_DATA += udev/rules.d/*
|
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# /etc/udev/rules.d/99-zpool.rules
|
||||
#
|
||||
|
||||
ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/bin/zpool_id -d %p"
|
||||
|
||||
KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}"
|
||||
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}-part%n"
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Custom by-path mapping for large JBOD configurations
|
||||
#
|
||||
# Example Config: Desktop
|
||||
#
|
||||
|
||||
#<ID> <by-path name>
|
||||
#disk1 pci-0000:61:06.1-scsi-0:0:0:0
|
||||
#disk2 pci-0000:61:06.1-scsi-0:0:0:1
|
|
@ -0,0 +1,176 @@
|
|||
#
|
||||
# Custom by-path mapping for large JBOD configurations
|
||||
#
|
||||
# Example Config:
|
||||
# Quarter scale dragon drawer based SSU for RHEL6
|
||||
#
|
||||
|
||||
# Channel A: PCI Bus 3, Enclosure 0x50001ff10e991000
|
||||
a1 pci-0000:03:00.0-sas-0x50001ff10e991000-34
|
||||
a2 pci-0000:03:00.0-sas-0x50001ff10e991000-35
|
||||
a3 pci-0000:03:00.0-sas-0x50001ff10e991000-39
|
||||
a4 pci-0000:03:00.0-sas-0x50001ff10e991000-40
|
||||
a5 pci-0000:03:00.0-sas-0x50001ff10e991000-44
|
||||
a6 pci-0000:03:00.0-sas-0x50001ff10e991000-45
|
||||
a7 pci-0000:03:00.0-sas-0x50001ff10e991000-48
|
||||
a8 pci-0000:03:00.0-sas-0x50001ff10e991000-49
|
||||
a9 pci-0000:03:00.0-sas-0x50001ff10e991000-50
|
||||
a10 pci-0000:03:00.0-sas-0x50001ff10e991000-53
|
||||
a11 pci-0000:03:00.0-sas-0x50001ff10e991000-54
|
||||
a12 pci-0000:03:00.0-sas-0x50001ff10e991000-55
|
||||
a13 pci-0000:03:00.0-sas-0x50001ff10e991000-58
|
||||
a14 pci-0000:03:00.0-sas-0x50001ff10e991000-59
|
||||
a15 pci-0000:03:00.0-sas-0x50001ff10e991000-60
|
||||
|
||||
# Channel B: PCI Bus 3, Enclosure 0x50001ff10e9d1000
|
||||
b1 pci-0000:03:00.0-sas-0x50001ff10e9d1000-34
|
||||
b2 pci-0000:03:00.0-sas-0x50001ff10e9d1000-35
|
||||
b3 pci-0000:03:00.0-sas-0x50001ff10e9d1000-39
|
||||
b4 pci-0000:03:00.0-sas-0x50001ff10e9d1000-40
|
||||
b5 pci-0000:03:00.0-sas-0x50001ff10e9d1000-44
|
||||
b6 pci-0000:03:00.0-sas-0x50001ff10e9d1000-45
|
||||
b7 pci-0000:03:00.0-sas-0x50001ff10e9d1000-48
|
||||
b8 pci-0000:03:00.0-sas-0x50001ff10e9d1000-49
|
||||
b9 pci-0000:03:00.0-sas-0x50001ff10e9d1000-50
|
||||
b10 pci-0000:03:00.0-sas-0x50001ff10e9d1000-53
|
||||
b11 pci-0000:03:00.0-sas-0x50001ff10e9d1000-54
|
||||
b12 pci-0000:03:00.0-sas-0x50001ff10e9d1000-55
|
||||
b13 pci-0000:03:00.0-sas-0x50001ff10e9d1000-58
|
||||
b14 pci-0000:03:00.0-sas-0x50001ff10e9d1000-59
|
||||
b15 pci-0000:03:00.0-sas-0x50001ff10e9d1000-60
|
||||
|
||||
# Channel C: PCI Bus 4, Enclosure 0x50001ff10e991000
|
||||
c1 pci-0000:04:00.0-sas-0x50001ff10e991000-31
|
||||
c2 pci-0000:04:00.0-sas-0x50001ff10e991000-32
|
||||
c3 pci-0000:04:00.0-sas-0x50001ff10e991000-33
|
||||
c4 pci-0000:04:00.0-sas-0x50001ff10e991000-36
|
||||
c5 pci-0000:04:00.0-sas-0x50001ff10e991000-37
|
||||
c6 pci-0000:04:00.0-sas-0x50001ff10e991000-38
|
||||
c7 pci-0000:04:00.0-sas-0x50001ff10e991000-41
|
||||
c8 pci-0000:04:00.0-sas-0x50001ff10e991000-42
|
||||
c9 pci-0000:04:00.0-sas-0x50001ff10e991000-43
|
||||
c10 pci-0000:04:00.0-sas-0x50001ff10e991000-46
|
||||
c11 pci-0000:04:00.0-sas-0x50001ff10e991000-47
|
||||
c12 pci-0000:04:00.0-sas-0x50001ff10e991000-51
|
||||
c13 pci-0000:04:00.0-sas-0x50001ff10e991000-52
|
||||
c14 pci-0000:04:00.0-sas-0x50001ff10e991000-56
|
||||
c15 pci-0000:04:00.0-sas-0x50001ff10e991000-57
|
||||
|
||||
# Channel D: PCI Bus 4, Enclosure 0x50001ff10e9d1000
|
||||
d1 pci-0000:04:00.0-sas-0x50001ff10e9d1000-31
|
||||
d2 pci-0000:04:00.0-sas-0x50001ff10e9d1000-32
|
||||
d3 pci-0000:04:00.0-sas-0x50001ff10e9d1000-33
|
||||
d4 pci-0000:04:00.0-sas-0x50001ff10e9d1000-36
|
||||
d5 pci-0000:04:00.0-sas-0x50001ff10e9d1000-37
|
||||
d6 pci-0000:04:00.0-sas-0x50001ff10e9d1000-38
|
||||
d7 pci-0000:04:00.0-sas-0x50001ff10e9d1000-41
|
||||
d8 pci-0000:04:00.0-sas-0x50001ff10e9d1000-42
|
||||
d9 pci-0000:04:00.0-sas-0x50001ff10e9d1000-43
|
||||
d10 pci-0000:04:00.0-sas-0x50001ff10e9d1000-46
|
||||
d11 pci-0000:04:00.0-sas-0x50001ff10e9d1000-47
|
||||
d12 pci-0000:04:00.0-sas-0x50001ff10e9d1000-51
|
||||
d13 pci-0000:04:00.0-sas-0x50001ff10e9d1000-52
|
||||
d14 pci-0000:04:00.0-sas-0x50001ff10e9d1000-56
|
||||
d15 pci-0000:04:00.0-sas-0x50001ff10e9d1000-57
|
||||
|
||||
# Channel E: PCI Bus 84, Enclosure 0x50001ff10e991000
|
||||
e1 pci-0000:84:00.0-sas-0x50001ff10e991000-3
|
||||
e2 pci-0000:84:00.0-sas-0x50001ff10e991000-4
|
||||
e3 pci-0000:84:00.0-sas-0x50001ff10e991000-5
|
||||
e4 pci-0000:84:00.0-sas-0x50001ff10e991000-8
|
||||
e5 pci-0000:84:00.0-sas-0x50001ff10e991000-9
|
||||
e6 pci-0000:84:00.0-sas-0x50001ff10e991000-10
|
||||
e7 pci-0000:84:00.0-sas-0x50001ff10e991000-13
|
||||
e8 pci-0000:84:00.0-sas-0x50001ff10e991000-14
|
||||
e9 pci-0000:84:00.0-sas-0x50001ff10e991000-15
|
||||
e10 pci-0000:84:00.0-sas-0x50001ff10e991000-19
|
||||
e11 pci-0000:84:00.0-sas-0x50001ff10e991000-20
|
||||
e12 pci-0000:84:00.0-sas-0x50001ff10e991000-24
|
||||
e13 pci-0000:84:00.0-sas-0x50001ff10e991000-25
|
||||
e14 pci-0000:84:00.0-sas-0x50001ff10e991000-29
|
||||
e15 pci-0000:84:00.0-sas-0x50001ff10e991000-30
|
||||
|
||||
# Channel F: PCI Bus 84, Enclosure 0x50001ff10e9d1000
|
||||
f1 pci-0000:84:00.0-sas-0x50001ff10e9d1000-3
|
||||
f2 pci-0000:84:00.0-sas-0x50001ff10e9d1000-4
|
||||
f3 pci-0000:84:00.0-sas-0x50001ff10e9d1000-5
|
||||
f4 pci-0000:84:00.0-sas-0x50001ff10e9d1000-8
|
||||
f5 pci-0000:84:00.0-sas-0x50001ff10e9d1000-9
|
||||
f6 pci-0000:84:00.0-sas-0x50001ff10e9d1000-10
|
||||
f7 pci-0000:84:00.0-sas-0x50001ff10e9d1000-13
|
||||
f8 pci-0000:84:00.0-sas-0x50001ff10e9d1000-14
|
||||
f9 pci-0000:84:00.0-sas-0x50001ff10e9d1000-15
|
||||
f10 pci-0000:84:00.0-sas-0x50001ff10e9d1000-19
|
||||
f11 pci-0000:84:00.0-sas-0x50001ff10e9d1000-20
|
||||
f12 pci-0000:84:00.0-sas-0x50001ff10e9d1000-24
|
||||
f13 pci-0000:84:00.0-sas-0x50001ff10e9d1000-25
|
||||
f14 pci-0000:84:00.0-sas-0x50001ff10e9d1000-29
|
||||
f15 pci-0000:84:00.0-sas-0x50001ff10e9d1000-30
|
||||
|
||||
# Channel G: PCI Bus 85, Enclosure 0x50001ff10e991000
|
||||
g1 pci-0000:85:00.0-sas-0x50001ff10e991000-1
|
||||
g2 pci-0000:85:00.0-sas-0x50001ff10e991000-2
|
||||
g3 pci-0000:85:00.0-sas-0x50001ff10e991000-6
|
||||
g4 pci-0000:85:00.0-sas-0x50001ff10e991000-7
|
||||
g5 pci-0000:85:00.0-sas-0x50001ff10e991000-11
|
||||
g6 pci-0000:85:00.0-sas-0x50001ff10e991000-12
|
||||
g7 pci-0000:85:00.0-sas-0x50001ff10e991000-16
|
||||
g8 pci-0000:85:00.0-sas-0x50001ff10e991000-17
|
||||
g9 pci-0000:85:00.0-sas-0x50001ff10e991000-18
|
||||
g10 pci-0000:85:00.0-sas-0x50001ff10e991000-21
|
||||
g11 pci-0000:85:00.0-sas-0x50001ff10e991000-22
|
||||
g12 pci-0000:85:00.0-sas-0x50001ff10e991000-23
|
||||
g13 pci-0000:85:00.0-sas-0x50001ff10e991000-26
|
||||
g14 pci-0000:85:00.0-sas-0x50001ff10e991000-27
|
||||
g15 pci-0000:85:00.0-sas-0x50001ff10e991000-28
|
||||
|
||||
# Channel H: PCI Bus 85, Enclosure 0x50001ff10e9d1000
|
||||
h1 pci-0000:85:00.0-sas-0x50001ff10e9d1000-1
|
||||
h2 pci-0000:85:00.0-sas-0x50001ff10e9d1000-2
|
||||
h3 pci-0000:85:00.0-sas-0x50001ff10e9d1000-6
|
||||
h4 pci-0000:85:00.0-sas-0x50001ff10e9d1000-7
|
||||
h5 pci-0000:85:00.0-sas-0x50001ff10e9d1000-11
|
||||
h6 pci-0000:85:00.0-sas-0x50001ff10e9d1000-12
|
||||
h7 pci-0000:85:00.0-sas-0x50001ff10e9d1000-16
|
||||
h8 pci-0000:85:00.0-sas-0x50001ff10e9d1000-17
|
||||
h9 pci-0000:85:00.0-sas-0x50001ff10e9d1000-18
|
||||
h10 pci-0000:85:00.0-sas-0x50001ff10e9d1000-21
|
||||
h11 pci-0000:85:00.0-sas-0x50001ff10e9d1000-22
|
||||
h12 pci-0000:85:00.0-sas-0x50001ff10e9d1000-23
|
||||
h13 pci-0000:85:00.0-sas-0x50001ff10e9d1000-26
|
||||
h14 pci-0000:85:00.0-sas-0x50001ff10e9d1000-27
|
||||
h15 pci-0000:85:00.0-sas-0x50001ff10e9d1000-28
|
||||
|
||||
# Channel I: PCI Bus 83, Enclosure 0x5000155359b8e33f
|
||||
i1 pci-0000:83:00.0-sas-0x5000155359b8e33f-0
|
||||
i2 pci-0000:83:00.0-sas-0x5000155359b8e33f-1
|
||||
i3 pci-0000:83:00.0-sas-0x5000155359b8e33f-2
|
||||
i4 pci-0000:83:00.0-sas-0x5000155359b8e33f-3
|
||||
i5 pci-0000:83:00.0-sas-0x5000155359b8e33f-4
|
||||
i6 pci-0000:83:00.0-sas-0x5000155359b8e33f-5
|
||||
i7 pci-0000:83:00.0-sas-0x5000155359b8e33f-6
|
||||
i8 pci-0000:83:00.0-sas-0x5000155359b8e33f-7
|
||||
i9 pci-0000:83:00.0-sas-0x5000155359b8e33f-8
|
||||
i10 pci-0000:83:00.0-sas-0x5000155359b8e33f-9
|
||||
i11 pci-0000:83:00.0-sas-0x5000155359b8e33f-10
|
||||
i12 pci-0000:83:00.0-sas-0x5000155359b8e33f-11
|
||||
i13 pci-0000:83:00.0-sas-0x5000155359b8e33f-12
|
||||
i14 pci-0000:83:00.0-sas-0x5000155359b8e33f-13
|
||||
i15 pci-0000:83:00.0-sas-0x5000155359b8e33f-14
|
||||
|
||||
# Channel J: PCI Bus 83, Enclosure 0x5000155359dba33f
|
||||
j1 pci-0000:83:00.0-sas-0x5000155359dba33f-0
|
||||
j2 pci-0000:83:00.0-sas-0x5000155359dba33f-1
|
||||
j3 pci-0000:83:00.0-sas-0x5000155359dba33f-2
|
||||
j4 pci-0000:83:00.0-sas-0x5000155359dba33f-3
|
||||
j5 pci-0000:83:00.0-sas-0x5000155359dba33f-4
|
||||
j6 pci-0000:83:00.0-sas-0x5000155359dba33f-5
|
||||
j7 pci-0000:83:00.0-sas-0x5000155359dba33f-6
|
||||
j8 pci-0000:83:00.0-sas-0x5000155359dba33f-7
|
||||
j9 pci-0000:83:00.0-sas-0x5000155359dba33f-8
|
||||
j10 pci-0000:83:00.0-sas-0x5000155359dba33f-9
|
||||
j11 pci-0000:83:00.0-sas-0x5000155359dba33f-10
|
||||
j12 pci-0000:83:00.0-sas-0x5000155359dba33f-11
|
||||
j13 pci-0000:83:00.0-sas-0x5000155359dba33f-12
|
||||
j14 pci-0000:83:00.0-sas-0x5000155359dba33f-13
|
||||
j15 pci-0000:83:00.0-sas-0x5000155359dba33f-14
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Custom by-path mapping for large JBOD configurations
|
||||
#
|
||||
# Example Config:
|
||||
# Single Supermicro JBOD for RHEL6
|
||||
#
|
||||
|
||||
# Channel A: PCI Bus 7, Enclosure 0x500304800027367f
|
||||
a1 pci-0000:07:00.0-sas-0x500304800027367f-0
|
||||
a2 pci-0000:07:00.0-sas-0x500304800027367f-1
|
||||
a3 pci-0000:07:00.0-sas-0x500304800027367f-2
|
||||
a4 pci-0000:07:00.0-sas-0x500304800027367f-3
|
||||
|
||||
# Channel B: PCI Bus 7, Enclosure 0x500304800027367f
|
||||
b1 pci-0000:07:00.0-sas-0x500304800027367f-4
|
||||
b2 pci-0000:07:00.0-sas-0x500304800027367f-5
|
||||
b3 pci-0000:07:00.0-sas-0x500304800027367f-6
|
||||
b4 pci-0000:07:00.0-sas-0x500304800027367f-7
|
||||
|
||||
# Channel C: PCI Bus 7, Enclosure 0x500304800027367f
|
||||
c1 pci-0000:07:00.0-sas-0x500304800027367f-8
|
||||
c2 pci-0000:07:00.0-sas-0x500304800027367f-9
|
||||
c3 pci-0000:07:00.0-sas-0x500304800027367f-10
|
||||
c4 pci-0000:07:00.0-sas-0x500304800027367f-11
|
||||
|
||||
# Channel D: PCI Bus 7, Enclosure 0x500304800027367f
|
||||
d1 pci-0000:07:00.0-sas-0x500304800027367f-12
|
||||
d2 pci-0000:07:00.0-sas-0x500304800027367f-13
|
||||
d3 pci-0000:07:00.0-sas-0x500304800027367f-14
|
||||
d4 pci-0000:07:00.0-sas-0x500304800027367f-15
|
|
@ -0,0 +1,66 @@
|
|||
#
|
||||
# Custom by-path mapping for large JBOD configurations
|
||||
#
|
||||
# Example Config:
|
||||
# Sun x4550 for RHEL5
|
||||
#
|
||||
|
||||
# Channel A: PCI Bus 2
|
||||
a1 pci-0000:02:00.0-sas-0x50062b0000000001:1:0-0xd6807184d601e192:0
|
||||
a2 pci-0000:02:00.0-sas-0x50062b0000000002:1:1-0xd4905378e6e3d592:1
|
||||
a3 pci-0000:02:00.0-sas-0x50062b0000000003:1:2-0xd3827673d806d392:2
|
||||
a4 pci-0000:02:00.0-sas-0x50062b0000000004:1:3-0xd6805385d6e3e192:3
|
||||
a5 pci-0000:02:00.0-sas-0x50062b0000000005:1:4-0xd680655bd6f5b792:4
|
||||
a6 pci-0000:02:00.0-sas-0x50062b0000000006:1:5-0x7a967598ec06d091:5
|
||||
a7 pci-0000:02:00.0-sas-0x50062b0000000007:1:6-0xd3826c60d8fcbf92:6
|
||||
a8 pci-0000:02:00.0-sas-0x50062b0000000008:1:7-0xd6805271d6e2cd92:7
|
||||
|
||||
# Channel B: PCI Bus 3
|
||||
b1 pci-0000:03:00.0-sas-0x50062b0000000002:1:0-0xd680685fd6f8bb92:0
|
||||
b2 pci-0000:03:00.0-sas-0x50062b0000000003:1:1-0xd58c706de200cb92:1
|
||||
b3 pci-0000:03:00.0-sas-0x50062b0000000004:1:2-0xd5897480df04de92:2
|
||||
b4 pci-0000:03:00.0-sas-0x50062b0000000005:1:3-0xd6805764d6e7c092:3
|
||||
b5 pci-0000:03:00.0-sas-0x50062b0000000006:1:4-0xd6806a6dd6fac992:4
|
||||
b6 pci-0000:03:00.0-sas-0x50062b0000000007:1:5-0xd58c6b84e2fbe192:5
|
||||
b7 pci-0000:03:00.0-sas-0x50062b0000000008:1:6-0xd58a576ee0e7cb92:6
|
||||
b8 pci-0000:03:00.0-sas-0x50062b0000000009:1:7-0xd5877871dd08cf92:7
|
||||
|
||||
# Channel C: PCI Bus 4
|
||||
c1 pci-0000:04:00.0-sas-0x50062b0000000003:1:0-0xd6806678d6f6d492:0
|
||||
c2 pci-0000:04:00.0-sas-0x50062b0000000004:1:1-0xd680696fd6f9cb92:1
|
||||
c3 pci-0000:04:00.0-sas-0x50062b0000000005:1:2-0xd3827182d801e292:2
|
||||
c4 pci-0000:04:00.0-sas-0x50062b0000000006:1:3-0xd680666fd6f6cb92:3
|
||||
c5 pci-0000:04:00.0-sas-0x50062b0000000007:1:4-0xd6806970d6f9cc92:4
|
||||
c6 pci-0000:04:00.0-sas-0x50062b0000000008:1:5-0xd6806b62d6fbbe92:5
|
||||
c7 pci-0000:04:00.0-sas-0x50062b0000000009:1:6-0xd58a5760e0e7bd92:6
|
||||
c8 pci-0000:04:00.0-sas-0x50062b000000000a:1:7-0xd680717fd601dc92:7
|
||||
|
||||
# Channel D: PCI Bus 41
|
||||
d1 pci-0000:41:00.0-sas-0x50062b0000000004:1:0-0xd6806572d6f5ce92:0
|
||||
d2 pci-0000:41:00.0-sas-0x50062b0000000005:1:1-0xd6806983d6f9df92:1
|
||||
d3 pci-0000:41:00.0-sas-0x50062b0000000006:1:2-0xd3826c69d8fcc892:2
|
||||
d4 pci-0000:41:00.0-sas-0x50062b0000000007:1:3-0xd680725fd602bc92:3
|
||||
d5 pci-0000:41:00.0-sas-0x50062b0000000008:1:4-0xd6806971d6f9cd92:4
|
||||
d6 pci-0000:41:00.0-sas-0x50062b0000000009:1:5-0xd680726dd602ca92:5
|
||||
d7 pci-0000:41:00.0-sas-0x50062b000000000a:1:6-0xd3827772d807d292:6
|
||||
d8 pci-0000:41:00.0-sas-0x50062b000000000b:1:7-0xd4955584ebe5e192:7
|
||||
|
||||
# Channel E: PCI Bus 42
|
||||
e1 pci-0000:42:00.0-sas-0x50062b0000000005:1:0-0xd4925676e8e6d392:0
|
||||
e2 pci-0000:42:00.0-sas-0x50062b0000000006:1:1-0xd6806b6ed6fbca92:1
|
||||
e3 pci-0000:42:00.0-sas-0x50062b0000000007:1:2-0xd382765fd806bf92:2
|
||||
e4 pci-0000:42:00.0-sas-0x50062b0000000008:1:3-0xd587786cdd08ca92:3
|
||||
e5 pci-0000:42:00.0-sas-0x50062b0000000009:1:4-0xd66f4e5bc5deb792:4
|
||||
e6 pci-0000:42:00.0-sas-0x50062b000000000a:1:5-0xd6806879d6f8d592:5
|
||||
e7 pci-0000:42:00.0-sas-0x50062b000000000b:1:6-0xd5885175dee1d292:6
|
||||
e8 pci-0000:42:00.0-sas-0x50062b000000000c:1:7-0xd588515fdee1bc92:7
|
||||
|
||||
# Channel F: PCI Bus 43
|
||||
f1 pci-0000:43:00.0-sas-0x50062b0000000006:1:0-0xd66d6978c3f9d492:0
|
||||
f2 pci-0000:43:00.0-sas-0x50062b0000000007:1:1-0xd6806a5cd6fab892:1
|
||||
f3 pci-0000:43:00.0-sas-0x50062b0000000008:1:2-0xd6806563d6f5bf92:2
|
||||
f4 pci-0000:43:00.0-sas-0x50062b0000000009:1:3-0xd6805664d6e6c092:3
|
||||
f5 pci-0000:43:00.0-sas-0x50062b000000000a:1:4-0xd58c707ee200dc92:4
|
||||
f6 pci-0000:43:00.0-sas-0x50062b000000000b:1:5-0xd5885781dee7de92:5
|
||||
f7 pci-0000:43:00.0-sas-0x50062b000000000c:1:6-0xd3827481d804e192:6
|
||||
f8 pci-0000:43:00.0-sas-0x50062b000000000d:1:7-0xd6806863d6f8bf92:7
|
|
@ -11,6 +11,7 @@ libnvpair_la_SOURCES = \
|
|||
${top_srcdir}/lib/libnvpair/libnvpair.c \
|
||||
${top_srcdir}/lib/libnvpair/nvpair_alloc_system.c \
|
||||
${top_srcdir}/lib/libnvpair/include/libnvpair.h \
|
||||
${top_srcdir}/module/nvpair/nvpair_alloc_fixed.c \
|
||||
${top_srcdir}/module/nvpair/nvpair.c \
|
||||
${top_srcdir}/module/nvpair/include/sys/nvpair.h \
|
||||
${top_srcdir}/module/nvpair/include/sys/nvpair_impl.h
|
||||
|
|
|
@ -23,7 +23,6 @@ libzpool_la_SOURCES = \
|
|||
${top_srcdir}/module/zcommon/zfs_prop.c \
|
||||
${top_srcdir}/module/zcommon/zpool_prop.c \
|
||||
${top_srcdir}/module/zcommon/zprop_common.c \
|
||||
${top_srcdir}/module/zcommon/include/sys/fm/fs/zfs.h \
|
||||
${top_srcdir}/module/zcommon/include/sys/fs \
|
||||
${top_srcdir}/module/zcommon/include/sys/fs/zfs.h \
|
||||
${top_srcdir}/module/zcommon/include/zfs_comutil.h \
|
||||
|
@ -50,6 +49,7 @@ libzpool_la_SOURCES = \
|
|||
${top_srcdir}/module/zfs/dsl_scrub.c \
|
||||
${top_srcdir}/module/zfs/dsl_synctask.c \
|
||||
${top_srcdir}/module/zfs/fletcher.c \
|
||||
${top_srcdir}/module/zfs/fm.c \
|
||||
${top_srcdir}/module/zfs/gzip.c \
|
||||
${top_srcdir}/module/zfs/lzjb.c \
|
||||
${top_srcdir}/module/zfs/metaslab.c \
|
||||
|
@ -85,4 +85,59 @@ libzpool_la_SOURCES = \
|
|||
${top_srcdir}/module/zfs/zio.c \
|
||||
${top_srcdir}/module/zfs/zio_checksum.c \
|
||||
${top_srcdir}/module/zfs/zio_compress.c \
|
||||
${top_srcdir}/module/zfs/zio_inject.c
|
||||
${top_srcdir}/module/zfs/zio_inject.c \
|
||||
${top_srcdir}/module/zfs/include/sys/arc.h \
|
||||
${top_srcdir}/module/zfs/include/sys/bplist.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dbuf.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu_objset.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu_traverse.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu_tx.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dmu_zfetch.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dnode.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_dataset.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_deleg.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_dir.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_pool.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_prop.h \
|
||||
${top_srcdir}/module/zfs/include/sys/dsl_synctask.h \
|
||||
${top_srcdir}/module/zfs/include/sys/metaslab.h \
|
||||
${top_srcdir}/module/zfs/include/sys/metaslab_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/refcount.h \
|
||||
${top_srcdir}/module/zfs/include/sys/rrwlock.h \
|
||||
${top_srcdir}/module/zfs/include/sys/spa_boot.h \
|
||||
${top_srcdir}/module/zfs/include/sys/space_map.h \
|
||||
${top_srcdir}/module/zfs/include/sys/spa.h \
|
||||
${top_srcdir}/module/zfs/include/sys/spa_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/txg.h \
|
||||
${top_srcdir}/module/zfs/include/sys/txg_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/uberblock.h \
|
||||
${top_srcdir}/module/zfs/include/sys/uberblock_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/unique.h \
|
||||
${top_srcdir}/module/zfs/include/sys/vdev_file.h \
|
||||
${top_srcdir}/module/zfs/include/sys/vdev.h \
|
||||
${top_srcdir}/module/zfs/include/sys/vdev_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zap.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zap_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zap_leaf.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_acl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_context.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_ctldir.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_debug.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_dir.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_fuid.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_ioctl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_rlock.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_vfsops.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zfs_znode.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zil.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zil_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zio_checksum.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zio_compress.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zio.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zio_impl.h \
|
||||
${top_srcdir}/module/zfs/include/sys/zvol.h \
|
||||
${top_srcdir}/module/zfs/include/sys/fm/protocol.h \
|
||||
${top_srcdir}/module/zfs/include/sys/fm/util.h \
|
||||
${top_srcdir}/module/zfs/include/sys/fm/fs/zfs.h
|
||||
|
|
|
@ -198,34 +198,34 @@ _NOTE(CONSTCOND) } while (0)
|
|||
/*
|
||||
* Threads
|
||||
*/
|
||||
#define THR_BOUND 0x00000001
|
||||
#define TS_RUN 0x00000002
|
||||
|
||||
typedef void (*thread_func_t)(void *);
|
||||
#define STACK_SIZE 8192 /* Linux x86 and amd64 */
|
||||
|
||||
typedef void (*thread_func_t)(void);
|
||||
typedef void (*thread_func_arg_t)(void *);
|
||||
typedef pthread_t kt_did_t;
|
||||
|
||||
typedef struct kthread {
|
||||
list_node_t t_node;
|
||||
kt_did_t t_tid;
|
||||
pthread_attr_t t_attr;
|
||||
thread_func_t t_func;
|
||||
void * t_arg;
|
||||
} kthread_t;
|
||||
|
||||
/* XXX tsd_create()/tsd_destroy() missing */
|
||||
#define tsd_get(key) pthread_getspecific(key)
|
||||
#define tsd_set(key, val) pthread_setspecific(key, val)
|
||||
#define curthread zk_thread_current()
|
||||
#define thread_exit zk_thread_exit
|
||||
#define thread_create(stk, stksize, func, arg, len, pp, state, pri) \
|
||||
zk_thread_create(stk, stksize, (thread_func_t)func, arg, \
|
||||
len, NULL, state, pri)
|
||||
#define thread_join(tid, dtid, status) \
|
||||
zk_thread_join(tid, dtid, status)
|
||||
zk_thread_create(stk, stksize, (thread_func_t) func, arg, len, \
|
||||
NULL, state, pri)
|
||||
|
||||
extern kthread_t *zk_thread_current(void);
|
||||
extern void zk_thread_exit(void);
|
||||
extern kthread_t *zk_thread_create(caddr_t stk, size_t stksize,
|
||||
thread_func_t func, void *arg, size_t len,
|
||||
void *pp, int state, pri_t pri);
|
||||
extern int zk_thread_join(kt_did_t tid, kthread_t *dtid, void **status);
|
||||
|
||||
#define issig(why) (FALSE)
|
||||
#define ISSIG(thr, why) (FALSE)
|
||||
|
@ -357,7 +357,7 @@ extern taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t);
|
|||
extern taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t);
|
||||
extern void taskq_destroy(taskq_t *);
|
||||
extern void taskq_wait(taskq_t *);
|
||||
extern int taskq_member(taskq_t *, void *);
|
||||
extern int taskq_member(taskq_t *, kthread_t *);
|
||||
extern void system_taskq_init(void);
|
||||
extern void system_taskq_fini(void);
|
||||
|
||||
|
|
|
@ -57,155 +57,141 @@ struct utsname utsname = {
|
|||
* =========================================================================
|
||||
*/
|
||||
|
||||
/* NOTE: Tracking each tid on a list and using it for curthread lookups
|
||||
* is slow at best but it provides an easy way to provide a kthread
|
||||
* style API on top of pthreads. For now we just want ztest to work
|
||||
* to validate correctness. Performance is not much of an issue
|
||||
* since that is what the in-kernel version is for. That said
|
||||
* reworking this to track the kthread_t structure as thread
|
||||
* specific data would be probably the best way to speed this up.
|
||||
*/
|
||||
|
||||
pthread_cond_t kthread_cond = PTHREAD_COND_INITIALIZER;
|
||||
pthread_mutex_t kthread_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
list_t kthread_list;
|
||||
|
||||
static int
|
||||
thread_count(void)
|
||||
{
|
||||
kthread_t *kt;
|
||||
int count = 0;
|
||||
|
||||
for (kt = list_head(&kthread_list); kt != NULL;
|
||||
kt = list_next(&kthread_list, kt))
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
pthread_key_t kthread_key;
|
||||
int kthread_nr = 0;
|
||||
|
||||
static void
|
||||
thread_init(void)
|
||||
{
|
||||
kthread_t *kt;
|
||||
|
||||
/* Initialize list for tracking kthreads */
|
||||
list_create(&kthread_list, sizeof (kthread_t),
|
||||
offsetof(kthread_t, t_node));
|
||||
VERIFY3S(pthread_key_create(&kthread_key, NULL), ==, 0);
|
||||
|
||||
/* Create entry for primary kthread */
|
||||
kt = umem_zalloc(sizeof(kthread_t), UMEM_NOFAIL);
|
||||
list_link_init(&kt->t_node);
|
||||
VERIFY3U(kt->t_tid = pthread_self(), !=, 0);
|
||||
VERIFY3S(pthread_attr_init(&kt->t_attr), ==, 0);
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
list_insert_head(&kthread_list, kt);
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
kt->t_tid = pthread_self();
|
||||
kt->t_func = NULL;
|
||||
|
||||
VERIFY3S(pthread_setspecific(kthread_key, kt), ==, 0);
|
||||
|
||||
/* Only the main thread should be running at the moment */
|
||||
ASSERT3S(kthread_nr, ==, 0);
|
||||
kthread_nr = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
thread_fini(void)
|
||||
{
|
||||
kthread_t *kt;
|
||||
struct timespec ts = { 0 };
|
||||
int count;
|
||||
kthread_t *kt = curthread;
|
||||
|
||||
ASSERT(pthread_equal(kt->t_tid, pthread_self()));
|
||||
ASSERT3P(kt->t_func, ==, NULL);
|
||||
|
||||
umem_free(kt, sizeof(kthread_t));
|
||||
|
||||
/* Wait for all threads to exit via thread_exit() */
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
while ((count = thread_count()) > 1) {
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
ts.tv_sec += 1;
|
||||
pthread_cond_timedwait(&kthread_cond, &kthread_lock, &ts);
|
||||
}
|
||||
|
||||
ASSERT3S(thread_count(), ==, 1);
|
||||
kt = list_head(&kthread_list);
|
||||
list_remove(&kthread_list, kt);
|
||||
kthread_nr--; /* Main thread is exiting */
|
||||
|
||||
while (kthread_nr > 0)
|
||||
VERIFY3S(pthread_cond_wait(&kthread_cond, &kthread_lock), ==,
|
||||
0);
|
||||
|
||||
ASSERT3S(kthread_nr, ==, 0);
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
|
||||
VERIFY(pthread_attr_destroy(&kt->t_attr) == 0);
|
||||
umem_free(kt, sizeof(kthread_t));
|
||||
|
||||
/* Cleanup list for tracking kthreads */
|
||||
list_destroy(&kthread_list);
|
||||
VERIFY3S(pthread_key_delete(kthread_key), ==, 0);
|
||||
}
|
||||
|
||||
kthread_t *
|
||||
zk_thread_current(void)
|
||||
{
|
||||
kt_did_t tid = pthread_self();
|
||||
kthread_t *kt;
|
||||
int count = 1;
|
||||
kthread_t *kt = pthread_getspecific(kthread_key);
|
||||
|
||||
/*
|
||||
* Because a newly created thread may call zk_thread_current()
|
||||
* before the thread parent has had time to add the thread's tid
|
||||
* to our lookup list. We will loop as long as there are tid
|
||||
* which have not yet been set which must be one of ours.
|
||||
* Yes it's a hack, at some point we can just use native pthreads.
|
||||
*/
|
||||
while (count > 0) {
|
||||
count = 0;
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
for (kt = list_head(&kthread_list); kt != NULL;
|
||||
kt = list_next(&kthread_list, kt)) {
|
||||
|
||||
if (kt->t_tid == tid) {
|
||||
VERIFY3S(pthread_mutex_unlock(
|
||||
&kthread_lock), ==, 0);
|
||||
return kt;
|
||||
}
|
||||
|
||||
if (kt->t_tid == (kt_did_t)-1)
|
||||
count++;
|
||||
}
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
}
|
||||
|
||||
/* Unreachable */
|
||||
ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kthread_t *
|
||||
zk_thread_create(caddr_t stk, size_t stksize, thread_func_t func, void *arg,
|
||||
size_t len, void *pp, int state, pri_t pri)
|
||||
{
|
||||
kthread_t *kt;
|
||||
|
||||
kt = umem_zalloc(sizeof(kthread_t), UMEM_NOFAIL);
|
||||
kt->t_tid = (kt_did_t)-1;
|
||||
list_link_init(&kt->t_node);
|
||||
VERIFY(pthread_attr_init(&kt->t_attr) == 0);
|
||||
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
list_insert_head(&kthread_list, kt);
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
|
||||
VERIFY3U(pthread_create(&kt->t_tid, &kt->t_attr,
|
||||
(void *(*)(void *))func, arg), ==, 0);
|
||||
ASSERT3P(kt, !=, NULL);
|
||||
|
||||
return kt;
|
||||
}
|
||||
|
||||
int
|
||||
zk_thread_join(kt_did_t tid, kthread_t *dtid, void **status)
|
||||
void *
|
||||
zk_thread_helper(void *arg)
|
||||
{
|
||||
return pthread_join(tid, status);
|
||||
kthread_t *kt = (kthread_t *) arg;
|
||||
|
||||
VERIFY3S(pthread_setspecific(kthread_key, kt), ==, 0);
|
||||
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
kthread_nr++;
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
|
||||
kt->t_tid = pthread_self();
|
||||
((thread_func_arg_t) kt->t_func)(kt->t_arg);
|
||||
|
||||
/* Unreachable, thread must exit with thread_exit() */
|
||||
abort();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kthread_t *
|
||||
zk_thread_create(caddr_t stk, size_t stksize, thread_func_t func, void *arg,
|
||||
size_t len, void *pp, int state, pri_t pri)
|
||||
{
|
||||
kthread_t *kt;
|
||||
pthread_t tid;
|
||||
pthread_attr_t attr;
|
||||
size_t stack;
|
||||
|
||||
/*
|
||||
* Due to a race when getting/setting the thread ID, currently only
|
||||
* detached threads are supported.
|
||||
*/
|
||||
ASSERT3S(state & ~TS_RUN, ==, 0);
|
||||
|
||||
kt = umem_zalloc(sizeof(kthread_t), UMEM_NOFAIL);
|
||||
kt->t_func = func;
|
||||
kt->t_arg = arg;
|
||||
|
||||
/*
|
||||
* The Solaris kernel stack size in x86/x64 is 8K, so we reduce the
|
||||
* default stack size in userspace, for sanity checking.
|
||||
*
|
||||
* PTHREAD_STACK_MIN is the stack required for a NULL procedure in
|
||||
* userspace.
|
||||
*
|
||||
* XXX: Stack size for other architectures is not being taken into
|
||||
* account.
|
||||
*/
|
||||
stack = PTHREAD_STACK_MIN + MAX(stksize, STACK_SIZE);
|
||||
|
||||
VERIFY3S(pthread_attr_init(&attr), ==, 0);
|
||||
VERIFY3S(pthread_attr_setstacksize(&attr, stack), ==, 0);
|
||||
VERIFY3S(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED),
|
||||
==, 0);
|
||||
|
||||
VERIFY3S(pthread_create(&tid, &attr, &zk_thread_helper, kt), ==, 0);
|
||||
|
||||
VERIFY3S(pthread_attr_destroy(&attr), ==, 0);
|
||||
|
||||
return kt;
|
||||
}
|
||||
|
||||
void
|
||||
zk_thread_exit(void)
|
||||
{
|
||||
kthread_t *kt;
|
||||
kthread_t *kt = curthread;
|
||||
|
||||
VERIFY3P(kt = curthread, !=, NULL);
|
||||
VERIFY3S(pthread_mutex_lock(&kthread_lock), ==, 0);
|
||||
list_remove(&kthread_list, kt);
|
||||
VERIFY3S(pthread_mutex_unlock(&kthread_lock), ==, 0);
|
||||
ASSERT(pthread_equal(kt->t_tid, pthread_self()));
|
||||
|
||||
VERIFY(pthread_attr_destroy(&kt->t_attr) == 0);
|
||||
umem_free(kt, sizeof(kthread_t));
|
||||
|
||||
pthread_mutex_lock(&kthread_lock);
|
||||
kthread_nr--;
|
||||
pthread_mutex_unlock(&kthread_lock);
|
||||
|
||||
pthread_cond_broadcast(&kthread_cond);
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
@ -529,6 +515,7 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
|
|||
int old_umask;
|
||||
char real_path[MAXPATHLEN];
|
||||
struct stat64 st;
|
||||
int err;
|
||||
|
||||
/*
|
||||
* If we're accessing a real disk from userland, we need to use
|
||||
|
@ -577,8 +564,9 @@ vn_open(char *path, int x1, int flags, int mode, vnode_t **vpp, int x2, int x3)
|
|||
return (errno);
|
||||
|
||||
if (fstat64(fd, &st) == -1) {
|
||||
err = errno;
|
||||
close(fd);
|
||||
return (errno);
|
||||
return (err);
|
||||
}
|
||||
|
||||
(void) fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
|
@ -616,26 +604,32 @@ int
|
|||
vn_rdwr(int uio, vnode_t *vp, void *addr, ssize_t len, offset_t offset,
|
||||
int x1, int x2, rlim64_t x3, void *x4, ssize_t *residp)
|
||||
{
|
||||
ssize_t iolen, split;
|
||||
ssize_t rc, done = 0, split;
|
||||
|
||||
if (uio == UIO_READ) {
|
||||
iolen = pread64(vp->v_fd, addr, len, offset);
|
||||
rc = pread64(vp->v_fd, addr, len, offset);
|
||||
} else {
|
||||
/*
|
||||
* To simulate partial disk writes, we split writes into two
|
||||
* system calls so that the process can be killed in between.
|
||||
*/
|
||||
split = (len > 0 ? rand() % len : 0);
|
||||
iolen = pwrite64(vp->v_fd, addr, split, offset);
|
||||
iolen += pwrite64(vp->v_fd, (char *)addr + split,
|
||||
len - split, offset + split);
|
||||
rc = pwrite64(vp->v_fd, addr, split, offset);
|
||||
if (rc != -1) {
|
||||
done = rc;
|
||||
rc = pwrite64(vp->v_fd, (char *)addr + split,
|
||||
len - split, offset + split);
|
||||
}
|
||||
}
|
||||
|
||||
if (iolen == -1)
|
||||
if (rc == -1)
|
||||
return (errno);
|
||||
|
||||
done += rc;
|
||||
|
||||
if (residp)
|
||||
*residp = len - iolen;
|
||||
else if (iolen != len)
|
||||
*residp = len - done;
|
||||
else if (done != len)
|
||||
return (EIO);
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ struct taskq {
|
|||
kcondvar_t tq_dispatch_cv;
|
||||
kcondvar_t tq_wait_cv;
|
||||
kthread_t **tq_threadlist;
|
||||
kt_did_t *tq_idlist;
|
||||
int tq_flags;
|
||||
int tq_active;
|
||||
int tq_nthreads;
|
||||
|
@ -135,7 +134,7 @@ taskq_wait(taskq_t *tq)
|
|||
mutex_exit(&tq->tq_lock);
|
||||
}
|
||||
|
||||
static void *
|
||||
static void
|
||||
taskq_thread(void *arg)
|
||||
{
|
||||
taskq_t *tq = arg;
|
||||
|
@ -165,7 +164,6 @@ taskq_thread(void *arg)
|
|||
cv_broadcast(&tq->tq_wait_cv);
|
||||
mutex_exit(&tq->tq_lock);
|
||||
thread_exit();
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
|
@ -200,10 +198,8 @@ taskq_create(const char *name, int nthreads, pri_t pri,
|
|||
tq->tq_maxalloc = maxalloc;
|
||||
tq->tq_task.task_next = &tq->tq_task;
|
||||
tq->tq_task.task_prev = &tq->tq_task;
|
||||
VERIFY3P((tq->tq_threadlist = kmem_alloc(tq->tq_nthreads *
|
||||
sizeof(kthread_t *), KM_SLEEP)), !=, NULL);
|
||||
VERIFY3P((tq->tq_idlist = kmem_alloc(tq->tq_nthreads *
|
||||
sizeof(kt_did_t), KM_SLEEP)), !=, NULL);
|
||||
tq->tq_threadlist = kmem_alloc(tq->tq_nthreads * sizeof(kthread_t *),
|
||||
KM_SLEEP);
|
||||
|
||||
if (flags & TASKQ_PREPOPULATE) {
|
||||
mutex_enter(&tq->tq_lock);
|
||||
|
@ -214,8 +210,7 @@ taskq_create(const char *name, int nthreads, pri_t pri,
|
|||
|
||||
for (t = 0; t < tq->tq_nthreads; t++) {
|
||||
VERIFY((tq->tq_threadlist[t] = thread_create(NULL, 0,
|
||||
taskq_thread, tq, THR_BOUND, NULL, 0, 0)) != NULL);
|
||||
tq->tq_idlist[t] = tq->tq_threadlist[t]->t_tid;
|
||||
taskq_thread, tq, TS_RUN, NULL, 0, 0)) != NULL);
|
||||
}
|
||||
|
||||
return (tq);
|
||||
|
@ -224,7 +219,6 @@ taskq_create(const char *name, int nthreads, pri_t pri,
|
|||
void
|
||||
taskq_destroy(taskq_t *tq)
|
||||
{
|
||||
int t;
|
||||
int nthreads = tq->tq_nthreads;
|
||||
|
||||
taskq_wait(tq);
|
||||
|
@ -245,11 +239,7 @@ taskq_destroy(taskq_t *tq)
|
|||
|
||||
mutex_exit(&tq->tq_lock);
|
||||
|
||||
for (t = 0; t < nthreads; t++)
|
||||
VERIFY3S(thread_join(tq->tq_idlist[t], NULL, NULL), ==, 0);
|
||||
|
||||
kmem_free(tq->tq_threadlist, nthreads * sizeof(kthread_t *));
|
||||
kmem_free(tq->tq_idlist, nthreads * sizeof(kt_did_t));
|
||||
|
||||
rw_destroy(&tq->tq_threadlock);
|
||||
mutex_destroy(&tq->tq_lock);
|
||||
|
@ -260,7 +250,7 @@ taskq_destroy(taskq_t *tq)
|
|||
}
|
||||
|
||||
int
|
||||
taskq_member(taskq_t *tq, void *t)
|
||||
taskq_member(taskq_t *tq, kthread_t *t)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -268,7 +258,7 @@ taskq_member(taskq_t *tq, void *t)
|
|||
return (1);
|
||||
|
||||
for (i = 0; i < tq->tq_nthreads; i++)
|
||||
if (tq->tq_threadlist[i] == (kthread_t *)t)
|
||||
if (tq->tq_threadlist[i] == t)
|
||||
return (1);
|
||||
|
||||
return (0);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS = man8
|
|
@ -0,0 +1,5 @@
|
|||
man_MANS = zdb.8 zfs.8 zpool.8
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
install-data-local:
|
||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(mandir)/man8"
|
|
@ -0,0 +1,84 @@
|
|||
'\" te
|
||||
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
|
||||
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
|
||||
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
|
||||
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
.TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands"
|
||||
.SH NAME
|
||||
zdb \- ZFS debugger
|
||||
.SH SYNOPSIS
|
||||
.LP
|
||||
.nf
|
||||
\fBzdb\fR \fIpool\fR
|
||||
.fi
|
||||
|
||||
.SH DESCRIPTION
|
||||
.sp
|
||||
.LP
|
||||
The \fBzdb\fR command is used by support engineers to diagnose failures and gather statistics. Since the \fBZFS\fR file system is always consistent on disk and is self-repairing, \fBzdb\fR should only be run under the direction by a support engineer.
|
||||
.sp
|
||||
.LP
|
||||
If no arguments are specified, \fBzdb\fR, performs basic consistency checks on the pool and associated datasets, and report any problems detected.
|
||||
.sp
|
||||
.LP
|
||||
Any options supported by this command are internal to Sun and subject to change at any time.
|
||||
.SH EXIT STATUS
|
||||
.sp
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.sp
|
||||
.ne 2
|
||||
.mk
|
||||
.na
|
||||
\fB\fB0\fR\fR
|
||||
.ad
|
||||
.RS 5n
|
||||
.rt
|
||||
The pool is consistent.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.mk
|
||||
.na
|
||||
\fB\fB1\fR\fR
|
||||
.ad
|
||||
.RS 5n
|
||||
.rt
|
||||
An error was detected.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.mk
|
||||
.na
|
||||
\fB\fB2\fR\fR
|
||||
.ad
|
||||
.RS 5n
|
||||
.rt
|
||||
Invalid command line options were specified.
|
||||
.RE
|
||||
|
||||
.SH ATTRIBUTES
|
||||
.sp
|
||||
.LP
|
||||
See \fBattributes\fR(5) for descriptions of the following attributes:
|
||||
.sp
|
||||
|
||||
.sp
|
||||
.TS
|
||||
tab() box;
|
||||
cw(2.75i) |cw(2.75i)
|
||||
lw(2.75i) |lw(2.75i)
|
||||
.
|
||||
ATTRIBUTE TYPEATTRIBUTE VALUE
|
||||
_
|
||||
AvailabilitySUNWzfsu
|
||||
_
|
||||
Interface StabilityUnstable
|
||||
.TE
|
||||
|
||||
.SH SEE ALSO
|
||||
.sp
|
||||
.LP
|
||||
\fBzfs\fR(1M), \fBzpool\fR(1M), \fBattributes\fR(5)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,3 @@
|
|||
/.tmp_versions
|
||||
/Module.markers
|
||||
/Module.symvers
|
|
@ -4,11 +4,17 @@ subdir-m += unicode
|
|||
subdir-m += zcommon
|
||||
subdir-m += zfs
|
||||
|
||||
modules clean:
|
||||
modules:
|
||||
# Make the exported SPL symbols available to these modules.
|
||||
cp @SPL_OBJ@/@SPL_SYMBOLS@ .
|
||||
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
|
||||
|
||||
clean:
|
||||
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@
|
||||
if [ -f @SPL_SYMBOLS@ ]; then $(RM) @SPL_SYMBOLS@; fi
|
||||
if [ -f @LINUX_SYMBOLS@ ]; then $(RM) @LINUX_SYMBOLS@; fi
|
||||
if [ -f Module.markers ]; then $(RM) Module.markers; fi
|
||||
|
||||
modules_install:
|
||||
$(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \
|
||||
INSTALL_MOD_PATH=$(DESTDIR) \
|
||||
|
@ -17,12 +23,8 @@ modules_install:
|
|||
# Install the required headers in to the kernel source
|
||||
destname=zfs-@ZFS_META_VERSION@/@LINUX_VERSION@; \
|
||||
instdest=$(DESTDIR)/@prefix@/src/$$destname; \
|
||||
(mkdir -p $$instdest && \
|
||||
find . -mindepth 3 -maxdepth 3 -name '*.h' | \
|
||||
xargs cp -t $$instdest) || exit 1; \
|
||||
(mkdir -p $$instdest/sys && \
|
||||
find . -mindepth 4 -maxdepth 4 -name '*.h' | \
|
||||
xargs cp -t $$instdest/sys) || exit 1;
|
||||
(find . -mindepth 3 -name '*.h' | xargs -Ihdr sh -c \
|
||||
"DEST=hdr && install -D hdr $$instdest/\$${DEST#*/*/*/}") || exit 1
|
||||
|
||||
distdir:
|
||||
distfiles=`find . -name '*.c' -o -name '*.h'`; \
|
||||
|
|
|
@ -1033,15 +1033,16 @@ done:
|
|||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
|
||||
static int avl_init(void) { return 0; }
|
||||
static int avl_fini(void) { return 0; }
|
||||
|
||||
spl_module_init(avl_init);
|
||||
spl_module_exit(avl_fini);
|
||||
|
||||
MODULE_AUTHOR("Sun Microsystems, Inc");
|
||||
MODULE_DESCRIPTION("Generic AVL tree implementation");
|
||||
MODULE_LICENSE("CDDL");
|
||||
MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
|
||||
EXPORT_SYMBOL(avl_create);
|
||||
EXPORT_SYMBOL(avl_find);
|
||||
|
|
|
@ -7,3 +7,4 @@ obj-m := ${MODULE}.o
|
|||
|
||||
${MODULE}-objs += nvpair.o
|
||||
${MODULE}-objs += nvpair_alloc_spl.o
|
||||
${MODULE}-objs += nvpair_alloc_fixed.o
|
||||
|
|
|
@ -3246,15 +3246,16 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen)
|
|||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
|
||||
static int nvpair_init(void) { return 0; }
|
||||
static int nvpair_fini(void) { return 0; }
|
||||
|
||||
spl_module_init(nvpair_init);
|
||||
spl_module_exit(nvpair_fini);
|
||||
|
||||
MODULE_AUTHOR("Sun Microsystems, Inc");
|
||||
MODULE_DESCRIPTION("Generic name/value pair implementation");
|
||||
MODULE_LICENSE("CDDL");
|
||||
MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
|
||||
EXPORT_SYMBOL(nv_alloc_init);
|
||||
EXPORT_SYMBOL(nv_alloc_reset);
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/stropts.h>
|
||||
#include <sys/isa_defs.h>
|
||||
#include <sys/nvpair.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#if defined(_KERNEL) && !defined(_BOOT)
|
||||
#include <sys/varargs.h>
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This allocator is very simple.
|
||||
* - it uses a pre-allocated buffer for memory allocations.
|
||||
* - it does _not_ free memory in the pre-allocated buffer.
|
||||
*
|
||||
* The reason for the selected implemention is simplicity.
|
||||
* This allocator is designed for the usage in interrupt context when
|
||||
* the caller may not wait for free memory.
|
||||
*/
|
||||
|
||||
/* pre-allocated buffer for memory allocations */
|
||||
typedef struct nvbuf {
|
||||
uintptr_t nvb_buf; /* address of pre-allocated buffer */
|
||||
uintptr_t nvb_lim; /* limit address in the buffer */
|
||||
uintptr_t nvb_cur; /* current address in the buffer */
|
||||
} nvbuf_t;
|
||||
|
||||
/*
|
||||
* Initialize the pre-allocated buffer allocator. The caller needs to supply
|
||||
*
|
||||
* buf address of pre-allocated buffer
|
||||
* bufsz size of pre-allocated buffer
|
||||
*
|
||||
* nv_fixed_init() calculates the remaining members of nvbuf_t.
|
||||
*/
|
||||
static int
|
||||
nv_fixed_init(nv_alloc_t *nva, va_list valist)
|
||||
{
|
||||
uintptr_t base = va_arg(valist, uintptr_t);
|
||||
uintptr_t lim = base + va_arg(valist, size_t);
|
||||
nvbuf_t *nvb = (nvbuf_t *)P2ROUNDUP(base, sizeof (uintptr_t));
|
||||
|
||||
if (base == 0 || (uintptr_t)&nvb[1] > lim)
|
||||
return (EINVAL);
|
||||
|
||||
nvb->nvb_buf = (uintptr_t)&nvb[0];
|
||||
nvb->nvb_cur = (uintptr_t)&nvb[1];
|
||||
nvb->nvb_lim = lim;
|
||||
nva->nva_arg = nvb;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void *
|
||||
nv_fixed_alloc(nv_alloc_t *nva, size_t size)
|
||||
{
|
||||
nvbuf_t *nvb = nva->nva_arg;
|
||||
uintptr_t new = nvb->nvb_cur;
|
||||
|
||||
if (size == 0 || new + size > nvb->nvb_lim)
|
||||
return (NULL);
|
||||
|
||||
nvb->nvb_cur = P2ROUNDUP(new + size, sizeof (uintptr_t));
|
||||
|
||||
return ((void *)new);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
nv_fixed_free(nv_alloc_t *nva, void *buf, size_t size)
|
||||
{
|
||||
/* don't free memory in the pre-allocated buffer */
|
||||
}
|
||||
|
||||
static void
|
||||
nv_fixed_reset(nv_alloc_t *nva)
|
||||
{
|
||||
nvbuf_t *nvb = nva->nva_arg;
|
||||
|
||||
nvb->nvb_cur = (uintptr_t)&nvb[1];
|
||||
}
|
||||
|
||||
const nv_alloc_ops_t nv_fixed_ops_def = {
|
||||
nv_fixed_init, /* nv_ao_init() */
|
||||
NULL, /* nv_ao_fini() */
|
||||
nv_fixed_alloc, /* nv_ao_alloc() */
|
||||
nv_fixed_free, /* nv_ao_free() */
|
||||
nv_fixed_reset /* nv_ao_reset() */
|
||||
};
|
||||
|
||||
const nv_alloc_ops_t *nv_fixed_ops = &nv_fixed_ops_def;
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
EXPORT_SYMBOL(nv_fixed_ops);
|
||||
#endif
|
|
@ -2133,15 +2133,16 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
|
|||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
|
||||
static int unicode_init(void) { return 0; }
|
||||
static int unicode_fini(void) { return 0; }
|
||||
|
||||
spl_module_init(unicode_init);
|
||||
spl_module_exit(unicode_fini);
|
||||
|
||||
MODULE_AUTHOR("Sun Microsystems, Inc");
|
||||
MODULE_DESCRIPTION("Unicode implementation");
|
||||
MODULE_LICENSE("CDDL");
|
||||
MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
|
||||
EXPORT_SYMBOL(u8_validate);
|
||||
EXPORT_SYMBOL(u8_strcmp);
|
||||
|
|
|
@ -534,15 +534,16 @@ zfs_prop_align_right(zfs_prop_t prop)
|
|||
#endif
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
|
||||
static int zcommon_init(void) { return 0; }
|
||||
static int zcommon_fini(void) { return 0; }
|
||||
|
||||
spl_module_init(zcommon_init);
|
||||
spl_module_exit(zcommon_fini);
|
||||
|
||||
MODULE_AUTHOR("Sun Microsystems, Inc");
|
||||
MODULE_DESCRIPTION("Generic ZFS support");
|
||||
MODULE_LICENSE("CDDL");
|
||||
MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
|
||||
/* zfs dataset property functions */
|
||||
EXPORT_SYMBOL(zfs_userquota_prop_prefixes);
|
||||
|
|
|
@ -29,6 +29,7 @@ ${MODULE}-objs += dsl_prop.o
|
|||
${MODULE}-objs += dsl_scrub.o
|
||||
${MODULE}-objs += dsl_synctask.o
|
||||
${MODULE}-objs += fletcher.o
|
||||
${MODULE}-objs += fm.o
|
||||
${MODULE}-objs += gzip.o
|
||||
${MODULE}-objs += lzjb.o
|
||||
${MODULE}-objs += metaslab.o
|
||||
|
|
|
@ -689,7 +689,7 @@ restore_read(struct restorearg *ra, int len)
|
|||
return (rv);
|
||||
}
|
||||
|
||||
static void
|
||||
noinline static void
|
||||
backup_byteswap(dmu_replay_record_t *drr)
|
||||
{
|
||||
#define DO64(X) (drr->drr_u.X = BSWAP_64(drr->drr_u.X))
|
||||
|
@ -740,7 +740,7 @@ backup_byteswap(dmu_replay_record_t *drr)
|
|||
#undef DO32
|
||||
}
|
||||
|
||||
static int
|
||||
noinline static int
|
||||
restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro)
|
||||
{
|
||||
int err;
|
||||
|
@ -822,7 +822,7 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro)
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
noinline static int
|
||||
restore_freeobjects(struct restorearg *ra, objset_t *os,
|
||||
struct drr_freeobjects *drrfo)
|
||||
{
|
||||
|
@ -846,7 +846,7 @@ restore_freeobjects(struct restorearg *ra, objset_t *os,
|
|||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
noinline static int
|
||||
restore_write(struct restorearg *ra, objset_t *os,
|
||||
struct drr_write *drrw)
|
||||
{
|
||||
|
@ -883,7 +883,7 @@ restore_write(struct restorearg *ra, objset_t *os,
|
|||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
noinline static int
|
||||
restore_free(struct restorearg *ra, objset_t *os,
|
||||
struct drr_free *drrf)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,336 @@
|
|||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_FM_PROTOCOL_H
|
||||
#define _SYS_FM_PROTOCOL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/varargs.h>
|
||||
#include <sys/nvpair.h>
|
||||
#else
|
||||
#include <libnvpair.h>
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#include <sys/processor.h>
|
||||
|
||||
/* FM common member names */
|
||||
#define FM_CLASS "class"
|
||||
#define FM_VERSION "version"
|
||||
|
||||
/* FM event class values */
|
||||
#define FM_EREPORT_CLASS "ereport"
|
||||
#define FM_FAULT_CLASS "fault"
|
||||
#define FM_RSRC_CLASS "resource"
|
||||
#define FM_LIST_EVENT "list"
|
||||
|
||||
/* FM list.* event class values */
|
||||
#define FM_LIST_SUSPECT_CLASS FM_LIST_EVENT ".suspect"
|
||||
#define FM_LIST_ISOLATED_CLASS FM_LIST_EVENT ".isolated"
|
||||
#define FM_LIST_REPAIRED_CLASS FM_LIST_EVENT ".repaired"
|
||||
#define FM_LIST_UPDATED_CLASS FM_LIST_EVENT ".updated"
|
||||
#define FM_LIST_RESOLVED_CLASS FM_LIST_EVENT ".resolved"
|
||||
|
||||
/* ereport class subcategory values */
|
||||
#define FM_ERROR_CPU "cpu"
|
||||
#define FM_ERROR_IO "io"
|
||||
|
||||
/* ereport version and payload member names */
|
||||
#define FM_EREPORT_VERS0 0
|
||||
#define FM_EREPORT_VERSION FM_EREPORT_VERS0
|
||||
|
||||
/* ereport payload member names */
|
||||
#define FM_EREPORT_DETECTOR "detector"
|
||||
#define FM_EREPORT_ENA "ena"
|
||||
|
||||
/* list.* event payload member names */
|
||||
#define FM_LIST_EVENT_SIZE "list-sz"
|
||||
|
||||
/*
|
||||
* list.suspect, isolated, updated, repaired and resolved
|
||||
* versions/payload member names.
|
||||
*/
|
||||
#define FM_SUSPECT_UUID "uuid"
|
||||
#define FM_SUSPECT_DIAG_CODE "code"
|
||||
#define FM_SUSPECT_DIAG_TIME "diag-time"
|
||||
#define FM_SUSPECT_DE "de"
|
||||
#define FM_SUSPECT_FAULT_LIST "fault-list"
|
||||
#define FM_SUSPECT_FAULT_SZ "fault-list-sz"
|
||||
#define FM_SUSPECT_FAULT_STATUS "fault-status"
|
||||
#define FM_SUSPECT_MESSAGE "message"
|
||||
#define FM_SUSPECT_RETIRE "retire"
|
||||
#define FM_SUSPECT_RESPONSE "response"
|
||||
#define FM_SUSPECT_SEVERITY "severity"
|
||||
|
||||
#define FM_SUSPECT_VERS0 0
|
||||
#define FM_SUSPECT_VERSION FM_SUSPECT_VERS0
|
||||
|
||||
#define FM_SUSPECT_FAULTY 0x1
|
||||
#define FM_SUSPECT_UNUSABLE 0x2
|
||||
#define FM_SUSPECT_NOT_PRESENT 0x4
|
||||
#define FM_SUSPECT_DEGRADED 0x8
|
||||
#define FM_SUSPECT_REPAIRED 0x10
|
||||
#define FM_SUSPECT_REPLACED 0x20
|
||||
#define FM_SUSPECT_ACQUITTED 0x40
|
||||
|
||||
/* fault event versions and payload member names */
|
||||
#define FM_FAULT_VERS0 0
|
||||
#define FM_FAULT_VERSION FM_FAULT_VERS0
|
||||
|
||||
#define FM_FAULT_ASRU "asru"
|
||||
#define FM_FAULT_FRU "fru"
|
||||
#define FM_FAULT_FRU_LABEL "fru-label"
|
||||
#define FM_FAULT_CERTAINTY "certainty"
|
||||
#define FM_FAULT_RESOURCE "resource"
|
||||
#define FM_FAULT_LOCATION "location"
|
||||
|
||||
/* resource event versions and payload member names */
|
||||
#define FM_RSRC_VERS0 0
|
||||
#define FM_RSRC_VERSION FM_RSRC_VERS0
|
||||
#define FM_RSRC_RESOURCE "resource"
|
||||
|
||||
/* resource.fm.asru.* payload member names */
|
||||
#define FM_RSRC_ASRU_UUID "uuid"
|
||||
#define FM_RSRC_ASRU_CODE "code"
|
||||
#define FM_RSRC_ASRU_FAULTY "faulty"
|
||||
#define FM_RSRC_ASRU_REPAIRED "repaired"
|
||||
#define FM_RSRC_ASRU_REPLACED "replaced"
|
||||
#define FM_RSRC_ASRU_ACQUITTED "acquitted"
|
||||
#define FM_RSRC_ASRU_UNUSABLE "unusable"
|
||||
#define FM_RSRC_ASRU_EVENT "event"
|
||||
|
||||
/* resource.fm.xprt.* versions and payload member names */
|
||||
#define FM_RSRC_XPRT_VERS0 0
|
||||
#define FM_RSRC_XPRT_VERSION FM_RSRC_XPRT_VERS0
|
||||
#define FM_RSRC_XPRT_UUID "uuid"
|
||||
#define FM_RSRC_XPRT_SUBCLASS "subclass"
|
||||
#define FM_RSRC_XPRT_FAULT_STATUS "fault-status"
|
||||
#define FM_RSRC_XPRT_FAULT_HAS_ASRU "fault-has-asru"
|
||||
|
||||
/*
|
||||
* FM ENA Format Macros
|
||||
*/
|
||||
#define ENA_FORMAT_MASK 0x3
|
||||
#define ENA_FORMAT(ena) ((ena) & ENA_FORMAT_MASK)
|
||||
|
||||
/* ENA format types */
|
||||
#define FM_ENA_FMT0 0
|
||||
#define FM_ENA_FMT1 1
|
||||
#define FM_ENA_FMT2 2
|
||||
|
||||
/* Format 1 */
|
||||
#define ENA_FMT1_GEN_MASK 0x00000000000003FCull
|
||||
#define ENA_FMT1_ID_MASK 0xFFFFFFFFFFFFFC00ull
|
||||
#define ENA_FMT1_CPUID_MASK 0x00000000000FFC00ull
|
||||
#define ENA_FMT1_TIME_MASK 0xFFFFFFFFFFF00000ull
|
||||
#define ENA_FMT1_GEN_SHFT 2
|
||||
#define ENA_FMT1_ID_SHFT 10
|
||||
#define ENA_FMT1_CPUID_SHFT ENA_FMT1_ID_SHFT
|
||||
#define ENA_FMT1_TIME_SHFT 20
|
||||
|
||||
/* Format 2 */
|
||||
#define ENA_FMT2_GEN_MASK 0x00000000000003FCull
|
||||
#define ENA_FMT2_ID_MASK 0xFFFFFFFFFFFFFC00ull
|
||||
#define ENA_FMT2_TIME_MASK ENA_FMT2_ID_MASK
|
||||
#define ENA_FMT2_GEN_SHFT 2
|
||||
#define ENA_FMT2_ID_SHFT 10
|
||||
#define ENA_FMT2_TIME_SHFT ENA_FMT2_ID_SHFT
|
||||
|
||||
/* Common FMRI type names */
|
||||
#define FM_FMRI_AUTHORITY "authority"
|
||||
#define FM_FMRI_SCHEME "scheme"
|
||||
#define FM_FMRI_SVC_AUTHORITY "svc-authority"
|
||||
#define FM_FMRI_FACILITY "facility"
|
||||
|
||||
/* FMRI authority-type member names */
|
||||
#define FM_FMRI_AUTH_CHASSIS "chassis-id"
|
||||
#define FM_FMRI_AUTH_PRODUCT "product-id"
|
||||
#define FM_FMRI_AUTH_DOMAIN "domain-id"
|
||||
#define FM_FMRI_AUTH_SERVER "server-id"
|
||||
#define FM_FMRI_AUTH_HOST "host-id"
|
||||
|
||||
#define FM_AUTH_VERS0 0
|
||||
#define FM_FMRI_AUTH_VERSION FM_AUTH_VERS0
|
||||
|
||||
/* scheme name values */
|
||||
#define FM_FMRI_SCHEME_FMD "fmd"
|
||||
#define FM_FMRI_SCHEME_DEV "dev"
|
||||
#define FM_FMRI_SCHEME_HC "hc"
|
||||
#define FM_FMRI_SCHEME_SVC "svc"
|
||||
#define FM_FMRI_SCHEME_CPU "cpu"
|
||||
#define FM_FMRI_SCHEME_MEM "mem"
|
||||
#define FM_FMRI_SCHEME_MOD "mod"
|
||||
#define FM_FMRI_SCHEME_PKG "pkg"
|
||||
#define FM_FMRI_SCHEME_LEGACY "legacy-hc"
|
||||
#define FM_FMRI_SCHEME_ZFS "zfs"
|
||||
|
||||
/* Scheme versions */
|
||||
#define FMD_SCHEME_VERSION0 0
|
||||
#define FM_FMD_SCHEME_VERSION FMD_SCHEME_VERSION0
|
||||
#define DEV_SCHEME_VERSION0 0
|
||||
#define FM_DEV_SCHEME_VERSION DEV_SCHEME_VERSION0
|
||||
#define FM_HC_VERS0 0
|
||||
#define FM_HC_SCHEME_VERSION FM_HC_VERS0
|
||||
#define CPU_SCHEME_VERSION0 0
|
||||
#define CPU_SCHEME_VERSION1 1
|
||||
#define FM_CPU_SCHEME_VERSION CPU_SCHEME_VERSION1
|
||||
#define MEM_SCHEME_VERSION0 0
|
||||
#define FM_MEM_SCHEME_VERSION MEM_SCHEME_VERSION0
|
||||
#define MOD_SCHEME_VERSION0 0
|
||||
#define FM_MOD_SCHEME_VERSION MOD_SCHEME_VERSION0
|
||||
#define PKG_SCHEME_VERSION0 0
|
||||
#define FM_PKG_SCHEME_VERSION PKG_SCHEME_VERSION0
|
||||
#define LEGACY_SCHEME_VERSION0 0
|
||||
#define FM_LEGACY_SCHEME_VERSION LEGACY_SCHEME_VERSION0
|
||||
#define SVC_SCHEME_VERSION0 0
|
||||
#define FM_SVC_SCHEME_VERSION SVC_SCHEME_VERSION0
|
||||
#define ZFS_SCHEME_VERSION0 0
|
||||
#define FM_ZFS_SCHEME_VERSION ZFS_SCHEME_VERSION0
|
||||
|
||||
/* hc scheme member names */
|
||||
#define FM_FMRI_HC_SERIAL_ID "serial"
|
||||
#define FM_FMRI_HC_PART "part"
|
||||
#define FM_FMRI_HC_REVISION "revision"
|
||||
#define FM_FMRI_HC_ROOT "hc-root"
|
||||
#define FM_FMRI_HC_LIST_SZ "hc-list-sz"
|
||||
#define FM_FMRI_HC_LIST "hc-list"
|
||||
#define FM_FMRI_HC_SPECIFIC "hc-specific"
|
||||
|
||||
/* facility member names */
|
||||
#define FM_FMRI_FACILITY_NAME "facility-name"
|
||||
#define FM_FMRI_FACILITY_TYPE "facility-type"
|
||||
|
||||
/* hc-list version and member names */
|
||||
#define FM_FMRI_HC_NAME "hc-name"
|
||||
#define FM_FMRI_HC_ID "hc-id"
|
||||
|
||||
#define HC_LIST_VERSION0 0
|
||||
#define FM_HC_LIST_VERSION HC_LIST_VERSION0
|
||||
|
||||
/* hc-specific member names */
|
||||
#define FM_FMRI_HC_SPECIFIC_OFFSET "offset"
|
||||
#define FM_FMRI_HC_SPECIFIC_PHYSADDR "physaddr"
|
||||
|
||||
/* fmd module scheme member names */
|
||||
#define FM_FMRI_FMD_NAME "mod-name"
|
||||
#define FM_FMRI_FMD_VERSION "mod-version"
|
||||
|
||||
/* dev scheme member names */
|
||||
#define FM_FMRI_DEV_ID "devid"
|
||||
#define FM_FMRI_DEV_PATH "device-path"
|
||||
|
||||
/* pkg scheme member names */
|
||||
#define FM_FMRI_PKG_BASEDIR "pkg-basedir"
|
||||
#define FM_FMRI_PKG_INST "pkg-inst"
|
||||
#define FM_FMRI_PKG_VERSION "pkg-version"
|
||||
|
||||
/* svc scheme member names */
|
||||
#define FM_FMRI_SVC_NAME "svc-name"
|
||||
#define FM_FMRI_SVC_INSTANCE "svc-instance"
|
||||
#define FM_FMRI_SVC_CONTRACT_ID "svc-contract-id"
|
||||
|
||||
/* svc-authority member names */
|
||||
#define FM_FMRI_SVC_AUTH_SCOPE "scope"
|
||||
#define FM_FMRI_SVC_AUTH_SYSTEM_FQN "system-fqn"
|
||||
|
||||
/* cpu scheme member names */
|
||||
#define FM_FMRI_CPU_ID "cpuid"
|
||||
#define FM_FMRI_CPU_SERIAL_ID "serial"
|
||||
#define FM_FMRI_CPU_MASK "cpumask"
|
||||
#define FM_FMRI_CPU_VID "cpuvid"
|
||||
#define FM_FMRI_CPU_CPUFRU "cpufru"
|
||||
#define FM_FMRI_CPU_CACHE_INDEX "cacheindex"
|
||||
#define FM_FMRI_CPU_CACHE_WAY "cacheway"
|
||||
#define FM_FMRI_CPU_CACHE_BIT "cachebit"
|
||||
#define FM_FMRI_CPU_CACHE_TYPE "cachetype"
|
||||
|
||||
#define FM_FMRI_CPU_CACHE_TYPE_L2 0
|
||||
#define FM_FMRI_CPU_CACHE_TYPE_L3 1
|
||||
|
||||
/* legacy-hc scheme member names */
|
||||
#define FM_FMRI_LEGACY_HC "component"
|
||||
#define FM_FMRI_LEGACY_HC_PREFIX FM_FMRI_SCHEME_HC":///" \
|
||||
FM_FMRI_LEGACY_HC"="
|
||||
|
||||
/* mem scheme member names */
|
||||
#define FM_FMRI_MEM_UNUM "unum"
|
||||
#define FM_FMRI_MEM_SERIAL_ID "serial"
|
||||
#define FM_FMRI_MEM_PHYSADDR "physaddr"
|
||||
#define FM_FMRI_MEM_MEMCONFIG "memconfig"
|
||||
#define FM_FMRI_MEM_OFFSET "offset"
|
||||
|
||||
/* mod scheme member names */
|
||||
#define FM_FMRI_MOD_PKG "mod-pkg"
|
||||
#define FM_FMRI_MOD_NAME "mod-name"
|
||||
#define FM_FMRI_MOD_ID "mod-id"
|
||||
#define FM_FMRI_MOD_DESC "mod-desc"
|
||||
|
||||
/* zfs scheme member names */
|
||||
#define FM_FMRI_ZFS_POOL "pool"
|
||||
#define FM_FMRI_ZFS_VDEV "vdev"
|
||||
|
||||
extern nv_alloc_t *fm_nva_xcreate(char *, size_t);
|
||||
extern void fm_nva_xdestroy(nv_alloc_t *);
|
||||
|
||||
extern nvlist_t *fm_nvlist_create(nv_alloc_t *);
|
||||
extern void fm_nvlist_destroy(nvlist_t *, int);
|
||||
|
||||
#define FM_NVA_FREE 0 /* free allocator on nvlist_destroy */
|
||||
#define FM_NVA_RETAIN 1 /* keep allocator on nvlist_destroy */
|
||||
|
||||
extern void fm_ereport_set(nvlist_t *, int, const char *, uint64_t,
|
||||
const nvlist_t *, ...);
|
||||
extern void fm_payload_set(nvlist_t *, ...);
|
||||
extern int i_fm_payload_set(nvlist_t *, const char *, va_list);
|
||||
extern void fm_fmri_hc_set(nvlist_t *, int, const nvlist_t *, nvlist_t *,
|
||||
int, ...);
|
||||
extern void fm_fmri_dev_set(nvlist_t *, int, const nvlist_t *, const char *,
|
||||
const char *);
|
||||
extern void fm_fmri_de_set(nvlist_t *, int, const nvlist_t *, const char *);
|
||||
extern void fm_fmri_cpu_set(nvlist_t *, int, const nvlist_t *, uint32_t,
|
||||
uint8_t *, const char *);
|
||||
extern void fm_fmri_mem_set(nvlist_t *, int, const nvlist_t *, const char *,
|
||||
const char *, uint64_t);
|
||||
extern void fm_authority_set(nvlist_t *, int, const char *, const char *,
|
||||
const char *, const char *);
|
||||
extern void fm_fmri_zfs_set(nvlist_t *, int, uint64_t, uint64_t);
|
||||
|
||||
extern uint64_t fm_ena_increment(uint64_t);
|
||||
extern uint64_t fm_ena_generate(uint64_t, uchar_t);
|
||||
extern uint64_t fm_ena_generate_cpu(uint64_t, processorid_t, uchar_t);
|
||||
extern uint64_t fm_ena_generation_get(uint64_t);
|
||||
extern uchar_t fm_ena_format_get(uint64_t);
|
||||
extern uint64_t fm_ena_id_get(uint64_t);
|
||||
extern uint64_t fm_ena_time_get(uint64_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_FM_PROTOCOL_H */
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_FM_UTIL_H
|
||||
#define _SYS_FM_UTIL_H
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/nvpair.h>
|
||||
#include <sys/errorq.h>
|
||||
|
||||
/*
|
||||
* Shared user/kernel definitions for class length, error channel name,
|
||||
* and kernel event publisher string.
|
||||
*/
|
||||
#define FM_MAX_CLASS 100
|
||||
#define FM_ERROR_CHAN "com.sun:fm:error"
|
||||
#define FM_PUB "fm"
|
||||
|
||||
/*
|
||||
* ereport dump device transport support
|
||||
*
|
||||
* Ereports are written out to the dump device at a proscribed offset from the
|
||||
* end, similar to in-transit log messages. The ereports are represented as a
|
||||
* erpt_dump_t header followed by ed_size bytes of packed native nvlist data.
|
||||
*
|
||||
* NOTE: All of these constants and the header must be defined so they have the
|
||||
* same representation for *both* 32-bit and 64-bit producers and consumers.
|
||||
*/
|
||||
#define ERPT_MAGIC 0xf00d4eddU
|
||||
#define ERPT_MAX_ERRS 16
|
||||
#define ERPT_DATA_SZ (6 * 1024)
|
||||
#define ERPT_EVCH_MAX 256
|
||||
#define ERPT_HIWAT 64
|
||||
|
||||
typedef struct erpt_dump {
|
||||
uint32_t ed_magic; /* ERPT_MAGIC or zero to indicate end */
|
||||
uint32_t ed_chksum; /* checksum32() of packed nvlist data */
|
||||
uint32_t ed_size; /* ereport (nvl) fixed buf size */
|
||||
uint32_t ed_pad; /* reserved for future use */
|
||||
hrtime_t ed_hrt_nsec; /* hrtime of this ereport */
|
||||
hrtime_t ed_hrt_base; /* hrtime sample corresponding to ed_tod_base */
|
||||
struct {
|
||||
uint64_t sec; /* seconds since gettimeofday() Epoch */
|
||||
uint64_t nsec; /* nanoseconds past ed_tod_base.sec */
|
||||
} ed_tod_base;
|
||||
} erpt_dump_t;
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/systm.h>
|
||||
|
||||
#define FM_STK_DEPTH 20 /* maximum stack depth */
|
||||
#define FM_SYM_SZ 64 /* maximum symbol size */
|
||||
#define FM_ERR_PIL 2 /* PIL for ereport_errorq drain processing */
|
||||
|
||||
#define FM_EREPORT_PAYLOAD_NAME_STACK "stack"
|
||||
|
||||
extern errorq_t *ereport_errorq;
|
||||
extern void *ereport_dumpbuf;
|
||||
extern size_t ereport_dumplen;
|
||||
|
||||
extern void fm_init(void);
|
||||
extern void fm_nvprint(nvlist_t *);
|
||||
extern void fm_panic(const char *, ...);
|
||||
extern void fm_banner(void);
|
||||
|
||||
extern void fm_ereport_dump(void);
|
||||
extern void fm_ereport_post(nvlist_t *, int);
|
||||
|
||||
extern void fm_payload_stack_add(nvlist_t *, const pc_t *, int);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_FM_UTIL_H */
|
|
@ -438,9 +438,6 @@ spa_errlog_sync(spa_t *spa, uint64_t txg)
|
|||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
/* error handling */
|
||||
EXPORT_SYMBOL(spa_log_error);
|
||||
EXPORT_SYMBOL(zfs_ereport_post);
|
||||
EXPORT_SYMBOL(zfs_post_remove);
|
||||
EXPORT_SYMBOL(zfs_post_autoreplace);
|
||||
EXPORT_SYMBOL(spa_get_errlog_size);
|
||||
EXPORT_SYMBOL(spa_get_errlog);
|
||||
EXPORT_SYMBOL(spa_errlog_rotate);
|
||||
|
|
|
@ -1487,7 +1487,6 @@ EXPORT_SYMBOL(spa_get_space);
|
|||
EXPORT_SYMBOL(spa_get_dspace);
|
||||
EXPORT_SYMBOL(spa_get_asize);
|
||||
EXPORT_SYMBOL(spa_max_replication);
|
||||
EXPORT_SYMBOL(spa_busy);
|
||||
EXPORT_SYMBOL(spa_get_failmode);
|
||||
EXPORT_SYMBOL(spa_suspended);
|
||||
|
||||
|
|
|
@ -348,8 +348,8 @@ txg_dispatch_callbacks(dsl_pool_t *dp, uint64_t txg)
|
|||
* Commit callback taskq hasn't been created yet.
|
||||
*/
|
||||
tx->tx_commit_cb_taskq = taskq_create("tx_commit_cb",
|
||||
max_ncpus, minclsyspri, max_ncpus, max_ncpus * 4,
|
||||
TASKQ_PREPOPULATE);
|
||||
100, minclsyspri, max_ncpus, max_ncpus * 4,
|
||||
TASKQ_PREPOPULATE | TASKQ_THREADS_CPU_PCT);
|
||||
}
|
||||
|
||||
tcb = kmem_alloc(sizeof (tx_cb_t), KM_SLEEP);
|
||||
|
@ -446,8 +446,6 @@ txg_sync_thread(dsl_pool_t *dp)
|
|||
rw_exit(&tx->tx_suspend);
|
||||
cv_broadcast(&tx->tx_sync_done_cv);
|
||||
}
|
||||
|
||||
thread_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -492,8 +490,6 @@ txg_quiesce_thread(dsl_pool_t *dp)
|
|||
cv_broadcast(&tx->tx_sync_more_cv);
|
||||
cv_broadcast(&tx->tx_quiesce_done_cv);
|
||||
}
|
||||
|
||||
thread_exit();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -139,7 +139,7 @@ typedef struct raidz_map {
|
|||
(mask) = (x) & 0x8080808080808080ULL; \
|
||||
(mask) = ((mask) << 1) - ((mask) >> 7); \
|
||||
(x) = (((x) << 1) & 0xfefefefefefefefeULL) ^ \
|
||||
((mask) & 0x1d1d1d1d1d1d1d1d); \
|
||||
((mask) & 0x1d1d1d1d1d1d1d1dULL); \
|
||||
}
|
||||
|
||||
#define VDEV_RAIDZ_64MUL_4(x, mask) \
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
#include "zfs_namecheck.h"
|
||||
#include "zfs_prop.h"
|
||||
#include "zfs_deleg.h"
|
||||
#include "zfs_config.h"
|
||||
|
||||
extern struct modlfs zfs_modlfs;
|
||||
|
||||
|
@ -3796,27 +3795,15 @@ static struct dev_ops zfs_dev_ops = {
|
|||
};
|
||||
|
||||
static struct modldrv zfs_modldrv = {
|
||||
#ifdef HAVE_SPL
|
||||
NULL,
|
||||
#else
|
||||
&mod_driverops,
|
||||
#endif /* HAVE_SPL */
|
||||
"ZFS storage pool",
|
||||
&zfs_dev_ops
|
||||
};
|
||||
|
||||
static struct modlinkage modlinkage = {
|
||||
MODREV_1,
|
||||
#ifdef HAVE_ZPL
|
||||
(void *)&zfs_modlfs,
|
||||
#else
|
||||
NULL,
|
||||
#endif /* HAVE_ZPL */
|
||||
(void *)&zfs_modldrv,
|
||||
#ifdef HAVE_SPL
|
||||
ZFS_MAJOR,
|
||||
ZFS_MINORS,
|
||||
#endif /* HAVE_SPL */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -3847,8 +3834,6 @@ _init(void)
|
|||
ASSERT(error == 0);
|
||||
mutex_init(&zfs_share_lock, NULL, MUTEX_DEFAULT, NULL);
|
||||
|
||||
printk(KERN_INFO "ZFS: Loaded ZFS Filesystem v%s\n", ZFS_META_VERSION);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -3881,17 +3866,8 @@ _fini(void)
|
|||
return (error);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SPL
|
||||
spl_module_init(_init);
|
||||
spl_module_exit(_fini);
|
||||
|
||||
MODULE_AUTHOR("Sun Microsystems, Inc");
|
||||
MODULE_DESCRIPTION("ZFS");
|
||||
MODULE_LICENSE("CDDL");
|
||||
#else
|
||||
int
|
||||
_info(struct modinfo *modinfop)
|
||||
{
|
||||
return (mod_info(&modlinkage, modinfop));
|
||||
}
|
||||
#endif /* HAVE_SPL */
|
||||
|
|
|
@ -460,7 +460,7 @@ static void
|
|||
zfs_range_unlock_reader(znode_t *zp, rl_t *remove)
|
||||
{
|
||||
avl_tree_t *tree = &zp->z_range_avl;
|
||||
rl_t *rl, *next;
|
||||
rl_t *rl, *next = NULL;
|
||||
uint64_t len;
|
||||
|
||||
/*
|
||||
|
|
1835
module/zfs/zvol.c
1835
module/zfs/zvol.c
File diff suppressed because it is too large
Load Diff
|
@ -5,9 +5,11 @@
|
|||
# utilities will be used. If no .script-config can be found then the
|
||||
# installed kernel modules and utilities will be used.
|
||||
|
||||
basedir="$(dirname $0)"
|
||||
|
||||
SCRIPT_CONFIG=.script-config
|
||||
if [ -f ../${SCRIPT_CONFIG} ]; then
|
||||
. ../${SCRIPT_CONFIG}
|
||||
if [ -f "${basedir}/../${SCRIPT_CONFIG}" ]; then
|
||||
. "${basedir}/../${SCRIPT_CONFIG}"
|
||||
else
|
||||
MODULES=(zlib_deflate spl zavl znvpair zunicode zcommon zfs)
|
||||
fi
|
||||
|
@ -19,19 +21,20 @@ FORCE=
|
|||
FORCE_FLAG=
|
||||
DUMP_LOG=
|
||||
ERROR=
|
||||
UPATH="/dev/disk/zpool"
|
||||
RAID0S=()
|
||||
RAID10S=()
|
||||
RAIDZS=()
|
||||
RAIDZ2S=()
|
||||
|
||||
UDEVDIR=${UDEVDIR:-/usr/libexec/zfs/udev-rules}
|
||||
ETCDIR=${ETCDIR:-/etc}
|
||||
DEVDIR=${DEVDIR:-/dev/disk/zpool}
|
||||
ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config}
|
||||
|
||||
ZDB=${ZDB:-/usr/sbin/zdb}
|
||||
ZFS=${ZFS:-/usr/sbin/zfs}
|
||||
ZINJECT=${ZINJECT:-/usr/sbin/zinject}
|
||||
ZPOOL=${ZPOOL:-/usr/sbin/zpool}
|
||||
ZPOOL_ID=${ZPOOL_ID:-/usr/bin/zpool_id}
|
||||
ZTEST=${ZTEST:-/usr/sbin/ztest}
|
||||
|
||||
COMMON_SH=${COMMON_SH:-/usr/libexec/zfs/common.sh}
|
||||
|
@ -44,6 +47,8 @@ RMMOD=${RMMOD:-/sbin/rmmod}
|
|||
INFOMOD=${INFOMOD:-/sbin/modinfo}
|
||||
LOSETUP=${LOSETUP:-/sbin/losetup}
|
||||
SYSCTL=${SYSCTL:-/sbin/sysctl}
|
||||
UDEVADM=${UDEVADM:-/sbin/udevadm}
|
||||
AWK=${AWK:-/bin/awk}
|
||||
|
||||
die() {
|
||||
echo -e "${PROG}: $1" >&2
|
||||
|
@ -159,7 +164,7 @@ unload_module() {
|
|||
|
||||
unload_modules() {
|
||||
local MODULES_REVERSE=( $(echo ${MODULES[@]} |
|
||||
awk '{for (i=NF;i>=1;i--) printf $i" "} END{print ""}') )
|
||||
${AWK} '{for (i=NF;i>=1;i--) printf $i" "} END{print ""}') )
|
||||
|
||||
for MOD in ${MODULES_REVERSE[*]}; do
|
||||
local NAME=`basename ${MOD} .ko`
|
||||
|
@ -205,13 +210,54 @@ unused_loop_device() {
|
|||
#
|
||||
udev_setup() {
|
||||
local SRC_PATH=$1
|
||||
local DST_FILE=`basename ${SRC_PATH} | cut -f1-2 -d'.'`
|
||||
local DST_PATH=/etc/udev/rules.d/${DST_FILE}
|
||||
|
||||
cp -f ${SRC_PATH} ${DST_PATH}
|
||||
# When running in tree manually contruct symlinks in tree to
|
||||
# the proper devices. Symlinks are installed for all entires
|
||||
# in the config file regardless of if that device actually
|
||||
# exists. When installed as a package udev can be relied on for
|
||||
# this and it will only create links for devices which exist.
|
||||
if [ ${INTREE} ]; then
|
||||
PWD=`pwd`
|
||||
mkdir -p ${DEVDIR}/
|
||||
cd ${DEVDIR}/
|
||||
${AWK} '!/^#/ && /./ { system( \
|
||||
"ln -f -s /dev/disk/by-path/"$2" "$1";" \
|
||||
"ln -f -s /dev/disk/by-path/"$2"-part1 "$1"p1;" \
|
||||
"ln -f -s /dev/disk/by-path/"$2"-part9 "$1"p9;" \
|
||||
) }' $SRC_PATH
|
||||
cd ${PWD}
|
||||
else
|
||||
DST_FILE=`basename ${SRC_PATH} | cut -f1-2 -d'.'`
|
||||
DST_PATH=/etc/zfs/${DST_FILE}
|
||||
|
||||
udevadm trigger
|
||||
udevadm settle
|
||||
if [ -e ${DST_PATH} ]; then
|
||||
die "Error: Config ${DST_PATH} already exists"
|
||||
fi
|
||||
|
||||
cp ${SRC_PATH} ${DST_PATH}
|
||||
|
||||
if [ -f ${UDEVADM} ]; then
|
||||
${UDEVADM} trigger
|
||||
${UDEVADM} settle
|
||||
else
|
||||
/sbin/udevtrigger
|
||||
/sbin/udevsettle
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
udev_cleanup() {
|
||||
local SRC_PATH=$1
|
||||
|
||||
if [ ${INTREE} ]; then
|
||||
PWD=`pwd`
|
||||
cd ${DEVDIR}/
|
||||
${AWK} '!/^#/ && /./ { system( \
|
||||
"rm -f "$1" "$1"p1 "$1"p9") }' $SRC_PATH
|
||||
cd ${PWD}
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
@ -232,7 +278,7 @@ udev_raid0_setup() {
|
|||
for RANK in `seq 1 ${RANKS}`; do
|
||||
for CHANNEL in `seq 1 ${CHANNELS}`; do
|
||||
DISK=`udev_cr2d ${CHANNEL} ${RANK}`
|
||||
RAID0S[${IDX}]="${UPATH}/${DISK}"
|
||||
RAID0S[${IDX}]="${DEVDIR}/${DISK}"
|
||||
let IDX=IDX+1
|
||||
done
|
||||
done
|
||||
|
@ -251,7 +297,7 @@ udev_raid10_setup() {
|
|||
let CHANNEL2=CHANNEL1+1
|
||||
DISK1=`udev_cr2d ${CHANNEL1} ${RANK}`
|
||||
DISK2=`udev_cr2d ${CHANNEL2} ${RANK}`
|
||||
GROUP="${UPATH}/${DISK1} ${UPATH}/${DISK2}"
|
||||
GROUP="${DEVDIR}/${DISK1} ${DEVDIR}/${DISK2}"
|
||||
RAID10S[${IDX}]="mirror ${GROUP}"
|
||||
let IDX=IDX+1
|
||||
done
|
||||
|
@ -270,7 +316,7 @@ udev_raidz_setup() {
|
|||
|
||||
for CHANNEL in `seq 1 ${CHANNELS}`; do
|
||||
DISK=`udev_cr2d ${CHANNEL} ${RANK}`
|
||||
RAIDZ[${CHANNEL}]="${UPATH}/${DISK}"
|
||||
RAIDZ[${CHANNEL}]="${DEVDIR}/${DISK}"
|
||||
done
|
||||
|
||||
RAIDZS[${RANK}]="${RAIDZ[*]}"
|
||||
|
@ -289,7 +335,7 @@ udev_raidz2_setup() {
|
|||
|
||||
for CHANNEL in `seq 1 ${CHANNELS}`; do
|
||||
DISK=`udev_cr2d ${CHANNEL} ${RANK}`
|
||||
RAIDZ2[${CHANNEL}]="${UPATH}/${DISK}"
|
||||
RAIDZ2[${CHANNEL}]="${DEVDIR}/${DISK}"
|
||||
done
|
||||
|
||||
RAIDZ2S[${RANK}]="${RAIDZ2[*]}"
|
||||
|
|
|
@ -1,331 +0,0 @@
|
|||
#
|
||||
# /etc/udev/rules.d/99-zpool.rules
|
||||
#
|
||||
|
||||
ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p"
|
||||
|
||||
# Full devices (*:pci*port:*:id*)
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/a1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/a2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/a3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/a4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/a5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:8*", SYMLINK+="disk/zpool/a6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:9*", SYMLINK+="disk/zpool/a7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:10*", SYMLINK+="disk/zpool/a8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:11*", SYMLINK+="disk/zpool/a9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:12*", SYMLINK+="disk/zpool/a10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:13*", SYMLINK+="disk/zpool/a11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:14*", SYMLINK+="disk/zpool/a12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:15*", SYMLINK+="disk/zpool/a13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:16*", SYMLINK+="disk/zpool/a14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:17*", SYMLINK+="disk/zpool/a15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:3*", SYMLINK+="disk/zpool/b1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:4*", SYMLINK+="disk/zpool/b2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:5*", SYMLINK+="disk/zpool/b3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:6*", SYMLINK+="disk/zpool/b4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:7*", SYMLINK+="disk/zpool/b5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:8*", SYMLINK+="disk/zpool/b6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:9*", SYMLINK+="disk/zpool/b7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:10*", SYMLINK+="disk/zpool/b8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:11*", SYMLINK+="disk/zpool/b9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:12*", SYMLINK+="disk/zpool/b10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:13*", SYMLINK+="disk/zpool/b11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:14*", SYMLINK+="disk/zpool/b12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:15*", SYMLINK+="disk/zpool/b13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:16*", SYMLINK+="disk/zpool/b14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:17*", SYMLINK+="disk/zpool/b15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:8*", SYMLINK+="disk/zpool/c6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:9*", SYMLINK+="disk/zpool/c7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:10*", SYMLINK+="disk/zpool/c8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:11*", SYMLINK+="disk/zpool/c9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:12*", SYMLINK+="disk/zpool/c10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:13*", SYMLINK+="disk/zpool/c11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:14*", SYMLINK+="disk/zpool/c12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:15*", SYMLINK+="disk/zpool/c13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:16*", SYMLINK+="disk/zpool/c14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:17*", SYMLINK+="disk/zpool/c15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:3*", SYMLINK+="disk/zpool/d1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:4*", SYMLINK+="disk/zpool/d2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:5*", SYMLINK+="disk/zpool/d3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:6*", SYMLINK+="disk/zpool/d4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:7*", SYMLINK+="disk/zpool/d5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:8*", SYMLINK+="disk/zpool/d6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:9*", SYMLINK+="disk/zpool/d7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:10*", SYMLINK+="disk/zpool/d8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:11*", SYMLINK+="disk/zpool/d9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:12*", SYMLINK+="disk/zpool/d10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:13*", SYMLINK+="disk/zpool/d11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:14*", SYMLINK+="disk/zpool/d12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:15*", SYMLINK+="disk/zpool/d13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:16*", SYMLINK+="disk/zpool/d14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:17*", SYMLINK+="disk/zpool/d15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:3*", SYMLINK+="disk/zpool/e1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:4*", SYMLINK+="disk/zpool/e2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:5*", SYMLINK+="disk/zpool/e3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:6*", SYMLINK+="disk/zpool/e4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:7*", SYMLINK+="disk/zpool/e5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:8*", SYMLINK+="disk/zpool/e6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:9*", SYMLINK+="disk/zpool/e7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:10*", SYMLINK+="disk/zpool/e8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:11*", SYMLINK+="disk/zpool/e9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:12*", SYMLINK+="disk/zpool/e10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:13*", SYMLINK+="disk/zpool/e11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:14*", SYMLINK+="disk/zpool/e12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:15*", SYMLINK+="disk/zpool/e13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:16*", SYMLINK+="disk/zpool/e14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:17*", SYMLINK+="disk/zpool/e15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:3*", SYMLINK+="disk/zpool/f1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:4*", SYMLINK+="disk/zpool/f2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:5*", SYMLINK+="disk/zpool/f3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:6*", SYMLINK+="disk/zpool/f4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:7*", SYMLINK+="disk/zpool/f5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:8*", SYMLINK+="disk/zpool/f6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:9*", SYMLINK+="disk/zpool/f7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:10*", SYMLINK+="disk/zpool/f8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:11*", SYMLINK+="disk/zpool/f9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:12*", SYMLINK+="disk/zpool/f10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:13*", SYMLINK+="disk/zpool/f11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:14*", SYMLINK+="disk/zpool/f12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:15*", SYMLINK+="disk/zpool/f13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:16*", SYMLINK+="disk/zpool/f14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:17*", SYMLINK+="disk/zpool/f15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:3*", SYMLINK+="disk/zpool/g1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:4*", SYMLINK+="disk/zpool/g2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:5*", SYMLINK+="disk/zpool/g3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:6*", SYMLINK+="disk/zpool/g4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:7*", SYMLINK+="disk/zpool/g5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:8*", SYMLINK+="disk/zpool/g6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:9*", SYMLINK+="disk/zpool/g7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:10*", SYMLINK+="disk/zpool/g8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:11*", SYMLINK+="disk/zpool/g9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:12*", SYMLINK+="disk/zpool/g10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:13*", SYMLINK+="disk/zpool/g11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:14*", SYMLINK+="disk/zpool/g12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:15*", SYMLINK+="disk/zpool/g13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:16*", SYMLINK+="disk/zpool/g14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:17*", SYMLINK+="disk/zpool/g15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:3*", SYMLINK+="disk/zpool/h1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:4*", SYMLINK+="disk/zpool/h2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:5*", SYMLINK+="disk/zpool/h3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:6*", SYMLINK+="disk/zpool/h4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:7*", SYMLINK+="disk/zpool/h5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:8*", SYMLINK+="disk/zpool/h6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:9*", SYMLINK+="disk/zpool/h7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:10*", SYMLINK+="disk/zpool/h8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:11*", SYMLINK+="disk/zpool/h9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:12*", SYMLINK+="disk/zpool/h10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:13*", SYMLINK+="disk/zpool/h11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:14*", SYMLINK+="disk/zpool/h12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:15*", SYMLINK+="disk/zpool/h13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:16*", SYMLINK+="disk/zpool/h14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:17*", SYMLINK+="disk/zpool/h15"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:0*", SYMLINK+="disk/zpool/i1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:1*", SYMLINK+="disk/zpool/i2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:2*", SYMLINK+="disk/zpool/i3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:3*", SYMLINK+="disk/zpool/i4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:4*", SYMLINK+="disk/zpool/i5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:5*", SYMLINK+="disk/zpool/i6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:6*", SYMLINK+="disk/zpool/i7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:7*", SYMLINK+="disk/zpool/i8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:8*", SYMLINK+="disk/zpool/i9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:9*", SYMLINK+="disk/zpool/i10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:10*", SYMLINK+="disk/zpool/i11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:11*", SYMLINK+="disk/zpool/i12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:12*", SYMLINK+="disk/zpool/i13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:13*", SYMLINK+="disk/zpool/i14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:14*", SYMLINK+="disk/zpool/i15"
|
||||
#ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:15*", SYMLINK+="disk/zpool/i16"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:0*", SYMLINK+="disk/zpool/j1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:1*", SYMLINK+="disk/zpool/j2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:2*", SYMLINK+="disk/zpool/j3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:3*", SYMLINK+="disk/zpool/j4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:4*", SYMLINK+="disk/zpool/j5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:5*", SYMLINK+="disk/zpool/j6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:6*", SYMLINK+="disk/zpool/j7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:7*", SYMLINK+="disk/zpool/j8"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:8*", SYMLINK+="disk/zpool/j9"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:9*", SYMLINK+="disk/zpool/j10"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:10*", SYMLINK+="disk/zpool/j11"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:11*", SYMLINK+="disk/zpool/j12"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:12*", SYMLINK+="disk/zpool/j13"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:13*", SYMLINK+="disk/zpool/j14"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:14*", SYMLINK+="disk/zpool/j15"
|
||||
#ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:15*", SYMLINK+="disk/zpool/j16"
|
||||
|
||||
# Partitions (*:pci*port:*:id*)
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/a1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/a2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/a3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/a4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/a5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:8*", SYMLINK+="disk/zpool/a6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:9*", SYMLINK+="disk/zpool/a7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:10*", SYMLINK+="disk/zpool/a8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:11*", SYMLINK+="disk/zpool/a9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:12*", SYMLINK+="disk/zpool/a10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:13*", SYMLINK+="disk/zpool/a11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:14*", SYMLINK+="disk/zpool/a12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:15*", SYMLINK+="disk/zpool/a13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:16*", SYMLINK+="disk/zpool/a14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:17*", SYMLINK+="disk/zpool/a15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:3*", SYMLINK+="disk/zpool/b1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:4*", SYMLINK+="disk/zpool/b2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:5*", SYMLINK+="disk/zpool/b3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:6*", SYMLINK+="disk/zpool/b4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:7*", SYMLINK+="disk/zpool/b5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:8*", SYMLINK+="disk/zpool/b6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:9*", SYMLINK+="disk/zpool/b7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:10*", SYMLINK+="disk/zpool/b8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:11*", SYMLINK+="disk/zpool/b9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:12*", SYMLINK+="disk/zpool/b10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:13*", SYMLINK+="disk/zpool/b11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:14*", SYMLINK+="disk/zpool/b12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:15*", SYMLINK+="disk/zpool/b13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:16*", SYMLINK+="disk/zpool/b14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:17*", SYMLINK+="disk/zpool/b15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:8*", SYMLINK+="disk/zpool/c6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:9*", SYMLINK+="disk/zpool/c7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:10*", SYMLINK+="disk/zpool/c8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:11*", SYMLINK+="disk/zpool/c9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:12*", SYMLINK+="disk/zpool/c10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:13*", SYMLINK+="disk/zpool/c11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:14*", SYMLINK+="disk/zpool/c12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:15*", SYMLINK+="disk/zpool/c13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:16*", SYMLINK+="disk/zpool/c14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:17*", SYMLINK+="disk/zpool/c15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:3*", SYMLINK+="disk/zpool/d1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:4*", SYMLINK+="disk/zpool/d2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:5*", SYMLINK+="disk/zpool/d3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:6*", SYMLINK+="disk/zpool/d4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:7*", SYMLINK+="disk/zpool/d5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:8*", SYMLINK+="disk/zpool/d6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:9*", SYMLINK+="disk/zpool/d7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:10*", SYMLINK+="disk/zpool/d8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:11*", SYMLINK+="disk/zpool/d9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:12*", SYMLINK+="disk/zpool/d10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:13*", SYMLINK+="disk/zpool/d11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:14*", SYMLINK+="disk/zpool/d12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:15*", SYMLINK+="disk/zpool/d13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:16*", SYMLINK+="disk/zpool/d14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:17*", SYMLINK+="disk/zpool/d15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:3*", SYMLINK+="disk/zpool/e1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:4*", SYMLINK+="disk/zpool/e2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:5*", SYMLINK+="disk/zpool/e3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:6*", SYMLINK+="disk/zpool/e4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:7*", SYMLINK+="disk/zpool/e5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:8*", SYMLINK+="disk/zpool/e6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:9*", SYMLINK+="disk/zpool/e7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:10*", SYMLINK+="disk/zpool/e8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:11*", SYMLINK+="disk/zpool/e9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:12*", SYMLINK+="disk/zpool/e10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:13*", SYMLINK+="disk/zpool/e11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:14*", SYMLINK+="disk/zpool/e12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:15*", SYMLINK+="disk/zpool/e13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:16*", SYMLINK+="disk/zpool/e14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:17*", SYMLINK+="disk/zpool/e15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:3*", SYMLINK+="disk/zpool/f1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:4*", SYMLINK+="disk/zpool/f2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:5*", SYMLINK+="disk/zpool/f3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:6*", SYMLINK+="disk/zpool/f4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:7*", SYMLINK+="disk/zpool/f5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:8*", SYMLINK+="disk/zpool/f6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:9*", SYMLINK+="disk/zpool/f7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:10*", SYMLINK+="disk/zpool/f8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:11*", SYMLINK+="disk/zpool/f9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:12*", SYMLINK+="disk/zpool/f10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:13*", SYMLINK+="disk/zpool/f11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:14*", SYMLINK+="disk/zpool/f12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:15*", SYMLINK+="disk/zpool/f13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:16*", SYMLINK+="disk/zpool/f14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:17*", SYMLINK+="disk/zpool/f15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:3*", SYMLINK+="disk/zpool/g1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:4*", SYMLINK+="disk/zpool/g2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:5*", SYMLINK+="disk/zpool/g3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:6*", SYMLINK+="disk/zpool/g4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:7*", SYMLINK+="disk/zpool/g5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:8*", SYMLINK+="disk/zpool/g6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:9*", SYMLINK+="disk/zpool/g7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:10*", SYMLINK+="disk/zpool/g8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:11*", SYMLINK+="disk/zpool/g9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:12*", SYMLINK+="disk/zpool/g10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:13*", SYMLINK+="disk/zpool/g11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:14*", SYMLINK+="disk/zpool/g12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:15*", SYMLINK+="disk/zpool/g13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:16*", SYMLINK+="disk/zpool/g14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:17*", SYMLINK+="disk/zpool/g15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:3*", SYMLINK+="disk/zpool/h1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:4*", SYMLINK+="disk/zpool/h2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:5*", SYMLINK+="disk/zpool/h3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:6*", SYMLINK+="disk/zpool/h4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:7*", SYMLINK+="disk/zpool/h5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:8*", SYMLINK+="disk/zpool/h6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:9*", SYMLINK+="disk/zpool/h7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:10*", SYMLINK+="disk/zpool/h8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:11*", SYMLINK+="disk/zpool/h9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:12*", SYMLINK+="disk/zpool/h10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:13*", SYMLINK+="disk/zpool/h11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:14*", SYMLINK+="disk/zpool/h12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:15*", SYMLINK+="disk/zpool/h13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:16*", SYMLINK+="disk/zpool/h14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:17*", SYMLINK+="disk/zpool/h15-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:0*", SYMLINK+="disk/zpool/i1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:1*", SYMLINK+="disk/zpool/i2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:2*", SYMLINK+="disk/zpool/i3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:3*", SYMLINK+="disk/zpool/i4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:4*", SYMLINK+="disk/zpool/i5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:5*", SYMLINK+="disk/zpool/i6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:6*", SYMLINK+="disk/zpool/i7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:7*", SYMLINK+="disk/zpool/i8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:8*", SYMLINK+="disk/zpool/i9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:9*", SYMLINK+="disk/zpool/i10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:10*", SYMLINK+="disk/zpool/i11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:11*", SYMLINK+="disk/zpool/i12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:12*", SYMLINK+="disk/zpool/i13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:13*", SYMLINK+="disk/zpool/i14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:14*", SYMLINK+="disk/zpool/i15-part%n"
|
||||
#ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:15*", SYMLINK+="disk/zpool/i16-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:0*", SYMLINK+="disk/zpool/j1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:1*", SYMLINK+="disk/zpool/j2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:2*", SYMLINK+="disk/zpool/j3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:3*", SYMLINK+="disk/zpool/j4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:4*", SYMLINK+="disk/zpool/j5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:5*", SYMLINK+="disk/zpool/j6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:6*", SYMLINK+="disk/zpool/j7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:7*", SYMLINK+="disk/zpool/j8-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:8*", SYMLINK+="disk/zpool/j9-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:9*", SYMLINK+="disk/zpool/j10-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:10*", SYMLINK+="disk/zpool/j11-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:11*", SYMLINK+="disk/zpool/j12-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:12*", SYMLINK+="disk/zpool/j13-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:13*", SYMLINK+="disk/zpool/j14-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:14*", SYMLINK+="disk/zpool/j15-part%n"
|
||||
#ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:15*", SYMLINK+="disk/zpool/j16-part%n"
|
|
@ -1,115 +0,0 @@
|
|||
#
|
||||
# /etc/udev/rules.d/99-zpool.rules
|
||||
#
|
||||
|
||||
ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p"
|
||||
|
||||
# Full devices (*:pci*port:*:id*)
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:0*", SYMLINK+="disk/zpool/a1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:1*", SYMLINK+="disk/zpool/a2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:2*", SYMLINK+="disk/zpool/a3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:3*", SYMLINK+="disk/zpool/a4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:4*", SYMLINK+="disk/zpool/a5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:5*", SYMLINK+="disk/zpool/a6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:6*", SYMLINK+="disk/zpool/a7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:7*", SYMLINK+="disk/zpool/a8"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:0*", SYMLINK+="disk/zpool/b1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:1*", SYMLINK+="disk/zpool/b2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:2*", SYMLINK+="disk/zpool/b3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/b4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/b5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/b6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/b7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/b8"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:0*", SYMLINK+="disk/zpool/c1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:1*", SYMLINK+="disk/zpool/c2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:2*", SYMLINK+="disk/zpool/c3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c8"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:0*", SYMLINK+="disk/zpool/d1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:1*", SYMLINK+="disk/zpool/d2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:2*", SYMLINK+="disk/zpool/d3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:3*", SYMLINK+="disk/zpool/d4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:4*", SYMLINK+="disk/zpool/d5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:5*", SYMLINK+="disk/zpool/d6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:6*", SYMLINK+="disk/zpool/d7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:7*", SYMLINK+="disk/zpool/d8"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:0*", SYMLINK+="disk/zpool/e1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:1*", SYMLINK+="disk/zpool/e2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:2*", SYMLINK+="disk/zpool/e3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:3*", SYMLINK+="disk/zpool/e4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:4*", SYMLINK+="disk/zpool/e5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:5*", SYMLINK+="disk/zpool/e6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:6*", SYMLINK+="disk/zpool/e7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:7*", SYMLINK+="disk/zpool/e8"
|
||||
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:0*", SYMLINK+="disk/zpool/f1"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:1*", SYMLINK+="disk/zpool/f2"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:2*", SYMLINK+="disk/zpool/f3"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:3*", SYMLINK+="disk/zpool/f4"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:4*", SYMLINK+="disk/zpool/f5"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:5*", SYMLINK+="disk/zpool/f6"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:6*", SYMLINK+="disk/zpool/f7"
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:7*", SYMLINK+="disk/zpool/f8"
|
||||
|
||||
# Partitions (*:pci*port:*:id*)
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:0*", SYMLINK+="disk/zpool/a1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:1*", SYMLINK+="disk/zpool/a2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:2*", SYMLINK+="disk/zpool/a3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:3*", SYMLINK+="disk/zpool/a4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:4*", SYMLINK+="disk/zpool/a5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:5*", SYMLINK+="disk/zpool/a6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:6*", SYMLINK+="disk/zpool/a7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:7*", SYMLINK+="disk/zpool/a8-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:0*", SYMLINK+="disk/zpool/b1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:1*", SYMLINK+="disk/zpool/b2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:2*", SYMLINK+="disk/zpool/b3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/b4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/b5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/b6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/b7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/b8-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:0*", SYMLINK+="disk/zpool/c1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:1*", SYMLINK+="disk/zpool/c2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:2*", SYMLINK+="disk/zpool/c3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c8-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:0*", SYMLINK+="disk/zpool/d1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:1*", SYMLINK+="disk/zpool/d2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:2*", SYMLINK+="disk/zpool/d3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:3*", SYMLINK+="disk/zpool/d4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:4*", SYMLINK+="disk/zpool/d5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:5*", SYMLINK+="disk/zpool/d6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:6*", SYMLINK+="disk/zpool/d7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:7*", SYMLINK+="disk/zpool/d8-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:0*", SYMLINK+="disk/zpool/e1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:1*", SYMLINK+="disk/zpool/e2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:2*", SYMLINK+="disk/zpool/e3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:3*", SYMLINK+="disk/zpool/e4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:4*", SYMLINK+="disk/zpool/e5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:5*", SYMLINK+="disk/zpool/e6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:6*", SYMLINK+="disk/zpool/e7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:7*", SYMLINK+="disk/zpool/e8-part%n"
|
||||
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:0*", SYMLINK+="disk/zpool/f1-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:1*", SYMLINK+="disk/zpool/f2-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:2*", SYMLINK+="disk/zpool/f3-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:3*", SYMLINK+="disk/zpool/f4-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:4*", SYMLINK+="disk/zpool/f5-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:5*", SYMLINK+="disk/zpool/f6-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:6*", SYMLINK+="disk/zpool/f7-part%n"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:7*", SYMLINK+="disk/zpool/f8-part%n"
|
|
@ -2,9 +2,11 @@
|
|||
#
|
||||
# ZFS/ZPOOL configuration test script.
|
||||
|
||||
basedir="$(dirname $0)"
|
||||
|
||||
SCRIPT_COMMON=common.sh
|
||||
if [ -f ./${SCRIPT_COMMON} ]; then
|
||||
. ./${SCRIPT_COMMON}
|
||||
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
|
||||
. "${basedir}/${SCRIPT_COMMON}"
|
||||
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
|
||||
. /usr/libexec/zfs/${SCRIPT_COMMON}
|
||||
else
|
||||
|
@ -115,4 +117,52 @@ zconfig_test2() {
|
|||
}
|
||||
zconfig_test2
|
||||
|
||||
# ZVOL sanity check
|
||||
zconfig_test3() {
|
||||
POOL_NAME=tank
|
||||
ZVOL_NAME=fish
|
||||
FULL_NAME=${POOL_NAME}/${ZVOL_NAME}
|
||||
SRC_DIR=/bin/
|
||||
TMP_FILE1=`mktemp`
|
||||
TMP_CACHE=`mktemp -p /tmp zpool.cache.XXXXXXXX`
|
||||
|
||||
echo -n "test 3 - ZVOL sanity: "
|
||||
|
||||
# Create a pool and volume.
|
||||
${ZFS_SH} zfs="spa_config_path=${TMP_CACHE}" || fail 1
|
||||
${ZPOOL_CREATE_SH} -p ${POOL_NAME} -c lo-raidz2 || fail 2
|
||||
${ZFS} create -V 400M ${FULL_NAME} || fail 3
|
||||
|
||||
# Partition the volume, for a 400M volume there will be
|
||||
# 812 cylinders, 16 heads, and 63 sectors per track.
|
||||
/sbin/sfdisk -q /dev/${FULL_NAME} << EOF &>${TMP_FILE1} || fail 4
|
||||
,812
|
||||
;
|
||||
;
|
||||
;
|
||||
EOF
|
||||
|
||||
# Format the partition with ext3.
|
||||
/sbin/mkfs.ext3 /dev/${FULL_NAME}1 &>${TMP_FILE1} || fail 5
|
||||
|
||||
# Mount the ext3 filesystem and copy some data to it.
|
||||
mkdir -p /tmp/${ZVOL_NAME} || fail 6
|
||||
mount /dev/${FULL_NAME}1 /tmp/${ZVOL_NAME} || fail 7
|
||||
cp -RL ${SRC_DIR} /tmp/${ZVOL_NAME} || fail 8
|
||||
|
||||
# Verify the copied files match the original files.
|
||||
diff -ur ${SRC_DIR} /tmp/${ZVOL_NAME}${SRC_DIR} || fail 9
|
||||
|
||||
# Remove the files, umount, destroy the volume and pool.
|
||||
rm -Rf /tmp/${ZVOL_NAME}${SRC_DIR}* || fail 10
|
||||
umount /tmp/${ZVOL_NAME} || fail 11
|
||||
${ZFS} destroy ${FULL_NAME} || fail 12
|
||||
${ZPOOL_CREATE_SH} -p ${POOL_NAME} -c lo-raidz2 -d || fail 13
|
||||
rm -f ${TMP_FILE1} || fail 14
|
||||
${ZFS_SH} -u || fail 15
|
||||
|
||||
pass
|
||||
}
|
||||
zconfig_test3
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -9,6 +9,8 @@ trap die_int INT
|
|||
|
||||
RELEASE=$1
|
||||
PROG=update-zfs.sh
|
||||
REMOTE_DOC_FILE=man-sunosman-20090930.tar.bz2
|
||||
REMOTE_DOC=http://dlc.sun.com/osol/man/downloads/current/${REMOTE_DOC_FILE}
|
||||
REMOTE_SRC=http://dlc.sun.com/osol/on/downloads/${RELEASE}/on-src.tar.bz2
|
||||
|
||||
die() {
|
||||
|
@ -26,36 +28,51 @@ if [ `basename $DST` != "scripts" ]; then
|
|||
die "Must be run from scripts directory"
|
||||
fi
|
||||
|
||||
if [ ! "$RELEASE" ]; then
|
||||
die "Must specify ZFS release build"
|
||||
fi
|
||||
|
||||
SRC=`mktemp -d /tmp/os-${RELEASE}.XXXXXXXXXX`
|
||||
DST=`dirname $DST`
|
||||
|
||||
echo "----------------------------------------------------------------------"
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Remote Source: ${REMOTE_SRC}"
|
||||
echo "Remote Docs: ${REMOTE_DOC}"
|
||||
echo "Local Source: ${SRC}"
|
||||
echo "Local Dest: ${DST}"
|
||||
echo
|
||||
echo "------------- Fetching OpenSolaris ${RELEASE} archive ----------------"
|
||||
wget ${REMOTE_SRC} -P ${SRC} ||
|
||||
wget -q ${REMOTE_SRC} -P ${SRC} ||
|
||||
die "Error 'wget ${REMOTE_SRC}'"
|
||||
|
||||
echo "------------- Fetching OpenSolaris documentation ---------------"
|
||||
wget -q ${REMOTE_DOC} -P ${SRC} ||
|
||||
die "Error 'wget ${REMOTE_DOC}'"
|
||||
|
||||
echo "------------- Unpacking OpenSolaris ${RELEASE} archive ---------------"
|
||||
tar -xjf ${SRC}/on-src.tar.bz2 -C ${SRC} ||
|
||||
die "Error 'tar -xjf ${SRC}/on-src.tar.bz2 -C ${SRC}'"
|
||||
|
||||
echo "------------- Unpacking OpenSolaris documentation --------------"
|
||||
tar -xjf ${SRC}/${REMOTE_DOC_FILE} -C ${SRC} ||
|
||||
die "Error 'tar -xjf ${SRC}/${REMOTE_DOC_FILE} -C ${SRC}'"
|
||||
|
||||
SRC_LIB=${SRC}/usr/src/lib
|
||||
SRC_CMD=${SRC}/usr/src/cmd
|
||||
SRC_CM=${SRC}/usr/src/common
|
||||
SRC_UTS=${SRC}/usr/src/uts
|
||||
SRC_UCM=${SRC}/usr/src/uts/common
|
||||
SRC_ZLIB=${SRC}/usr/src/uts/common/fs/zfs
|
||||
SRC_MAN=${SRC}/man
|
||||
|
||||
DST_MOD=${DST}/module
|
||||
DST_LIB=${DST}/lib
|
||||
DST_CMD=${DST}/cmd
|
||||
DST_MAN=${DST}/man
|
||||
|
||||
umask 022
|
||||
rm -Rf ${DST}/zfs
|
||||
|
||||
echo
|
||||
echo "------------- Updating ZFS from OpenSolaris ${RELEASE} ---------------"
|
||||
echo "* module/avl"
|
||||
mkdir -p ${DST_MOD}/avl/include/sys/
|
||||
|
@ -66,6 +83,7 @@ cp ${SRC_UCM}/sys/avl_impl.h ${DST_MOD}/avl/include/sys/
|
|||
echo "* module/nvpair"
|
||||
mkdir -p ${DST_MOD}/nvpair/include/sys/
|
||||
cp ${SRC_CM}/nvpair/nvpair.c ${DST_MOD}/nvpair/
|
||||
cp ${SRC_CM}/nvpair/nvpair_alloc_fixed.c ${DST_MOD}/nvpair/
|
||||
cp ${SRC_UCM}/sys/nvpair.h ${DST_MOD}/nvpair/include/sys/
|
||||
cp ${SRC_UCM}/sys/nvpair_impl.h ${DST_MOD}/nvpair/include/sys/
|
||||
|
||||
|
@ -77,18 +95,21 @@ cp ${SRC_UCM}/sys/u8_textprep_data.h ${DST_MOD}/unicode/include/sys/
|
|||
|
||||
echo "* module/zcommon"
|
||||
mkdir -p ${DST_MOD}/zcommon/include/sys/fs/
|
||||
mkdir -p ${DST_MOD}/zcommon/include/sys/fm/fs/
|
||||
cp ${SRC_CM}/zfs/*.c ${DST_MOD}/zcommon/
|
||||
cp ${SRC_CM}/zfs/*.h ${DST_MOD}/zcommon/include/
|
||||
cp ${SRC_UCM}/sys/fs/zfs.h ${DST_MOD}/zcommon/include/sys/fs/
|
||||
cp ${SRC_UCM}/sys/fm/fs/zfs.h ${DST_MOD}/zcommon/include/sys/fm/fs/
|
||||
|
||||
echo "* module/zfs"
|
||||
mkdir -p ${DST_MOD}/zpool/include/sys/
|
||||
mkdir -p ${DST_MOD}/zfs/include/sys/fm/fs/
|
||||
cp ${SRC_UTS}/intel/zfs/spa_boot.c ${DST_MOD}/zfs/
|
||||
cp ${SRC_ZLIB}/*.c ${DST_MOD}/zfs/
|
||||
cp ${SRC_ZLIB}/sys/*.h ${DST_MOD}/zfs/include/sys/
|
||||
cp ${SRC_UCM}/os/fm.c ${DST_MOD}/zfs/
|
||||
cp ${SRC_UCM}/sys/fm/protocol.h ${DST_MOD}/zfs/include/sys/fm/
|
||||
cp ${SRC_UCM}/sys/fm/util.h ${DST_MOD}/zfs/include/sys/fm/
|
||||
cp ${SRC_UCM}/sys/fm/fs/zfs.h ${DST_MOD}/zfs/include/sys/fm/fs/
|
||||
rm ${DST_MOD}/zfs/vdev_disk.c
|
||||
rm ${DST_MOD}/zfs/zvol.c
|
||||
rm ${DST_MOD}/zfs/include/sys/vdev_disk.h
|
||||
|
||||
echo "* lib/libavl"
|
||||
|
@ -149,6 +170,13 @@ echo "* cmd/ztest"
|
|||
mkdir -p ${DST_CMD}/ztest
|
||||
cp ${SRC_CMD}/ztest/*.c ${DST_CMD}/ztest/
|
||||
|
||||
echo "* man/"
|
||||
mkdir -p ${DST_MAN}/man8
|
||||
cp ${SRC_MAN}/man1m/zfs.1m ${DST_MAN}/man8/zfs.8
|
||||
cp ${SRC_MAN}/man1m/zpool.1m ${DST_MAN}/man8/zpool.8
|
||||
cp ${SRC_MAN}/man1m/zdb.1m ${DST_MAN}/man8/zdb.8
|
||||
chmod -R 644 ${DST_MAN}/man8/*
|
||||
|
||||
echo "${REMOTE_SRC}" >${DST}/ZFS.RELEASE
|
||||
|
||||
rm -Rf ${SRC}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
#
|
||||
# A simple script to simply the loading/unloading the ZFS module stack.
|
||||
|
||||
basedir="$(dirname $0)"
|
||||
|
||||
SCRIPT_COMMON=common.sh
|
||||
if [ -f ./${SCRIPT_COMMON} ]; then
|
||||
. ./${SCRIPT_COMMON}
|
||||
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
|
||||
. "${basedir}/${SCRIPT_COMMON}"
|
||||
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
|
||||
. /usr/libexec/zfs/${SCRIPT_COMMON}
|
||||
else
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=7
|
|||
CHANNELS=10
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.dragon
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
udev_raid0_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=7
|
|||
CHANNELS=10
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.dragon
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
udev_raid10_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=7
|
|||
CHANNELS=10
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.dragon
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
udev_raidz_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=7
|
|||
CHANNELS=10
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.dragon
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
udev_raidz2_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Supermicro (White Box) Raid-0 Configuration (1x16)
|
||||
#
|
||||
|
||||
RANKS=4
|
||||
CHANNELS=4
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
udev_raid0_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]}
|
||||
${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} || exit 1
|
||||
}
|
||||
|
||||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Supermicro (White Box) Raid-10 Configuration (8x2(1+1))
|
||||
#
|
||||
|
||||
RANKS=4
|
||||
CHANNELS=4
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
udev_raid10_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]}
|
||||
${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} || exit 1
|
||||
}
|
||||
|
||||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Supermicro (White Box) Raid-Z Configuration (4x4(3+1))
|
||||
#
|
||||
|
||||
RANKS=4
|
||||
CHANNELS=4
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
udev_raidz_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]}
|
||||
${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]} || exit 1
|
||||
}
|
||||
|
||||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Supermicro (White Box) Raid-Z2 Configuration (4x4(2+2))
|
||||
#
|
||||
|
||||
RANKS=4
|
||||
CHANNELS=4
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
udev_raidz2_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]}
|
||||
${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1
|
||||
}
|
||||
|
||||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example
|
||||
}
|
|
@ -7,7 +7,7 @@ RANKS=8
|
|||
CHANNELS=6
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.x4550
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
udev_raid0_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=8
|
|||
CHANNELS=6
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.x4550
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
udev_raid10_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=8
|
|||
CHANNELS=6
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.x4550
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
udev_raidz_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RANKS=8
|
|||
CHANNELS=6
|
||||
|
||||
zpool_create() {
|
||||
udev_setup ${UDEVDIR}/99-zpool.rules.x4550
|
||||
udev_setup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
udev_raidz2_setup ${RANKS} ${CHANNELS}
|
||||
|
||||
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]}
|
||||
|
@ -17,4 +17,5 @@ zpool_create() {
|
|||
zpool_destroy() {
|
||||
msg ${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
${ZPOOL} destroy ${ZPOOL_NAME}
|
||||
udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
basedir="$(dirname $0)"
|
||||
|
||||
SCRIPT_COMMON=common.sh
|
||||
if [ -f ./${SCRIPT_COMMON} ]; then
|
||||
. ./${SCRIPT_COMMON}
|
||||
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
|
||||
. "${basedir}/${SCRIPT_COMMON}"
|
||||
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
|
||||
. /usr/libexec/zfs/${SCRIPT_COMMON}
|
||||
else
|
||||
|
|
|
@ -66,8 +66,8 @@
|
|||
%endif
|
||||
%else
|
||||
|
||||
# CHAOS 4.x:
|
||||
%if %{defined ch4}
|
||||
# CHAOS 4.x/5.x:
|
||||
%if %{defined ch4} || %{defined ch5}
|
||||
%if %{undefined kver}
|
||||
%define klnk %{_usrsrc}/kernels/*/include/config
|
||||
%define kver %((echo X; %{__cat} %{klnk}/kernel.release
|
||||
|
@ -85,8 +85,8 @@
|
|||
%endif
|
||||
%else
|
||||
|
||||
# RHEL 5:
|
||||
%if %{defined el5}
|
||||
# RHEL 5.x/6.x:
|
||||
%if %{defined el5} || %{defined el6}
|
||||
%if %{undefined kver}
|
||||
%define klnk %{_usrsrc}/kernels/*/include/config
|
||||
%define kver %((echo X; %{__cat} %{klnk}/kernel.release
|
||||
|
@ -125,14 +125,11 @@
|
|||
|
||||
# Unsupported distro:
|
||||
%if %{undefined kver}
|
||||
%define kver X
|
||||
%define kver %(uname -r)
|
||||
%endif
|
||||
%define kpkg kernel
|
||||
%define kdevpkg kernel-devel
|
||||
%define kverpkg %{kver}
|
||||
%define koppkg =
|
||||
%if %{undefined kdir}
|
||||
%define kdir %{_usrsrc}/kernels/%{kver}
|
||||
%define kdir /lib/modules/%{kver}/build
|
||||
%endif
|
||||
%if %{undefined kobj}
|
||||
%define kobj %{kdir}
|
||||
|
@ -183,7 +180,6 @@
|
|||
%define version @VERSION@
|
||||
%define debug_package %{nil}
|
||||
|
||||
|
||||
# The kernel version should only be appended to a binary RPM. When
|
||||
# building a source RPM it must be kernel version agnostic. This means
|
||||
# the source RPM must never specify a required kernel version, but the
|
||||
|
@ -195,7 +191,9 @@
|
|||
%else
|
||||
%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g')
|
||||
%define release @ZFS_META_RELEASE@_%{relext}
|
||||
%if %{defined kpkg}
|
||||
%define krequires %{kpkg} %{koppkg} %{kverpkg}
|
||||
%endif
|
||||
%define splrequires %{splpkg} = %{splverpkg}
|
||||
%endif
|
||||
|
||||
|
@ -208,9 +206,13 @@ License: @LICENSE@
|
|||
URL: git://eris.llnl.gov/zfs.git
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id} -un)
|
||||
Source: @PACKAGE@-%{version}.tar.gz
|
||||
%if %{defined krequires}
|
||||
Requires: %{krequires}
|
||||
Requires: %{splrequires}
|
||||
%endif
|
||||
%if %{defined kdevpkg}
|
||||
BuildRequires: %{kdevpkg}
|
||||
%endif
|
||||
Requires: %{splrequires}
|
||||
BuildRequires: %{spldevpkg}
|
||||
|
||||
%description
|
||||
|
@ -220,9 +222,13 @@ the %{name} file system.
|
|||
%package devel
|
||||
Summary: ZFS File System Headers and Symbols
|
||||
Group: Development/Libraries
|
||||
%if %{defined krequires}
|
||||
Requires: %{krequires}
|
||||
%endif
|
||||
Requires: %{splrequires}
|
||||
%if %{defined kdevpkg}
|
||||
BuildRequires: %{kdevpkg}
|
||||
%endif
|
||||
BuildRequires: %{spldevpkg}
|
||||
|
||||
%description devel
|
||||
|
|
10
zfs.spec.in
10
zfs.spec.in
|
@ -22,8 +22,13 @@ for the zfs file system.
|
|||
%package devel
|
||||
Summary: ZFS File System User Headers
|
||||
Group: Development/Libraries
|
||||
%if %{defined ch5} || %{defined el6} || %{defined fc12}
|
||||
Requires: zlib libuuid libblkid
|
||||
BuildRequires: zlib-devel libuuid-devel libblkid-devel
|
||||
%else
|
||||
Requires: zlib e2fsprogs
|
||||
BuildRequires: zlib-devel e2fsprogs-devel
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains the header files needed for building
|
||||
|
@ -42,7 +47,7 @@ various system profiling tools to facilitate an in depth analysis.
|
|||
%prep
|
||||
%setup
|
||||
%build
|
||||
%configure --with-config=user --with-blkid
|
||||
%configure --with-config=user --without-blkid
|
||||
make
|
||||
|
||||
%install
|
||||
|
@ -57,7 +62,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%doc AUTHORS ChangeLog COPYING DISCLAIMER GIT
|
||||
%doc OPENSOLARIS.LICENSE README TODO ZFS.RELEASE
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
%{_libdir}/*
|
||||
%{_mandir}/man8/*
|
||||
%{_sysconfdir}/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* Undefine these symbols to allow other autoheader enabled packages
|
||||
* to leverage the ZFS configure checks without a header conflict.
|
||||
*/
|
||||
#undef PACKAGE
|
||||
#undef PACKAGE_BUGREPORT
|
||||
#undef PACKAGE_NAME
|
||||
#undef PACKAGE_STRING
|
||||
#undef PACKAGE_TARNAME
|
||||
#undef PACKAGE_VERSION
|
||||
#undef VERSION
|
||||
#undef STDC_HEADERS
|
Loading…
Reference in New Issue