summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Switch KM_SLEEP to KM_PUSHPAGEBrian Behlendorf2012-09-052-3/+3
| | | | | | | | | | | | | This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
* Switch KM_SLEEP to KM_PUSHPAGEBrian Behlendorf2012-09-042-2/+3
| | | | | | | | | | | | | This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
* Improve AF hard disk detectionBrian Behlendorf2012-09-044-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | Use the bdev_physical_block_size() interface to determine the minimize write size which can be issued without incurring a read-modify-write operation. This is used to set the ashift correctly to prevent a performance penalty when using AF hard disks. Unfortunately, this interface isn't entirely reliable because it's not uncommon for disks to misreport this value. For this reason you may still need to manually set your ashift with: zpool create -o ashift=12 ... The solution to this in the upstream Illumos source was to add a while list of known offending drives. Maintaining such a list will be a burden, but it still may be worth doing if we can detect a large number of these drives. This should be considered as future work. Reported-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #916
* Switch KM_SLEEP to KM_PUSHPAGEBrian Behlendorf2012-09-041-1/+1
| | | | | | | | | | | | | This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
* Add libnvpair to mount_zfs dependenciesEtienne Dechamps2012-09-021-0/+1
| | | | | | | | | | | Commit e6f290535c2fff8b940c4eacb1c90cbc2cfc7508 added libzpool to the mount_zfs dependencies. This brought in the nvpair symbols which are used by libzpool. To resolve this include the libnvpair library for mount_zfs even though mount_zfs doesn't directly require any of these symbols. Signed-off-by: Brian Behlendorf <[email protected]> Closes #926
* Add zstreamdump(8) command to examine ZFS send streams.Martin Matuska2012-09-026-2/+508
| | | | | | | | Obtained from: illumos-gate revision 11935:538c866aaac6 Source: ssh://[email protected]/illumos-gate Signed-off-by: Brian Behlendorf <[email protected]> Closes #905
* Switch KM_SLEEP to KM_PUSHPAGEChris Dunlop2012-09-022-6/+6
| | | | | | | | | | | | | | This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
* Switch KM_SLEEP to KM_PUSHPAGEBrian Behlendorf2012-08-311-2/+2
| | | | | | | | | | | | | This warning indicates the incorrect use of KM_SLEEP in a call path which must use KM_PUSHPAGE to avoid deadlocking in direct reclaim. See commit b8d06fca089fae4680c3a552fc55c512bfb02202 for additional details. SPL: Fixing allocation for task txg_sync (6093) which used GFP flags 0x297bda7c with PF_NOFS set Signed-off-by: Brian Behlendorf <[email protected]> Issue #917
* Clear PG_writeback after zil_commit() for sync I/OBrian Behlendorf2012-08-301-3/+8
| | | | | | | | | | | | | | | | | When writing via ->writepage() the writeback bit was always cleared as part of the txg commit callback. However, when the I/O is also being written synchronsously to the zil we can immediately clear this bit. There is no need to wait for the subsequent TXG sync since the data is already safe on stable storage. This has been observed to reduce the msync(2) delay from up to 5 seconds down 10s of miliseconds. One workload which is expected to benefit from this are the intermittent samba hands described in issue #700. Signed-off-by: Brian Behlendorf <[email protected]> Closes #700 Closes #907
* Fix mount_zfs dependency on libzpool.Etienne Dechamps2012-08-301-0/+1
| | | | | | | | | | | | | | mount_zfs depends on libzpool for zfs_prop_written since 330d06f90d143b41b276796526a66a1c1fff046d. Unfortunately, the Makefile for mount_zfs has not been modified to reflect this. As a result, libtool doesn't know about the dependency, which may result in the wrong libzpool being used during the build (e.g. the libzpool from the system instead of the libzpool from the build directory). This patch adds the dependency to fix the issue. Signed-off-by: Brian Behlendorf <[email protected]> Fixes #909.
* Switch KM_SLEEP to KM_PUSHPAGERichard Yao2012-08-2745-185/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differences between how paging is done on Solaris and Linux can cause deadlocks if KM_SLEEP is used in any the following contexts. * The txg_sync thread * The zvol write/discard threads * The zpl_putpage() VFS callback This is because KM_SLEEP will allow for direct reclaim which may result in the VM calling back in to the filesystem or block layer to write out pages. If a lock is held over this operation the potential exists to deadlock the system. To ensure forward progress all memory allocations in these contexts must us KM_PUSHPAGE which disables performing any I/O to accomplish the memory allocation. Previously, this behavior was acheived by setting PF_MEMALLOC on the thread. However, that resulted in unexpected side effects such as the exhaustion of pages in ZONE_DMA. This approach touchs more of the zfs code, but it is more consistent with the right way to handle these cases under Linux. This is patch lays the ground work for being able to safely revert the following commits which used PF_MEMALLOC: 21ade34 Disable direct reclaim for z_wr_* threads cfc9a5c Fix zpl_writepage() deadlock eec8164 Fix ASSERTION(!dsl_pool_sync_context(tx->tx_pool)) Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #726
* mzap_upgrade() must use kmem_alloc()Brian Behlendorf2012-08-271-3/+3
| | | | | | | | | | These allocations in mzap_update() used to be kmem_alloc() but were changed to vmem_alloc() due to the size of the allocation. However, since it turns out this function may be called in the context of the txg_sync thread they must be changed back to use a kmem_alloc() to ensure the KM_PUSHPAGE flag is honored. Signed-off-by: Brian Behlendorf <[email protected]>
* Annotate KM_PUSHPAGE call paths with PF_NOFSBrian Behlendorf2012-08-273-5/+42
| | | | | | | | | | | | | | | | | The txg_sync(), zfs_putpage(), zvol_write(), and zvol_discard() call paths must only use KM_PUSHPAGE to avoid potential deadlocks during direct reclaim. This patch annotates these call paths so any accidental use of KM_SLEEP will be quickly detected. In the interest of stability if debugging is disabled the offending allocation will have its GFP flags automatically corrected. When debugging is enabled any misuse will be treated as a fatal error. This patch is entirely for debugging. We should be careful to NOT become dependant on it fixing up the incorrect allocations. Signed-off-by: Brian Behlendorf <[email protected]>
* Pre-allocate vdev I/O buffersBrian Behlendorf2012-08-274-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vdev queue layer may require a small number of buffers when attempting to create aggregate I/O requests. Rather than attempting to allocate them from the global zio buffers, which is slow under memory pressure, it makes sense to pre-allocate them because... 1) These buffers are short lived. They are only required for the life of a single I/O at which point they can be used by the next I/O. 2) The maximum number of concurrent buffers needed by a vdev is small. It's roughly limited by the zfs_vdev_max_pending tunable which defaults to 10. By keeping a small list of these buffer per-vdev we can ensure one is always available when we need it. This significantly reduces contention on the vq->vq_lock, because we no longer need to perform a slow allocation under this lock. This is particularly important when memory is already low on the system. It would probably be wise to extend the use of these buffers beyond aggregate I/O and in to the raidz implementation. The inability to quickly allocate buffer for the parity stripes could result in similiar problems. Signed-off-by: Brian Behlendorf <[email protected]>
* Revert Disable direct reclaim for z_wr_* threadsRichard Yao2012-08-272-7/+3
| | | | | | | | | | | | | | This commit used PF_MEMALLOC to prevent a memory reclaim deadlock. However, commit 49be0ccf1fdc2ce852271d4d2f8b7a9c2c4be6db eliminated the invocation of __cv_init(), which was the cause of the deadlock. PF_MEMALLOC has the side effect of permitting pages from ZONE_DMA to be allocated. The use of PF_MEMALLOC was found to cause stability problems when doing swap on zvols. Since this technique is known to cause problems and no longer fixes anything, we revert it. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #726
* Revert Fix zpl_writepage() deadlockRichard Yao2012-08-271-14/+1
| | | | | | | | | | | | | | | | | | | | | The commit, cfc9a5c88f91f7b4d606fce89505e1f404691ea5, to fix deadlocks in zpl_writepage() relied on PF_MEMALLOC. That had the effect of disabling the direct reclaim path on all allocations originating from calls to this function, but it failed to address the actual cause of those deadlocks. This led to the same deadlocks being observed with swap on zvols, but not with swap on the loop device, which exercises this code. The use of PF_MEMALLOC also had the side effect of permitting allocations to be made from ZONE_DMA in instances that did not require it. This contributes to the possibility of panics caused by depletion of pages from ZONE_DMA. As such, we revert this patch in favor of a proper fix for both issues. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #726
* Revert Fix ASSERTION(!dsl_pool_sync_context(tx->tx_pool))Richard Yao2012-08-271-13/+0
| | | | | | | | | | | Commit eec8164771bee067c3cd55ed0a16dadeeba276de worked around an issue involving direct reclaim through the use of PF_MEMALLOC. Since we are reworking thing to use KM_PUSHPAGE so that swap works, we revert this patch in favor of the use of KM_PUSHPAGE in the affected areas. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #726
* Remove autoconf check for CONFIG_PREEMPTPrakash Surya2012-08-271-19/+0
| | | | | | | | | | | The autoconf macro which failed if CONFIG_PREEMPT was set in the kernel config was removed. With the inclusion of a few previous patches targeting support for preempt enabled kernels, it is now safe to run with this kernel config option enabled. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #83
* Remove autotools productsBrian Behlendorf2012-08-2767-80582/+19
| | | | | | | | Remove all of the generated autotools products from the repository and update the .gitignore files accordingly. Signed-off-by: Brian Behlendorf <[email protected]> Closes #718
* rmdir(2) should return ENOTEMPTYBrian Behlendorf2012-08-261-3/+3
| | | | | | | | | | | | | | | Under Solaris the behavior for rmdir(2) is to return EEXIST when a directory still contains entries. However, on Linux ENOTEMPTY is the expected return value with EEXIST being technically allowed. According to rmdir(2): ENOTEMPTY pathname contains entries other than . and .. ; or, pathname has .. as its final component. POSIX.1-2001 also allows EEXIST for this condition. Signed-off-by: Brian Behlendorf <[email protected]> Closes #895
* Consistent menuconfig nameRichard Yao2012-08-261-1/+1
| | | | | | | | Make name in Linux menuconfig consistent with those of other filesystems Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #897
* Check kernel source directory for SPLRichard Yao2012-08-262-0/+21
| | | | | | | | | | | ZFS fails to build when SPL is built into the kernel on unless --with-spl=/path/to/kernel/sources is specified. We fallback to the kernel sources directory when SPL is not found elsewhere to resolve that. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closed #896
* Illumos #3085: zfs diff panics, then panics in a loop on bootingChristopher Siden2012-08-251-4/+5
| | | | | | | | | | | Reviewed by: Matt Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/3085 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #2901: zfs receive fails for exabyte sparse filesSimon Klinkert2012-08-251-0/+3
| | | | | | | | | | | Reviewed by: Matthew Ahrens <[email protected]> Approved by: Dan McDonald <[email protected]> References: https://www.illumos.org/issues/2901 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Drop spill buffer referenceJaven Wu2012-08-251-2/+22
| | | | | | | | | | | | | | | | | | | When calling sa_update() and friends it is possible that a spill buffer will be needed to accomidate the update. When this happens a hold is taken on the new dbuf and that hold must be released before calling dmu_tx_commit(). Failing to release the hold will cause a copy of the dbuf to be made in dbuf_sync_leaf(). This is done to ensure further updates to the dbuf never sneak in to the syncing txg. This could be left to the sa_update() caller. But then the caller would need to be aware of this internal SA implementation detail. It is therefore preferable to handle this all internally in the SA implementation. Signed-off-by: Brian Behlendorf <[email protected]> Closes #503 Closes #513
* Revert "Use SA_HDL_PRIVATE for SA xattrs"Brian Behlendorf2012-08-251-28/+5
| | | | | | | | | | | | This reverts commit ec2626ad3f695a2ced3946c4197ef64cbcac4959 which caused consistency problems between the shared and private handles. Reverting this change should resolve issues #709 and #727. It will also reintroduce an arc_anon memory leak which is addressed by the next commit. Signed-off-by: Brian Behlendorf <[email protected]> Closes #709 Closes #727
* Wrap smp_processor_id in kpreempt_[dis|en]ablePrakash Surya2012-08-243-2/+22
| | | | | | | | | | | | | After surveying the code, the few places where smp_processor_id is used were deemed to be safe to use with a preempt enabled kernel. As such, no core logic had to be changed. These smp_processor_id call sites are simply are wrapped in kpreempt_disable and kpreempt_enabled to prevent the Linux kernel from emitting scary warnings. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Issue #83
* Fix snapshot automounting with GrSecurity constify plugin.Massimo Maggi2012-08-242-10/+10
| | | | | | | | | | | | | | | | | | | | | | | ./configure erroneously detects absence of dops->d_automount when built against a GrSecurity patched kernel. Summerized error message found in config.log: checking whether dops->d_automount() exists ... In function 'main': ... error: constified variable 'dops' cannot be local The "dops" variable cannot be a local variable, so it's moved to the global scope. This test also fails if the prototype of the dops->d_automount function pointer is changed. Signed-off-by: Massimo Maggi <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #884
* Illumos #2803: zfs get guid pretty-prints the outputGarrett D'Amore2012-08-231-0/+12
| | | | | | | | | | | | | Reviewed by: Eric Schrock <[email protected]> Reviewed by: Richard Elling <[email protected]> Reviewed by: Alexander Eremin <[email protected]> Approved by: Dan McDonald <[email protected]> References: https://www.illumos.org/issues/2803 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #1796, #2871, #2903, #2957Christopher Siden2012-08-234-11/+66
| | | | | | | | | | | | | | | | | | | 1796 "ZFS HOLD" should not be used when doing "ZFS SEND" from a read-only pool 2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite 2903 zfs destroy -d does not work 2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Eric Schrock <[email protected]> References: https://www.illumos.org/issues/1796 https://www.illumos.org/issues/2871 https://www.illumos.org/issues/2903 https://www.illumos.org/issues/2957 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #2635: 'zfs rename -f' to perform force unmountEric Schrock2012-08-234-15/+31
| | | | | | | | | | | | | | | Reviewed by: Matt Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Bill Pijewski <[email protected]> Reviewed by: Richard Elling <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/2635 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #717
* Illumos #1936: add support for "-t <datatype>" argument to zfs getAndrew Stormont2012-08-232-6/+40
| | | | | | | | | | | | | | | Reviewed by: Kartik Mistry <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: Richard Elling <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/1936 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #681
* Illumos #1726: Removal of pyzfs broke delegation for volumesAlexander Eremin2012-08-231-4/+4
| | | | | | | | | | | | | | Reviewed by: Andrew Stormont <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Richard Lowe <[email protected]> Reviewed by: Albert Lee <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/1726 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #1977: zfs allow arguments not parsed correctly after pyzfs removalAlexander Eremin2012-08-231-2/+2
| | | | | | | | | | | | Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Albert Lee <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/1977 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Add copy-builtin to EXTRA_DISTBrian Behlendorf2012-08-232-2/+2
| | | | | | | | The copy-builtin script was accidentally not being included in the tarballs. Signed-off-by: Brian Behlendorf <[email protected]> Closes #880
* Properly initialize and free destroydataMartin Matuska2012-08-231-0/+2
| | | | | | | | | | This regression was accidentally introduced by commit 330d06f90d143b41b276796526a66a1c1fff046d due to ZoL specific code. The fix is to simply ensure the passed nvlist is initialized and freed. Signed-off-by: Brian Behlendorf <[email protected]> Closes #876
* ZFS 0.6.0-rc10zfs-0.6.0-rc10Brian Behlendorf2012-08-141-1/+1
|
* Export dmu_buf_rele() symbolBrian Behlendorf2012-08-141-0/+1
| | | | | | | | | While I'd like to remove the various pragmas in module/zfs/dbuf.c. There are consumers such as Lustre which still depend on dmu_buf_* versions of the symbols. Until all consumers can be converted to use only the dbuf_* names leave this symbol exported. Signed-off-by: Brian Behlendorf <[email protected]>
* Cleanly remove zfs-modules-devel headersBrian Behlendorf2012-08-131-3/+11
| | | | | | | | | | | | | | Add the /usr/src/zfs-<version>-<release>/<kernel> directory to the zfs-modules-devel package. This ensures that this directory will be removed when the package is removed. We do not include the higher level /usr/src/zfs-<version>-<release> directory since there may be builds for multiple kernels. Instead, a %postun rmdir is added which attempts to remove this directory. It will only succeed when the last zfs-modules-devel-* package for this specific release is removed. Signed-off-by: Brian Behlendorf <[email protected]>
* Suppress 'zfs_sb_create' memory warningBrian Behlendorf2012-08-101-1/+1
| | | | | | | | | | When mutex debugging is enabled in your kernel the increased size of the mutex structures can push the zfs_sb_t type beyond the 8k warning threshold. This isn't harmful so we suppress the warning for this case. Signed-off-by: Brian Behlendorf <[email protected]> Closes #628
* Illumos #1888: zfs(8) should mention zfs recv -eBrian Behlendorf2012-08-101-5/+18
| | | | | | | | | | | | | Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Eric Schrock <[email protected]> Reviewed by: Gordon Ross <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/1888 Ported by: Brian Behlendorf <[email protected]> Closes #683
* Fix man page installation pathNed Bass2012-08-101-0/+1
| | | | | | | | | | | | | | | | | | | RPM versions 4.8 and 4.9 differ in the definition of macro %_mandir: $ rpm --version ; rpm --showrc | grep ^-14:._mandir RPM version 4.9.0 -14: _mandir %{_prefix}/share/man $ rpm --version ; rpm --showrc | grep ^-14:._mandir RPM version 4.8.0 -14: _mandir /usr/share/man zfs.spec.in defines %_prefix as /, so man pages end up getting installed in /share/man on RPM 4.9 systems. To fix this, define %_mandir relative to %_datadir in the spec file. Signed-off-by: Brian Behlendorf <[email protected]> Closes #353
* Export dbuf_* symbolsBrian Behlendorf2012-08-102-4/+33
| | | | | | | | | | | | | Export these symbols so they may be used by other ZFS consumers besides the ZPL. Remove three stale prototype definites from dbuf.h. The actual implementations of these functions were removed/renamed long ago. It would be good in the long term to remove the existing pragmas we inherited from Solaris and simply use the dbuf_* names. Signed-off-by: Brian Behlendorf <[email protected]>
* Support building a zfs-modules-dkms sub packagePrakash Surya2012-08-089-14/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for building a zfs-modules-dkms sub package built around Dynamic Kernel Module Support. This is to allow building packages using the DKMS infrastructure which is intended to ease the burden of kernel version changes, upgrades, etc. By default zfs-modules-dkms-* sub package will be built as part of the 'make rpm' target. Alternately, you can build only the DKMS module package using the 'make rpm-dkms' target. Examples: # To build packaged binaries as well as a dkms packages $ ./configure && make rpm # To build only the packaged binary utilities and dkms packages $ ./configure && make rpm-utils rpm-dkms Note: Only the RHEL 5/6, CHAOS 5, and Fedora distributions are supported for building the dkms sub package. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #535
* Add '--with-spl-timeout' optionPrakash Surya2012-08-082-39/+118
| | | | | | | | | | | | | | | | When checking for the SPL Module.symvers file, a timeout can now be passed in which will pause the configure step while it waits for this file to be generated. By default, the configure behavior is unchanged as a timeout of 0 is used. If a positive number of seconds is passed, configure will wait that number of seconds for the Module.symvers file before moving on. The main motivation for this change was to support parallel execution of './configure && make' for the SPL and ZFS packages in preparation of supporting DKMS based packages. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #1693: persistent 'comment' field for a zpoolDan McDonald2012-08-0810-28/+143
| | | | | | | | | | | | | Reviewed by: George Wilson <[email protected]> Reviewed by: Eric Schrock <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/1693 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #678
* Set zvol discard_granularity to the volblocksize.Etienne Dechamps2012-08-0761-0/+233
| | | | | | | | | | | | | | | | | | Currently, zvols have a discard granularity set to 0, which suggests to the upper layer that discard requests of arbirarily small size and alignment can be made efficiently. In practice however, ZFS does not handle unaligned discard requests efficiently: indeed, it is unable to free a part of a block. It will write zeros to the specified range instead, which is both useless and inefficient (see dnode_free_range). With this patch, zvol block devices expose volblocksize as their discard granularity, so the upper layer is aware that it's not supposed to send discard requests smaller than volblocksize. Signed-off-by: Brian Behlendorf <[email protected]> Closes #862
* Add missing dependencies to ./copy-builtinRichard Yao2012-08-061-0/+3
| | | | | | | | | | | | | | ZFS depends on EFI_PARTITION, ZLIB_DEFLATE and ZLIB_INFLATE, but when ZFS is integrated with the kernel source tree, menuconfig does not enforce these dependencies. This can cause build failures in the case of ZLIB_DEFLATE and ZLIB_INFLATE where symbols are not found. This can also cause runtime failures in the case of EFI_PARTITION, where the kernel will not understand GPT partitions when creating pools from raw disks. We solve this by making menuconfig aware of these dependencies. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #854
* Limit the number of blocks to discard at once.Etienne Dechamps2012-07-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The number of blocks that can be discarded in one BLKDISCARD ioctl on a zvol is currently unlimited. Some applications, such as mkfs, discard the whole volume at once and they use the maximum possible discard size to do that. As a result, several gigabytes discard requests are not uncommon. Unfortunately, if a large amount of data is allocated in the zvol, ZFS can be quite slow to process discard requests. This is especially true if the volblocksize is low (e.g. the 8K default). As a result, very large discard requests can take a very long time (seconds to minutes under heavy load) to complete. This can cause a number of problems, most notably if the zvol is accessed remotely (e.g. via iSCSI), in which case the client has a high probability of timing out on the request. This patch solves the issue by adding a new tunable module parameter: zvol_max_discard_blocks. This indicates the maximum possible range, in zvol blocks, of one discard operation. It is set by default to 16384 blocks, which appears to be a good tradeoff. Using the default volblocksize of 8K this is equivalent to 128 MB. When using the maximum volblocksize of 128K this is equivalent to 2 GB. Signed-off-by: Brian Behlendorf <[email protected]> Closes #858
* Illumos #1644, #1645, #1646, #1647, #1708Matthew Ahrens2012-07-3124-718/+2274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1644 add ZFS "clones" property 1645 add ZFS "written" and "written@..." properties 1646 "zfs send" should estimate size of stream 1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots 1708 adjust size of zpool history data References: https://www.illumos.org/issues/1644 https://www.illumos.org/issues/1645 https://www.illumos.org/issues/1646 https://www.illumos.org/issues/1647 https://www.illumos.org/issues/1708 This commit modifies the user to kernel space ioctl ABI. Extra care should be taken when updating to ensure both the kernel modules and utilities are updated. This change has reordered all of the new ioctl()s to the end of the list. This should help minimize this issue in the future. Reviewed by: Richard Lowe <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Albert Lee <[email protected]> Approved by: Garrett D'Amore <[email protected]> Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #826 Closes #664