aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Multipath autoreplace, control enclosure LEDs, event rate limitingTony Hutter2016-10-1924-61/+668
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Enable multipath autoreplace support for FMA. This extends FMA autoreplace to work with multipath disks. This requires libdevmapper to be installed at build time. 2. Turn on/off fault LEDs when VDEVs become degraded/faulted/online Set ZED_USE_ENCLOSURE_LEDS=1 in zed.rc to have ZED turn on/off the enclosure LED for a drive when a drive becomes FAULTED/DEGRADED. Your enclosure must be supported by the Linux SES driver for this to work. The enclosure LED scripts work for multipath devices as well. The scripts will clear the LED when the fault is cleared. 3. Rate limit ZIO delay and checksum events so as not to flood ZED ZIO delay and checksum events are rate limited to 5/sec in the zfs module. Reviewed-by: Richard Laager <[email protected]> Reviewed by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #2449 Closes #3017 Closes #5159
* Fix coverity defects: CID 150926luozhengzheng2016-10-181-2/+8
| | | | | | | | | | CID 150926: Unchecked return value (CHECKED_RETURN) - This case cannot occur given the existing taskq implementation and flags passed to task_dispatch(). Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5272
* Fix unused variableBrian Behlendorf2016-10-181-2/+2
| | | | | | | | | Accidentally introduced by 3dfb57a, when building with debugging disabled several variables are unused. Resolve this by wrapping them in ASSERTV to remove them for non-debug builds. Reviewed by: Don Brady <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5284
* Fix coverity defects: CID 147643, 152204, 49339GeLiXin2016-10-182-2/+4
| | | | | | | | | | | | | | | | | CID 147643: Type: String not null terminated - make sure that the string is null terminated before strlen and fprintf. CID 152204: Type: Copy into fixed size buffer - since strlcpy isn't availabe here, use strncpy and terminate the string manually. CID 49339: Type: Buffer not null terminated - since strlcpy isn't availabe here, terminate the string manually before fprintf. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: GeLiXin <[email protected]> Closes #5283
* Fix coverity defects: CID 49339, 153393cao2016-10-182-1/+3
| | | | | | | | CID 49339: Type:Buffer not null terminated CID 153393: Type:Buffer not null terminated Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: <cao.xuewen [email protected]> Closes #5296
* Create a symlink to current test-runner outputGiuseppe Di Natale2016-10-181-0/+8
| | | | | | | | | | Generate a symlink in the current working directory to test-runner.py output. This will make it easier for the ZFS buildbot to collect logs. Reviewed by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5293
* Fix coverity defects: CID 150924luozhengzheng2016-10-171-1/+5
| | | | | | | | | | CID 150924: Unchecked return value (CHECKED_RETURN) - On taskq_dispatch failure the reference must be dropped and this entry can be safely skipped. This case should be impossible in the existing implementation but should be handled regardless. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5278
* Properly use the Dracut cleanup hook to order pool shutdownRudd-O2016-10-174-2/+13
| | | | | | | | | | | | | | | | | | When Dracut starts up, it needs to determine whether a pool will remain "hanging open" before the system shuts off. In such a case, then the code to clean up the pool (using the previous export -F work) must be invoked. Since Dracut has had a recent change that makes mount-zfs.sh simply not run when the root dataset is already mounted, we must use the cleanup hook to order Dracut to do shutdown cleanup. Important note: this code will not accomplish its stated goal until this bug is fixed: https://bugzilla.redhat.com/show_bug.cgi?id=1385432 That bug impacts more than just ZFS. It impacts LUKS, dmraid, and unmount during poweroff. It is a Fedora-wide bug. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Manuel Amador (Rudd-O) <[email protected]> Closes #5287
* Pass status_cbdata_t to print_status_config() and friendsHåkan Johansson2016-10-171-68/+66
| | | | | | | | | | | | | | | | | | First rename spare_cbdata_t cb -> spare_cb in print_status_config(), to free up cb. Using the structure removes the explicit parameters namewidth and name_flags from several functions. Also use status_cbdata_t for print_import_config(). This simplifies print_logs(). Remove the parameter 'verbose' for print_logs(). It does not really mean verbose, it selected between the print_status_config and print_import_config() paths. This selection is now done by cb_print_config of spare_cbdata_t. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Håkan Johansson <[email protected]> Closes #5259
* Use -F to export pools so as not to dirty up device labelsRudd-O2016-10-154-10/+11
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Manuel Amador (Rudd-O) <[email protected]> Closes #5228 Closes #5238
* Allow partition aliases in vdev_id.conf (#5266)Brian Behlendorf2016-10-141-0/+1
| | | | | | | | | | | | | When pools are assembled from partitions, vdev_id.conf aliases do not work. The directory /dev/disk/by-vdev is not created because the associated udev rule for parsing vdev_id.conf is never called. Extend to logic to match "disk" and "partition". Patch-proposed-by: @sparksh Reviewed-by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3859 Closes #5266
* Fix coverity defects: CID 147488, 147490cao2016-10-142-2/+8
| | | | | | | | | CID 147488, Type:explicit null dereferenced CID 147490, Type:dereference null return value Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5237
* OpenZFS 6877 - zfs_rename_006_pos fails due to missing zvol snapshot device fileAkash Ayare2016-10-142-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Authored by: Akash Ayare <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed-by: luozhengzheng <[email protected]> Reviewed-by: yuxiang <[email protected]> Ported-by: Brian Behlendorf <[email protected]> Bug was caused due to a change in functionality. At some point, ZFS snapshots no longer created associated device files which were being used in the test. To resolve this issue, a clone of the snapshot can be produced which will also create the expected device files; then, the test will behave as it did historically. OpenZFS-issue: https://www.illumos.org/issues/6877 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/2200f27 Closes #5275 Porting Notes: - Hardcoded /dev/zvol/rdsk changed to $ZVOL_RDEVDIR for compatibility. - Enabled in linux runfile.
* Enable zfs_rename_002_pos, zfs_rename_005_neg, zfs_rename_007_posBrian Behlendorf2016-10-143-5/+8
| | | | | | | | | | These tests all pass once updated to wait for udev to create the expected linked under /dev/zvol/. Reviewed-by: luozhengzheng <[email protected]> Reviewed-by: yuxiang <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5275
* Fix coverity defects: CID 150921, 150927luozhengzheng2016-10-141-2/+2
| | | | | | | | CID 150921: Unchecked return value (CHECKED_RETURN) CID 150927 : Unchecked return value (CHECKED_RETURN) Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5267
* Enable quota_002_pos, quota_004_pos and quota_005_posliaoyuxiangqin2016-10-144-9/+6
| | | | | | | | | | | | | | | | In this test the 'ls -ls' command was used to print testfile size in blocks. Because the environment variable BLOCK_SIZE was set the 'ls -ls' command detected this and output its block count as the number of 8192 blocks. Rather than change the variable name the -k was was added to force ls to return 1k blocks. This has the additional advantage of behaving consistently across platforms. For additional details on GNU 'ls' behavior regarding block size: https://www.gnu.org/software/coreutils/manual/html_node/Block-size.html Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: yuxiang <[email protected]> Closes #5269
* Enable zfs_receive_011_posBrian Behlendorf2016-10-141-2/+2
| | | | | | | | The zfs_receive_011_pos test can be enabled now that OpenZFS 6562 has been merged. Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5276
* OpenZFS 7090 - zfs should throttle allocationsDon Brady2016-10-1318-212/+1069
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenZFS 7090 - zfs should throttle allocations Authored by: George Wilson <[email protected]> Reviewed by: Alex Reece <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Sebastien Roy <[email protected]> Approved by: Matthew Ahrens <[email protected]> Ported-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> When write I/Os are issued, they are issued in block order but the ZIO pipeline will drive them asynchronously through the allocation stage which can result in blocks being allocated out-of-order. It would be nice to preserve as much of the logical order as possible. In addition, the allocations are equally scattered across all top-level VDEVs but not all top-level VDEVs are created equally. The pipeline should be able to detect devices that are more capable of handling allocations and should allocate more blocks to those devices. This allows for dynamic allocation distribution when devices are imbalanced as fuller devices will tend to be slower than empty devices. The change includes a new pool-wide allocation queue which would throttle and order allocations in the ZIO pipeline. The queue would be ordered by issued time and offset and would provide an initial amount of allocation of work to each top-level vdev. The allocation logic utilizes a reservation system to reserve allocations that will be performed by the allocator. Once an allocation is successfully completed it's scheduled on a given top-level vdev. Each top-level vdev maintains a maximum number of allocations that it can handle (mg_alloc_queue_depth). The pool-wide reserved allocations (top-levels * mg_alloc_queue_depth) are distributed across the top-level vdevs metaslab groups and round robin across all eligible metaslab groups to distribute the work. As top-levels complete their work, they receive additional work from the pool-wide allocation queue until the allocation queue is emptied. OpenZFS-issue: https://www.illumos.org/issues/7090 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4756c3d7 Closes #5258 Porting Notes: - Maintained minimal stack in zio_done - Preserve linux-specific io sizes in zio_write_compress - Added module params and documentation - Updated to use optimize AVL cmp macros
* Fix coverity defects: CID 147692, 147693, 147694cao2016-10-133-11/+30
| | | | | | | | | CID:147692, Type:Uninitialized scalar variable CID:147693, Type:Uninitialized scalar variable CID:147694, Type:Uninitialized scalar variable Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5252
* Fix coverity defects: CID 150943, 150938cao2016-10-132-4/+6
| | | | | | | | | CID:150943, Type:Unintentional integer overflow CID:150938, Type:Explicit null dereferenced Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5255
* Fix coverity defects: CID 147571, 147574luozhengzheng2016-10-132-2/+2
| | | | | | | | CID 147571: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) CID 147574: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5268
* Enable refquota_002_pos and refquota_004_posliaoyuxiangqin2016-10-131-5/+2
| | | | | | | | The refquota_002_pos and refquota_004_pos test cases can pass without modification. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: yuxiang <[email protected]> Closes #5273
* Fix coverity defects: CID 147654, 147690GeLiXin2016-10-132-3/+3
| | | | | | | | | | | | | coverity scan CID:147654,type: Copy into fixed size buffer - string operation may write past the end of the fixed-size destination buffer coverity scan CID:147690,type: Uninitialized scalar variable - call zfs_prop_get first in case we use sourcetype and share_sourcetype without initialization Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: GeLiXin <[email protected]> Closes #5253
* Fix coverity defects: CID 153394luozhengzheng2016-10-121-1/+1
| | | | | | | coverity scan CID 153394, Type:String overflow Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5263
* Fix ICP memleak introduced in #4760Tom Caputi2016-10-121-0/+13
| | | | | | | | | | | | | The ICP requires destructors to for each crypto module that is added. These do not necessarily exist in Illumos because they assume that these modules can never be unloaded from the kernel. Some of this cleanup code was missed when #4760 was merged, resulting in leaks. This patch simply fixes that. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Issue #4760 Closes #5265
* Fix coverity defects: CID 147606, 147609cao2016-10-123-2/+7
| | | | | | | | coverity scan CID:147606, Type:resource leak coverity scan CID:147609, Type:resource leak Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5245
* Fix coverity defects: CID 147452, 147447, 147446cao2016-10-113-3/+3
| | | | | | | | | | coverity scan CID:147452, Type:Unchecked return value from library coverity scan CID:147447, Type:Unchecked return value from library coverity scan CID:147446, Type:Unchecked return value from library Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5264
* Fix memory leak in recv_skipluozhengzheng2016-10-111-0/+1
| | | | | | | | When the exception branch exits, the buf is leaked. Reviewed by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: luozhengzheng <[email protected]> Closes #5262
* Fix zfsctl_snapshot_{,un}mount() issuesBrian Behlendorf2016-10-111-19/+10
|\ | | | | | | | | | | | | | | | | | | | | | | Fix use after free in zfsctl_snapshot_unmount(). Use /usr/bin/env instead of /bin/sh to fix a shell code injection flaw and allow use with grsecurity. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected] Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Stian Ellingsen <[email protected]> Closes #5250 Closes #4377
| * Use env, not sh in zfsctl_snapshot_{,un}mount()Stian Ellingsen2016-10-081-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call mount and umount via /usr/bin/env instead of /bin/sh in zfsctl_snapshot_mount() and zfsctl_snapshot_unmount(). This change fixes a shell code injection flaw. The call to /bin/sh passed the mountpoint unescaped, only surrounded by single quotes. A mountpoint containing one or more single quotes would cause the command to fail or potentially execute arbitrary shell code. This change also provides compatibility with grsecurity patches. Grsecurity only allows call_usermodehelper() to use helper binaries in certain paths. /usr/bin/* is allowed, /bin/* is not.
| * Fix use after free in zfsctl_snapshot_unmount()Stian Ellingsen2016-10-081-1/+1
| |
* | Enable zfs_snapshot_008_neg and zfs_snapshot_009_pos (#5260)Brian Behlendorf2016-10-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | The zfs_snapshot_008_neg test case does not use nested pools and can be safely enabled. The zfs_snapshot_009_pos test case is also passing without modification. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: ChaoyuZhang <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5260
* | Enable reservation_012_pos, reservation_015_pos and reservation_016_posliaoyuxiangqin2016-10-111-7/+3
| | | | | | | | | | | | | | | | | | Enable reservation_012_pos, reservation_015_pos and reservation_016_pos test cases which are passing. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: yuxiang <[email protected]> Closes #5254
* | Fix coverity defects: CID 147639GeLiXin2016-10-101-5/+6
| | | | | | | | | | | | | | | | | | When array is passed as a parameter it degenerates into a pointer so the sizeof(path) in is_shorthand_path() and always get return value of 8, instead of the string length we want. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: GeLiXin <[email protected]> Closes #5198
* | Write issue taskq shouldn't be dynamicTim Chase2016-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is as much an upstream compatibility as it's a bit of a performance gain. The illumos taskq implemention doesn't allow a TASKQ_THREADS_CPU_PCT type to be dynamic and in fact enforces as much with an ASSERT. As to performance, if this taskq is dynamic, it can cause excessive contention on tq_lock as the threads are created and destroyed because it can see bursts of many thousands of tasks in a short time, particularly in heavy high-concurrency zvol write workloads. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5236
* | Porting over some ICP code that was missed in #4760Tom Caputi2016-10-101-16/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | When #4760 was merged tests were added to ensure that the new checksums were working properly. However, some of the functionality for sha2 functions were not ported over, resulting in some Coverity defects and code that would be unstable when needed in the future. This patch simply ports over the missing code and fixes the defects in the process. Reviewed by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Issue #4760 Closes #5251
* | Enable readonly_001_posChaoyuZhang2016-10-091-2/+1
| | | | | | | | | | | | Enable readonly_001_pos this test is now passing. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: ChaoyuZhang <[email protected]>
* | Fix file permissionsBrian Behlendorf2016-10-0818-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following new test cases need to have execute permissions set: userquota/groupspace_003_pos.ksh userquota/userquota_013_pos.ksh userquota/userspace_003_pos.ksh upgrade/upgrade_userobj_001_pos.ksh upgrade/setup.ksh upgrade/cleanup.ksh The following source files accidentally were marked executable: lib/libzpool/kernel.c lib/libshare/nfs.c lib/libzfs/libzfs_dataset.c lib/libzfs/libzfs_util.c tests/zfs-tests/cmd/rm_lnkcnt_zero_file/rm_lnkcnt_zero_file.c tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c cmd/zed/zed_exec.c module/icp/core/kcf_sched.c module/zfs/dsl_pool.c module/zfs/arc.c module/nvpair/nvpair.c man/man5/zfs-module-parameters.5 Reviewed-by: GeLiXin <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Jinshan Xiong <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5241
* | Rename hole_birth tunable to match OpenZFSBrian Behlendorf2016-10-071-6/+12
| | | | | | | | | | | | | | | | | | | | | | OpenZFS decided that ignore_hole_birth was too imprecise and incorrect a name (and went with send_holes_without_birth_time). Rename it in ZoL too, while keeping the name "ignore_hole_birth" pointing to the same variable for existing consumers. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #5239
* | Fix vdev_open_child() race on updating vdev_parent->vdev_nonrotHåkan Johansson2016-10-071-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating vd->vdev_parent->vdev_nonrot in vdev_open_child() is a race when vdev_open_child is called for many children from a task queue. vdev_open_child() is only called by vdev_open_children(), let the latter update the parent vdev_nonrot member. The update was already there, so done twice previously. Thus using the same logic at the end in vdev_open_children() to update vdev_nonrot, either we are vdev_uses_zvols() or not. Reviewed-by: Richard Elling <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Haakan T Johansson <[email protected]> Closes #5162
* | Fix coverity defects: CID 147565-147567cao2016-10-073-4/+8
| | | | | | | | | | | | | | | | | | | | coverity scan CID:147567, Type:dereference null return value coverity scan CID:147566, Type:dereference null return value coverity scan CID:147565, Type:dereference null return value Reviewed by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5166
* | Fletcher4: Incremental updates and ctx calculationBrian Behlendorf2016-10-077-205/+435
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Fixes ABI issues with fletcher4 code, adds support for incremental updates, and adds ztest method for testing. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Gvozden Neskovic <[email protected]> Closes #5164
| * | Fletcher4: save/reload implementation contextGvozden Neskovic2016-10-055-194/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Init, compute, and fini methods are changed to work on internal context object. This is necessary because ABI does not guarantee that SIMD registers will be preserved on function calls. This is technically the case in Linux kernel in between `kfpu_begin()/kfpu_end()`, but it breaks user-space tests and some kernels that don't require disabling preemption for using SIMD (osx). Use scalar compute methods in-place for small buffers, and when the buffer size does not meet SIMD size alignment. Signed-off-by: Gvozden Neskovic <[email protected]>
| * | Fletcher4: Incremental using SIMDGvozden Neskovic2016-10-052-18/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine incrementally computed fletcher4 checksums. Checksums are combined a posteriori, allowing for parallel computation on chunks to be implemented if required. The algorithm is general, and does not add changes in each SIMD implementation. New test in ztest verifies incremental fletcher computations. Checksum combining matrix for two buffers `a` and `b`, where `Ca` and `Cb` are respective fletcher4 checksums, `Cab` is combined checksum, `s` is size of buffer `b` (divided by sizeof(uint32_t)) is: Cab[A] = Cb[A] + Ca[A] Cab[B] = Cb[B] + Ca[B] + s * Ca[A] Cab[C] = Cb[C] + Ca[C] + s * Ca[B] + s(s+1)/2 * Ca[A] Cab[D] = Cb[D] + Ca[D] + s * Ca[C] + s(s+1)/2 * Ca[B] + s(s+1)(s+2)/6 * Ca[A] NOTE: this calculation overflows for larger buffers. Thus, internally, the calculation is performed on 8MiB chunks. Signed-off-by: Gvozden Neskovic <[email protected]>
| * | Fletcher4: Init in libzfs_init()Gvozden Neskovic2016-10-031-0/+3
| | | | | | | | | | | | | | | | | | | | | All users of fletcher4 methods must call `fletcher_4_init()/_fini()` There's no benchmarking overhead when called from user-space. Signed-off-by: Gvozden Neskovic <[email protected]>
* | | Fix uninitialized variable snapprops_nvlist in zfs_receive_oneLOLi2016-10-074-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable snapprops_nvlist was never initialized, so properties were not applied to the received snapshot. Additionally, add zfs_receive_013_pos.ksh script to ZFS test suite to exercise 'zfs receive' functionality for user properties. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #4338
* | | Add python style checkingBrian Behlendorf2016-10-0712-85/+213
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a make recipe for flake8 to enable python style checking. Ensure all python scripts pass flake8. Return an error code of 0 for arcstat.py -v and dbufstat.py -v. Add test cases for python scripts. Reviewed by: Richard Laager <[email protected]> Reviewed-by: Richard Elling <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ian Lee <[email protected]> Closes #5230
| * | | Introduce tests for python scriptsGiuseppe Di Natale2016-10-067-2/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement tests to ensure that python scripts that are distributed with ZFS continue to at minimum run without errors. This will help prevent accidental breaking of these scripts. Signed-off-by: Giuseppe Di Natale <[email protected]>
| * | | Introduce a make recipe for flake8Giuseppe Di Natale2016-10-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a make recipe to enable developers to easily run flake8 if it is available. This will help enforce good python coding standards. Signed-off-by: Giuseppe Di Natale <[email protected]>
| * | | Correct exit code for dbufstat -v and arcstat -vGiuseppe Di Natale2016-10-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both scripts were returning an error code of 1 when using the -v argument. -v should exit with an error code of 0. Signed-off-by: Giuseppe Di Natale <[email protected]>