aboutsummaryrefslogtreecommitdiff
path: root/cddl/lib/libzfs
Commit message (Collapse)AuthorAgeFilesLines
* Use MACHINE_CPUARCH when checking for arm64Andrew Turner2020-09-141-1/+1
| | | | | | | | | | | | | | | Use MACHINE_CPUARCH with arm64 (aarch64) when we build code that could run on any 64-bit Arm instruction set. This will simplify checks in downstream consumers targeting prototype instruction sets. The only place we check for MACHINE_ARCH == aarch64 is when building the device tree blobs. As these are targeting current generation ISAs. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D26370 Notes: svn path=/head/; revision=365726
* libzfs: Add missing crypto dependencyRyan Moeller2020-08-271-1/+15
| | | | | | | | | | libzfs_crypto.c uses PKCS5_PBKDF2_HMAC_SHA1 from libcrypto. Reported by: John Kennedy Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364861
* Move zstd sources from libzfs to libzpoolRyan Moeller2020-08-261-6/+0
| | | | | | | | | | | | | | zstd is kernel code that was not supposed to be in libzfs. libzpool provides userland shims for kernel code and is where the zstd code needs to be included. Reported by: John Kennedy Discussed with: mmacy Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=364830
* Fix libzfs build failures for someMatt Macy2020-08-251-1/+0
| | | | | | | | In some environments adding zstd/include to the include path would cause zstd's stdlib.h to hide the system one. Notes: svn path=/head/; revision=364751
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-53/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-1/+0
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* pkgbase: Force zfs(8) and zpool(8) to be in the runtime packageEmmanuel Vadot2019-09-051-0/+1
| | | | | | | | | | | Those commands are needed to repair a FreeBSD installation so add them to the runtime package Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21498 Notes: svn path=/head/; revision=351850
* Do not blindly include illumos kernel headers instead of user-space.Alexander Motin2018-08-021-1/+0
| | | | | | | | It is not needed now, and I doubt it much helped at all, creating more confusions then good. Notes: svn path=/head/; revision=337160
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several ↵Andriy Gapon2017-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands illumos/illumos-gate@0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e https://github.com/illumos/illumos-gate/commit/0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e https://www.illumos.org/issues/640 du(1), df(1m), ls(1), and swap(1m) all include a copy (it appears literally copied) of the 'number_to_scaled_string' function in their source. This should be moved to a shared library and all 4 commands should use this instead. FreeBSD note: of all libcmdutils functionality ZFS (and other illumos contrib code) currently uses only nicenum() function (which is similar to humanize_number but has some formatting differences). For this reason I decided to not port the whole library. As a result, nicenum.c from libcmdutils is compiled into libzfs and libzpool. This is a bit ugly, but works. If one day we are forced to create libillumos, then the file should be moved to that library. Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Yuri Pankov <yuripv@gmx.com> Approved by: Dan McDonald <danmcd@joyent.com> Author: Jason King <jason.brian.king@gmail.com> MFC after: 2 weeks Notes: svn path=/head/; revision=325035
* Commit the 64-bit inode project.Konstantin Belousov2017-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024. ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important. Struct xvnode changed layout, no compat shims are provided. For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat. Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439 Notes: svn path=/head/; revision=318736
* cddl: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-19/+18
| | | | | | | | | | | | | This simplifies make logic/output While here, remove bogus CFLAGS which look for headers in cddl/lib/libumem. There aren't any source files there (just Makefiles) MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314654
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-7/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+1
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.Bryan Drewery2015-11-251-1/+0
| | | | | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291307
* MFV r289312: 2605 want to resume interrupted zfs sendAlexander Motin2015-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Xin Li <delphij@freebsd.org> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com> illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8 For more info, see: - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive - video https://www.youtube.com/watch?v=iY44jPMvxog - manpage changes (for zfs resume -s and zfs send -t) - upcoming talk at the OpenZFS Developer Summit The TL;DR is: Use "zfs receive -s" to save the partially received state on failure. On failure, get the receive token with "zfs get receive_resume_token <fs>" Resume the send with "zfs send -t <token_value>" Relnotes: yes Notes: svn path=/head/; revision=289362
* Fix circular dependency between libzfs and libzfs_coreBaptiste Daroussin2015-06-151-1/+0
| | | | | | | | libzfs_core is the wrapper around kernel ioctls, the ioctl compat code belongs to it Notes: svn path=/head/; revision=284409
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated/new dependenciesSimon J. Gerraty2014-11-191-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=274694
| * Merge from head@274682Simon J. Gerraty2014-11-191-2/+5
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=274683
| * Merge head from 7/28Simon J. Gerraty2014-08-192-2/+3
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge from headSimon J. Gerraty2014-05-081-0/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * | | New/updated dependenciesSimon J. Gerraty2013-04-141-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249459
| * | | sync from headSimon J. Gerraty2013-04-121-2/+5
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Updated/new Makefile.dependSimon J. Gerraty2012-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242788
| * | | | Sync from headSimon J. Gerraty2012-11-041-2/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Add dependencies to various libraries to libzfs and libzpool.Xin LI2014-10-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: sef Notes: svn path=/head/; revision=272484
* | | | | | Revert r272189, the committed version was an old version and breaks build.Xin LI2014-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointy hat to: delphij Notes: svn path=/head/; revision=272208
* | | | | | Add libuutil to dependency list.Xin LI2014-09-261-2/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed by: sef MFC after: 3 days Notes: svn path=/head/; revision=272189
* | | | | Explicitly link libzfs against libavl as it is done in OpenSolarisXin LI2014-05-221-2/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: java/183081 Tested by: jkim MFC after: 3 days Notes: svn path=/head/; revision=266520
* | | | Import adapted OpenSolaris' thread pool API implementation.Alexander Motin2014-05-081-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thread pool is used by libzfs to implement parallel disk scanning. Without this change our dummy wrapper made `zpool import ZZZ` command to scan all disks sequentially from the single thread when searching for pools. This change makes it use two threads per CPU, same as in OpenSolaris. On system with 200 HDDs this change reduces ZFS pool import time from 35 to 22 seconds. Notes: svn path=/head/; revision=265689
* | | Move common zfs ioctl compatibility functions (userland) into libzfs_compat.cMartin Matuska2013-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | Introduce additional constants for zfs ioctl versions Notes: svn path=/projects/libzfs_core/; revision=248461
* | | WiP merge of libzfs_core (MFV r238590, r238592)Martin Matuska2013-03-051-2/+4
| |/ |/| | | | | | | | | | | not yet working, ioctl handling needs to be changed Notes: svn path=/projects/libzfs_core/; revision=247831
* | Partial MFV (illumos-gate 13753:2aba784c276b)Martin Matuska2012-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2762 zpool command should have better support for feature flags References: https://www.illumos.org/issues/2762 MFC after: 2 weeks Notes: svn path=/head/; revision=238926
* | Introduce "feature flags" for ZFS pools (bump SPA version to 5000).Martin Matuska2012-06-111-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | Add first feature "com.delphix:async_destroy" (asynchronous destroy of ZFS datasets). Implement features support in ZFS boot code. Illumos revisions merged: 13700:2889e2596bd6 13701:1949b688d5fb 2619 asynchronous destruction of ZFS file systems 2747 SPA versioning with zfs feature flags References: https://www.illumos.org/issues/2619 https://www.illumos.org/issues/2747 Obtained from: illumos (issue #2619, #2747) MFC after: 1 month Notes: svn path=/head/; revision=236884
* Merge new ZFS features from illumos:Martin Matuska2011-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1644 add ZFS "clones" property https://www.illumos.org/issues/1644 1645 add ZFS "written" and "written@..." properties https://www.illumos.org/issues/1645 1646 "zfs send" should estimate size of stream https://www.illumos.org/issues/1646 1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots https://www.illumos.org/issues/1647 1693 persistent 'comment' field for a zpool https://www.illumos.org/issues/1693 1708 adjust size of zpool history data https://www.illumos.org/issues/1708 1748 desire support for reguid in zfs https://www.illumos.org/issues/1748 Obtained from: illumos (changesets 13514, 13524, 13525) MFC after: 1 month Notes: svn path=/head/; revision=228103
* Fix a few gratuitous library dependencies. Some of the ZFS utilitiesRobert Millan2011-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | are linked with libraries they don't use: - zinject doesn't use libavl - ztest doesn't use libz - zdb uses neither libavl nor libz - zfs uses neither libbsdxml nor libm, nor libsbuf - zpool uses neither libbsdxml nor libm, nor libsbuf In addition, libzfs needs libm because it uses pow(), however it isn't linked with -lm. This went unnoticed because all its users had -lm before. Reviewed by: pjd, mm Approved by: kib (mentor) MFC after: 1 week Notes: svn path=/head/; revision=226940
* Finally... Import the latest open-source ZFS version - (SPA) 28.Pawel Jakub Dawidek2011-02-271-12/+17
| | | | | | | | | | | | | | | | | | Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month Notes: svn path=/head/; revision=219089
* Remove manual .includes in cddl MakefilesUlrich Spörlein2010-03-021-0/+1
| | | | | | | | | | | | | | | | | | - Break the dependency on ../Makefile.inc for .PATH, and include ../Makefile.inc implicitly. This is required to ... - Set WARNS?=6 in top-level Makefile.inc - Remove now redundant WARNS settings, add WARNS?=0 where appropriate - Remove redundant SHLIB_MAJOR overrides - Use NO_MAN, not MK_MAN=no - Remove redundant inclusion of bsd.own.mk - Order Makefiles more according to style.Makefile(9) - Reduce diff of cddl Makefiles against each other No objection: pjd Approved by: ed (co-mentor) Notes: svn path=/head/; revision=204597
* Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.Pawel Jakub Dawidek2008-11-171-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bring huge amount of changes, I'll enumerate only user-visible changes: - Delegated Administration Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc. - L2ARC Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content. - slog Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2). - vfs.zfs.super_owner Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one. - chflags(2) Not all the flags are supported. This still needs work. - ZFSBoot Support to boot off of ZFS pool. Not finished, AFAIK. Submitted by: dfr - Snapshot properties - New failure modes Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests - Refquota, refreservation properties Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots. - Sparse volumes ZVOLs that don't reserve space in the pool. - External attributes Compatible with extattr(2). - NFSv4-ACLs Not sure about the status, might not be complete yet. Submitted by: trasz - Creation-time properties - Regression tests for zpool(8) command. Obtained from: OpenSolaris Notes: svn path=/head/; revision=185029
* The sources covered by Sun's CDDL have been repo copied below theJohn Birrell2008-03-271-16/+16
| | | | | | | | | | | src/cddl and src/sys/cddl directories per the core@ decision following the license review. This change modifies the affected Makefiles to reference the sources in their new location. Notes: svn path=/head/; revision=177674
* Use provider's ident to handle situations when disks are moved aroundPawel Jakub Dawidek2007-05-061-1/+2
| | | | | | | | | | and show up with different names: first try to open provider using remembered name and compare its ident, if equal, this is our provider, if not equal or there is no provider with such name, find provider with remembered ident and don't care about the name. Notes: svn path=/head/; revision=169303
* Apply a set of style.Makefile(5) changes to src/cddl/ makefiles.Ruslan Ermilov2007-04-161-38/+35
| | | | | | | | | | | | | There are some insignificant non-style changes as well. Not fixed: makefiles use ${LIBTHR} that doesn't exist, thus breaking "make checkdpadd" and not tracking dependencies properly. Approved by: pjd Notes: svn path=/head/; revision=168792
* Please welcome ZFS - The last word in file systems.Pawel Jakub Dawidek2007-04-061-0/+49
ZFS file system was ported from OpenSolaris operating system. The code in under CDDL license. I'd like to thank all SUN developers that created this great piece of software. Supported by: Wheel LTD (http://www.wheel.pl/) Supported by: The FreeBSD Foundation (http://www.freebsdfoundation.org/) Supported by: Sentex (http://www.sentex.net/) Notes: svn path=/head/; revision=168404