2010-08-26 18:22:58 +00:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
VPATH = \
|
|
|
|
$(top_srcdir)/module/zfs \
|
|
|
|
$(top_srcdir)/module/zcommon \
|
2018-02-08 16:16:23 +00:00
|
|
|
$(top_srcdir)/module/lua \
|
2014-06-09 21:55:31 +00:00
|
|
|
$(top_srcdir)/lib/libzpool
|
|
|
|
|
2018-01-10 18:49:27 +00:00
|
|
|
# Suppress unused but set variable warnings often due to ASSERTs
|
|
|
|
AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE)
|
|
|
|
|
|
|
|
# Includes kernel code generate warnings for large stack frames
|
|
|
|
AM_CFLAGS += $(FRAME_LARGER_THAN)
|
2010-08-26 18:22:58 +00:00
|
|
|
|
|
|
|
DEFAULT_INCLUDES += \
|
2010-09-04 20:26:23 +00:00
|
|
|
-I$(top_srcdir)/include \
|
|
|
|
-I$(top_srcdir)/lib/libspl/include
|
2010-08-26 18:22:58 +00:00
|
|
|
|
|
|
|
lib_LTLIBRARIES = libzpool.la
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
USER_C = \
|
|
|
|
kernel.c \
|
|
|
|
taskq.c \
|
|
|
|
util.c
|
|
|
|
|
|
|
|
KERNEL_C = \
|
2017-08-09 22:31:08 +00:00
|
|
|
zfeature_common.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
zfs_comutil.c \
|
|
|
|
zfs_deleg.c \
|
|
|
|
zfs_fletcher.c \
|
2017-08-09 22:31:08 +00:00
|
|
|
zfs_fletcher_aarch64_neon.c \
|
|
|
|
zfs_fletcher_avx512.c \
|
2015-12-09 23:34:16 +00:00
|
|
|
zfs_fletcher_intel.c \
|
2016-06-24 03:32:40 +00:00
|
|
|
zfs_fletcher_sse.c \
|
2016-11-04 17:53:03 +00:00
|
|
|
zfs_fletcher_superscalar.c \
|
|
|
|
zfs_fletcher_superscalar4.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
zfs_namecheck.c \
|
|
|
|
zfs_prop.c \
|
|
|
|
zfs_uio.c \
|
|
|
|
zpool_prop.c \
|
|
|
|
zprop_common.c \
|
2016-07-22 15:52:49 +00:00
|
|
|
abd.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
arc.c \
|
|
|
|
blkptr.c \
|
|
|
|
bplist.c \
|
|
|
|
bpobj.c \
|
|
|
|
bptree.c \
|
2015-12-22 01:31:57 +00:00
|
|
|
bqueue.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
dbuf.c \
|
|
|
|
dbuf_stats.c \
|
|
|
|
ddt.c \
|
|
|
|
ddt_zap.c \
|
|
|
|
dmu.c \
|
|
|
|
dmu_diff.c \
|
|
|
|
dmu_object.c \
|
|
|
|
dmu_objset.c \
|
|
|
|
dmu_send.c \
|
|
|
|
dmu_traverse.c \
|
|
|
|
dmu_tx.c \
|
|
|
|
dmu_zfetch.c \
|
|
|
|
dnode.c \
|
|
|
|
dnode_sync.c \
|
|
|
|
dsl_bookmark.c \
|
|
|
|
dsl_dataset.c \
|
|
|
|
dsl_deadlist.c \
|
|
|
|
dsl_deleg.c \
|
|
|
|
dsl_dir.c \
|
Native Encryption for ZFS on Linux
This change incorporates three major pieces:
The first change is a keystore that manages wrapping
and encryption keys for encrypted datasets. These
commands mostly involve manipulating the new
DSL Crypto Key ZAP Objects that live in the MOS. Each
encrypted dataset has its own DSL Crypto Key that is
protected with a user's key. This level of indirection
allows users to change their keys without re-encrypting
their entire datasets. The change implements the new
subcommands "zfs load-key", "zfs unload-key" and
"zfs change-key" which allow the user to manage their
encryption keys and settings. In addition, several new
flags and properties have been added to allow dataset
creation and to make mounting and unmounting more
convenient.
The second piece of this patch provides the ability to
encrypt, decyrpt, and authenticate protected datasets.
Each object set maintains a Merkel tree of Message
Authentication Codes that protect the lower layers,
similarly to how checksums are maintained. This part
impacts the zio layer, which handles the actual
encryption and generation of MACs, as well as the ARC
and DMU, which need to be able to handle encrypted
buffers and protected data.
The last addition is the ability to do raw, encrypted
sends and receives. The idea here is to send raw
encrypted and compressed data and receive it exactly
as is on a backup system. This means that the dataset
on the receiving system is protected using the same
user key that is in use on the sending side. By doing
so, datasets can be efficiently backed up to an
untrusted system without fear of data being
compromised.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #494
Closes #5769
2017-08-14 17:36:48 +00:00
|
|
|
dsl_crypt.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
dsl_pool.c \
|
|
|
|
dsl_prop.c \
|
|
|
|
dsl_scan.c \
|
|
|
|
dsl_synctask.c \
|
|
|
|
dsl_destroy.c \
|
|
|
|
dsl_userhold.c \
|
2016-06-15 22:47:05 +00:00
|
|
|
edonr_zfs.c \
|
2017-09-12 20:15:11 +00:00
|
|
|
hkdf.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
fm.c \
|
|
|
|
gzip.c \
|
|
|
|
lzjb.c \
|
|
|
|
lz4.c \
|
|
|
|
metaslab.c \
|
Multi-modifier protection (MMP)
Add multihost=on|off pool property to control MMP. When enabled
a new thread writes uberblocks to the last slot in each label, at a
set frequency, to indicate to other hosts the pool is actively imported.
These uberblocks are the last synced uberblock with an updated
timestamp. Property defaults to off.
During tryimport, find the "best" uberblock (newest txg and timestamp)
repeatedly, checking for change in the found uberblock. Include the
results of the activity test in the config returned by tryimport.
These results are reported to user in "zpool import".
Allow the user to control the period between MMP writes, and the
duration of the activity test on import, via a new module parameter
zfs_multihost_interval. The period is specified in milliseconds. The
activity test duration is calculated from this value, and from the
mmp_delay in the "best" uberblock found initially.
Add a kstat interface to export statistics about Multiple Modifier
Protection (MMP) updates. Include the last synced txg number, the
timestamp, the delay since the last MMP update, the VDEV GUID, the VDEV
label that received the last MMP update, and the VDEV path. Abbreviated
output below.
$ cat /proc/spl/kstat/zfs/mypool/multihost
31 0 0x01 10 880 105092382393521 105144180101111
txg timestamp mmp_delay vdev_guid vdev_label vdev_path
20468 261337 250274925 68396651780 3 /dev/sda
20468 261339 252023374 6267402363293 1 /dev/sdc
20468 261340 252000858 6698080955233 1 /dev/sdx
20468 261341 251980635 783892869810 2 /dev/sdy
20468 261342 253385953 8923255792467 3 /dev/sdd
20468 261344 253336622 042125143176 0 /dev/sdab
20468 261345 253310522 1200778101278 2 /dev/sde
20468 261346 253286429 0950576198362 2 /dev/sdt
20468 261347 253261545 96209817917 3 /dev/sds
20468 261349 253238188 8555725937673 3 /dev/sdb
Add a new tunable zfs_multihost_history to specify the number of MMP
updates to store history for. By default it is set to zero meaning that
no MMP statistics are stored.
When using ztest to generate activity, for automated tests of the MMP
function, some test functions interfere with the test. For example, the
pool is exported to run zdb and then imported again. Add a new ztest
function, "-M", to alter ztest behavior to prevent this.
Add new tests to verify the new functionality. Tests provided by
Giuseppe Di Natale.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #745
Closes #6279
2017-07-08 03:20:35 +00:00
|
|
|
mmp.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
multilist.c \
|
2016-04-13 15:55:35 +00:00
|
|
|
pathname.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
range_tree.c \
|
|
|
|
refcount.c \
|
|
|
|
rrwlock.c \
|
|
|
|
sa.c \
|
|
|
|
sha256.c \
|
2016-06-15 22:47:05 +00:00
|
|
|
skein_zfs.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
spa.c \
|
|
|
|
spa_boot.c \
|
|
|
|
spa_config.c \
|
|
|
|
spa_errlog.c \
|
|
|
|
spa_history.c \
|
|
|
|
spa_misc.c \
|
|
|
|
spa_stats.c \
|
|
|
|
space_map.c \
|
|
|
|
space_reftree.c \
|
|
|
|
txg.c \
|
|
|
|
trace.c \
|
|
|
|
uberblock.c \
|
|
|
|
unique.c \
|
|
|
|
vdev.c \
|
|
|
|
vdev_cache.c \
|
|
|
|
vdev_file.c \
|
|
|
|
vdev_label.c \
|
|
|
|
vdev_mirror.c \
|
|
|
|
vdev_missing.c \
|
|
|
|
vdev_queue.c \
|
|
|
|
vdev_raidz.c \
|
SIMD implementation of vdev_raidz generate and reconstruct routines
This is a new implementation of RAIDZ1/2/3 routines using x86_64
scalar, SSE, and AVX2 instruction sets. Included are 3 parity
generation routines (P, PQ, and PQR) and 7 reconstruction routines,
for all RAIDZ level. On module load, a quick benchmark of supported
routines will select the fastest for each operation and they will
be used at runtime. Original implementation is still present and
can be selected via module parameter.
Patch contains:
- specialized gen/rec routines for all RAIDZ levels,
- new scalar raidz implementation (unrolled),
- two x86_64 SIMD implementations (SSE and AVX2 instructions sets),
- fastest routines selected on module load (benchmark).
- cmd/raidz_test - verify and benchmark all implementations
- added raidz_test to the ZFS Test Suite
New zfs module parameters:
- zfs_vdev_raidz_impl (str): selects the implementation to use. On
module load, the parameter will only accept first 3 options, and
the other implementations can be set once module is finished
loading. Possible values for this option are:
"fastest" - use the fastest math available
"original" - use the original raidz code
"scalar" - new scalar impl
"sse" - new SSE impl if available
"avx2" - new AVX2 impl if available
See contents of `/sys/module/zfs/parameters/zfs_vdev_raidz_impl` to
get the list of supported values. If an implementation is not supported
on the system, it will not be shown. Currently selected option is
enclosed in `[]`.
Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4328
2016-04-25 08:04:31 +00:00
|
|
|
vdev_raidz_math.c \
|
|
|
|
vdev_raidz_math_scalar.c \
|
2016-06-28 17:49:53 +00:00
|
|
|
vdev_raidz_math_sse2.c \
|
|
|
|
vdev_raidz_math_ssse3.c \
|
SIMD implementation of vdev_raidz generate and reconstruct routines
This is a new implementation of RAIDZ1/2/3 routines using x86_64
scalar, SSE, and AVX2 instruction sets. Included are 3 parity
generation routines (P, PQ, and PQR) and 7 reconstruction routines,
for all RAIDZ level. On module load, a quick benchmark of supported
routines will select the fastest for each operation and they will
be used at runtime. Original implementation is still present and
can be selected via module parameter.
Patch contains:
- specialized gen/rec routines for all RAIDZ levels,
- new scalar raidz implementation (unrolled),
- two x86_64 SIMD implementations (SSE and AVX2 instructions sets),
- fastest routines selected on module load (benchmark).
- cmd/raidz_test - verify and benchmark all implementations
- added raidz_test to the ZFS Test Suite
New zfs module parameters:
- zfs_vdev_raidz_impl (str): selects the implementation to use. On
module load, the parameter will only accept first 3 options, and
the other implementations can be set once module is finished
loading. Possible values for this option are:
"fastest" - use the fastest math available
"original" - use the original raidz code
"scalar" - new scalar impl
"sse" - new SSE impl if available
"avx2" - new AVX2 impl if available
See contents of `/sys/module/zfs/parameters/zfs_vdev_raidz_impl` to
get the list of supported values. If an implementation is not supported
on the system, it will not be shown. Currently selected option is
enclosed in `[]`.
Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4328
2016-04-25 08:04:31 +00:00
|
|
|
vdev_raidz_math_avx2.c \
|
2016-11-02 19:40:23 +00:00
|
|
|
vdev_raidz_math_avx512f.c \
|
|
|
|
vdev_raidz_math_avx512bw.c \
|
Add parity generation/rebuild using 128-bits NEON for Aarch64
This re-use the framework established for SSE2, SSSE3 and
AVX2. However, GCC is using FP registers on Aarch64, so
unlike SSE/AVX2 we can't rely on the registers being left alone
between ASM statements. So instead, the NEON code uses
C variables and GCC extended ASM syntax. Note that since
the kernel explicitly disable vector registers, they
have to be locally re-enabled explicitly.
As we use the variable's number to define the symbolic
name, and GCC won't allow duplicate symbolic names,
numbers have to be unique. Even when the code is not
going to be used (e.g. the case for 4 registers when
using the macro with only 2). Only the actually used
variables should be declared, otherwise the build
will fails in debug mode.
This requires the replacement of the XOR(X,X) syntax
by a new ZERO(X) macro, which does the same thing but
without repeating the argument. And perhaps someday
there will be a machine where there is a more efficient
way to zero a register than XOR with itself. This affects
scalar, SSE2, SSSE3 and AVX2 as they need the new macro.
It's possible to write faster implementations (different
scheduling, different unrolling, interleaving NEON and
scalar, ...) for various cores, but this one has the
advantage of fitting in the current state of the code,
and thus is likely easier to review/check/merge.
The only difference between aarch64-neon and aarch64-neonx2
is that aarch64-neonx2 unroll some functions some more.
Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Romain Dolbeau <romain.dolbeau@atos.net>
Closes #4801
2016-10-03 16:44:00 +00:00
|
|
|
vdev_raidz_math_aarch64_neon.c \
|
|
|
|
vdev_raidz_math_aarch64_neonx2.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
vdev_root.c \
|
|
|
|
zap.c \
|
|
|
|
zap_leaf.c \
|
|
|
|
zap_micro.c \
|
2018-02-08 16:16:23 +00:00
|
|
|
zcp.c \
|
|
|
|
zcp_get.c \
|
|
|
|
zcp_global.c \
|
|
|
|
zcp_iter.c \
|
|
|
|
zcp_synctask.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
zfeature.c \
|
|
|
|
zfs_byteswap.c \
|
|
|
|
zfs_debug.c \
|
|
|
|
zfs_fm.c \
|
|
|
|
zfs_fuid.c \
|
|
|
|
zfs_sa.c \
|
|
|
|
zfs_znode.c \
|
2017-08-09 22:31:08 +00:00
|
|
|
zfs_ratelimit.c \
|
2016-01-05 20:47:58 +00:00
|
|
|
zfs_rlock.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
zil.c \
|
|
|
|
zio.c \
|
|
|
|
zio_checksum.c \
|
|
|
|
zio_compress.c \
|
Native Encryption for ZFS on Linux
This change incorporates three major pieces:
The first change is a keystore that manages wrapping
and encryption keys for encrypted datasets. These
commands mostly involve manipulating the new
DSL Crypto Key ZAP Objects that live in the MOS. Each
encrypted dataset has its own DSL Crypto Key that is
protected with a user's key. This level of indirection
allows users to change their keys without re-encrypting
their entire datasets. The change implements the new
subcommands "zfs load-key", "zfs unload-key" and
"zfs change-key" which allow the user to manage their
encryption keys and settings. In addition, several new
flags and properties have been added to allow dataset
creation and to make mounting and unmounting more
convenient.
The second piece of this patch provides the ability to
encrypt, decyrpt, and authenticate protected datasets.
Each object set maintains a Merkel tree of Message
Authentication Codes that protect the lower layers,
similarly to how checksums are maintained. This part
impacts the zio layer, which handles the actual
encryption and generation of MACs, as well as the ARC
and DMU, which need to be able to handle encrypted
buffers and protected data.
The last addition is the ability to do raw, encrypted
sends and receives. The idea here is to send raw
encrypted and compressed data and receive it exactly
as is on a backup system. This means that the dataset
on the receiving system is protected using the same
user key that is in use on the sending side. By doing
so, datasets can be efficiently backed up to an
untrusted system without fear of data being
compromised.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #494
Closes #5769
2017-08-14 17:36:48 +00:00
|
|
|
zio_crypt.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
zio_inject.c \
|
|
|
|
zle.c \
|
|
|
|
zrlock.c
|
|
|
|
|
2018-02-08 16:16:23 +00:00
|
|
|
LUA_C = \
|
|
|
|
lapi.c \
|
|
|
|
lauxlib.c \
|
|
|
|
lbaselib.c \
|
|
|
|
lcode.c \
|
|
|
|
lcompat.c \
|
|
|
|
lcorolib.c \
|
|
|
|
lctype.c \
|
|
|
|
ldebug.c \
|
|
|
|
ldo.c \
|
|
|
|
lfunc.c \
|
|
|
|
lgc.c \
|
|
|
|
llex.c \
|
|
|
|
lmem.c \
|
|
|
|
lobject.c \
|
|
|
|
lopcodes.c \
|
|
|
|
lparser.c \
|
|
|
|
lstate.c \
|
|
|
|
lstring.c \
|
|
|
|
lstrlib.c \
|
|
|
|
ltable.c \
|
|
|
|
ltablib.c \
|
|
|
|
ltm.c \
|
|
|
|
lvm.c \
|
|
|
|
lzio.c
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
nodist_libzpool_la_SOURCES = \
|
|
|
|
$(USER_C) \
|
2018-02-08 16:16:23 +00:00
|
|
|
$(KERNEL_C) \
|
|
|
|
$(LUA_C)
|
2010-08-26 18:22:58 +00:00
|
|
|
|
2011-12-31 23:30:52 +00:00
|
|
|
libzpool_la_LIBADD = \
|
2017-08-09 22:31:08 +00:00
|
|
|
$(top_builddir)/lib/libavl/libavl.la \
|
|
|
|
$(top_builddir)/lib/libicp/libicp.la \
|
2016-05-12 14:51:24 +00:00
|
|
|
$(top_builddir)/lib/libnvpair/libnvpair.la \
|
2017-08-09 22:31:08 +00:00
|
|
|
$(top_builddir)/lib/libspl/libspl.la \
|
|
|
|
$(top_builddir)/lib/libunicode/libunicode.la
|
2011-12-31 23:30:52 +00:00
|
|
|
|
2017-01-31 18:13:10 +00:00
|
|
|
libzpool_la_LIBADD += $(ZLIB) -ldl
|
2017-08-09 22:31:08 +00:00
|
|
|
libzpool_la_LDFLAGS = -pthread -version-info 2:0:0
|
2010-09-04 20:26:23 +00:00
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
EXTRA_DIST = $(USER_C)
|