aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zfs/zfs_main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Illumos 4951 - ZFS administrative commands should use reserved spaceMatthew Ahrens2015-05-041-2/+5
| | | | | | | | | | | | | | | 4951 ZFS administrative commands should use reserved space, not with ENOSPC Reviewed by: John Kennedy <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: Dan McDonald <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/4373 https://github.com/illumos/illumos-gate/commit/7d46dc6 Ported by: Brian Behlendorf <[email protected]>
* Illumos 5134 - if ZFS_DEBUG or debug= is set, libzpool should enable debug ↵Matthew Ahrens2015-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | prints 5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Saso Kiselkov <[email protected]> Approved by: Dan McDonald <[email protected]> References: https://www.illumos.org/projects/illumos-gate/issues/5134 https://github.com/illumos/illumos-gate/commit/7fa49ea Porting notes: Added dprintf_setup() to main in zfs_main.c and zpool_main.c. Ported by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2669
* 5410 Document -S option to zfs inheritPaul B. Henson2015-04-241-1/+5
| | | | | | | | | | | | | | | 5410 Document -S option to zfs inherit 5412 Mention -S option when zfs inherit fails on quota Reviewed by: Matthew Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/5410 https://github.com/illumos/illumos-gate/commit/5ff8cfa9 Ported-by: DHE <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3279
* zpool import should honor overlay propertyNed Bass2015-03-271-14/+0
| | | | | | | | | | | | Make the 'zpool import' command honor the overlay property to allow filesystems to be mounted on a non-empty directory. As it stands now this property is only checked by the 'zfs mount' command. Move the check into 'zfs_mount()` in libzpool so the property is honored for all callers. Signed-off-by: Ned Bass <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3227
* Create an 'overlay' propertyTurbo Fredriksson2014-08-151-0/+14
| | | | | | | | | | | | | | | Add a new 'overlay' property (default 'off') that controls whether the filesystem should be mounted even if the mountpoint is busy or if it should fail with a 'mountpoint not empty'. Doing overlay mounts is the default mount behavior on Linux, but not in ZFS. It have been decided that following the ZFS behavior should be the default, but this overlay allows for site administrator to override this decision on a per-dataset basis. Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes: #2503
* Illumos 4757, 4913Matthew Ahrens2014-08-011-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 4757 ZFS embedded-data block pointers ("zero block compression") 4913 zfs release should not be subject to space checks Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Max Grossman <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Reviewed by: Dan McDonald <[email protected]> Approved by: Dan McDonald <[email protected]> References: https://www.illumos.org/issues/4757 https://www.illumos.org/issues/4913 https://github.com/illumos/illumos-gate/commit/5d7b4d4 Porting notes: For compatibility with the fastpath code the zio_done() function needed to be updated. Because embedded-data block pointers do not require DVAs to be allocated the associated vdevs will not be marked and therefore should not be unmarked. Ported by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2544
* Illumos 4368, 4369.Matthew Ahrens2014-07-291-61/+259
| | | | | | | | | | | | | | | | | 4369 implement zfs bookmarks 4368 zfs send filesystems from readonly pools Reviewed by: Christopher Siden <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/4369 https://www.illumos.org/issues/4368 https://github.com/illumos/illumos-gate/commit/78f1710 Ported by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2530
* Only automatically mount a clone when 'canmount == on'.Turbo Fredriksson2014-06-061-1/+12
| | | | | | | | | | | | | | According to the man page, "When the noauto option is set, a dataset can only be mounted and unmounted explicitly. The dataset is not mounted automatically when the dataset is created or imported ...." When cloning a dataset the canmount property was not being honored. This patch adds the required check to achieve the behavior described in the man page. Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2241
* Check the dataset type more rigorously when fetching properties.Tim Chase2014-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | When fetching property values of snapshots, a check against the head dataset type must be performed. Previously, this additional check was performed only when fetching "version", "normalize", "utf8only" or "case". This caused the ZPL properties "acltype", "exec", "devices", "nbmand", "setuid" and "xattr" to be erroneously displayed with meaningless values for snapshots of volumes. It also did not allow for the display of "volsize" of a snapshot of a volume. This patch adds the headcheck flag paramater to zfs_prop_valid_for_type() and zprop_valid_for_type() to indicate the check is being done against a head dataset's type in order that properties valid only for snapshots are handled correctly. This allows the the head check in get_numeric_property() to be performed when fetching a property for a snapshot. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2265
* Fix for re-reading /etc/mtab.John M. Layman2014-04-041-3/+14
| | | | | | | | | | | | | | | | | | | This is a continuation of fb5c53ea65b75c67c23f90ebbbb1134a5bb6c140: When /etc/mtab is updated on Linux it's done atomically with rename(2). A new mtab is written, the existing mtab is unlinked, and the new mtab is renamed to /etc/mtab. This means that we must close the old file and open the new file to get the updated contents. Using rewind(3) will just move the file pointer back to the start of the file, freopen(3) will close and open the file. In this commit, a few more rewind(3) calls were replaced with freopen(3) to allow updated mtab entries to be picked up immediately. Signed-off-by: John M. Layman <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2215 Issue #1611
* Enable /etc/mtab cache to improve performanceBrian Behlendorf2014-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | Re-enable the /etc/mtab cache to prevent the zfs command from having to repeatedly open and read from the /etc/mtab file. Instead an AVL tree of the mounted filesystems is created and used to vastly speed up lookups. This means that if non-zfs filesystems are mounted concurrently the 'zfs mount' will not immediately detect them. In practice that will rarely happen and even if it does the absolute worst case would be a failed mount. This was originally disabled out of an abundance of paranoia. NOTE: There may still be some parts of the code which do not consult the mtab cache. They should be updated to check the mtab cache as they as discovered to be a problem. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Chris Dunlop <[email protected]> Issue #845
* Fix the creation of ZPOOL_HIST_CMD pool history entries.Tim Chase2014-01-071-1/+12
| | | | | | | | | | | | | | | | | | | | | Move the libzfs_fini() after the zpool_log_history() call so the ZPOOL_HIST_CMD entry can get written. Fix the handling of saved_poolname in zfsdev_ioctl() which was broken as part of the stack-reduction work in a16878805388c4d96cb8a294de965071d138a47b. Since ZoL destroys the TSD data in which the previously successful ioctl()'s pool name is stored following every vop, the ZFS_IOC_LOG_HISTORY ioctl has a very important restriction: it can only successfully write a long entry following a successful ioctl() if no intervening vops have been performed. Some of zfs subcommands do perform intervening vops and to do the logging themselves. At the moment, the "create" and "clone" subcommands have been modified appropriately. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1998
* cstyle: Resolve C style issuesMichael Kjorling2013-12-181-2/+2
| | | | | | | | | | | | | | | | | | The vast majority of these changes are in Linux specific code. They are the result of not having an automated style checker to validate the code when it was originally written. Others were caused when the common code was slightly adjusted for Linux. This patch contains no functional changes. It only refreshes the code to conform to style guide. Everyone submitting patches for inclusion upstream should now run 'make checkstyle' and resolve any warning prior to opening a pull request. The automated builders have been updated to fail a build if when 'make checkstyle' detects an issue. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1821
* Illumos #4208John Wren Kennedy2013-12-181-2/+2
| | | | | | | | | | | | | | | | | 4208 Typo in zfs_main.c: "posxiuser" Reviewed by: Sonu Pillai <[email protected]> Reviewed by: Will Guyette <[email protected]> Reviewed by: Eric Diven <[email protected]> Reviewed by: Christopher Siden <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/4208 illumos/illumos-gate@f38cb554a534c6df738be3f4d23327e69888e634 Ported-by: Brian Behlendorf <[email protected]> Closes #1986
* Illumos #2583Yuri Pankov2013-11-211-34/+35
| | | | | | | | | | | | 2583 Add -p (parsable) option to zfs list References: https://www.illumos.org/issues/2583 illumos/illumos-gate@43d68d68c1ce08fb35026bebfb141af422e7082e Ported-by: Gregor Kopka <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes: #937
* Illumos #3894Keith M Wesolowski2013-11-041-0/+6
| | | | | | | | | | | | | | 3894 zfs should not allow snapshot of inconsistent dataset Reviewed by: Matthew Ahrens <[email protected]> Approved by: Gordon Ross <[email protected]> References: https://www.illumos.org/issues/3894 illumos/illumos-gate@ca48f36f20f6098ceb19d5b084b6b3d4b8eca9fa Ported-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #1775
* Illumos #3740Steven Hartland2013-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3740 Poor ZFS send / receive performance due to snapshot hold / release processing Reviewed by: Matthew Ahrens <[email protected]> Approved by: Christopher Siden <[email protected]> References: https://www.illumos.org/issues/3740 illumos/illumos-gate@a7a845e4bf22fd1b2a284729ccd95c7370a0438c Ported-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #1775 Porting notes: 1. 13fe019870c8779bf2f5b3ff731b512cf89133ef introduced a merge conflict in dsl_dataset_user_release_tmp where some variables were moved outside of the preprocessor directive. 2. dea9dfefdd747534b3846845629d2200f0616dad made the previous merge conflict worse by switching KM_SLEEP to KM_PUSHPAGE. This is notable because this commit refactors the code, adding a new KM_SLEEP allocation. It is not clear to me whether this should be converted to KM_PUSHPAGE. 3. We had a merge conflict in libzfs_sendrecv.c because of copyright notices. 4. Several small C99 compatibility fixed were made.
* Corrected "zfs list -t <type>" syntaxSteven Hartland2013-10-251-1/+1
| | | | | | | in man page and in command help. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1805
* Illumos #3464Matthew Ahrens2013-09-041-50/+66
| | | | | | | | | | | | | | | | | 3464 zfs synctask code needs restructuring Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Adam Leventhal <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Christopher Siden <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/3464 illumos/illumos-gate@3b2aab18808792cbd248a12f1edf139b89833c13 Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1495
* Illumos #2882, #2883, #2900Matthew Ahrens2013-09-041-23/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2882 implement libzfs_core 2883 changing "canmount" property to "on" should not always remount dataset 2900 "zfs snapshot" should be able to create multiple, arbitrary snapshots at once Reviewed by: George Wilson <[email protected]> Reviewed by: Chris Siden <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Bill Pijewski <[email protected]> Reviewed by: Dan Kruchinin <[email protected]> Approved by: Eric Schrock <[email protected]> References: https://www.illumos.org/issues/2882 https://www.illumos.org/issues/2883 https://www.illumos.org/issues/2900 illumos/illumos-gate@4445fffbbb1ea25fd0e9ea68b9380dd7a6709025 Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1293 Porting notes: WARNING: This patch changes the user/kernel ABI. That means that the zfs/zpool utilities built from master are NOT compatible with the 0.6.2 kernel modules. Ensure you load the matching kernel modules from master after updating the utilities. Otherwise the zfs/zpool commands will be unable to interact with your pool and you will see errors similar to the following: $ zpool list failed to read pool configuration: bad address no pools available $ zfs list no datasets available Add zvol minor device creation to the new zfs_snapshot_nvl function. Remove the logging of the "release" operation in dsl_dataset_user_release_sync(). The logging caused a null dereference because ds->ds_dir is zeroed in dsl_dataset_destroy_sync() and the logging functions try to get the ds name via the dsl_dataset_name() function. I've got no idea why this particular code would have worked in Illumos. This code has subsequently been completely reworked in Illumos commit 3b2aab1 (3464 zfs synctask code needs restructuring). Squash some "may be used uninitialized" warning/erorrs. Fix some printf format warnings for %lld and %llu. Apply a few spa_writeable() changes that were made to Illumos in illumos/illumos-gate.git@cd1c8b8 as part of the 3112, 3113, 3114 and 3115 fixes. Add a missing call to fnvlist_free(nvl) in log_internal() that was added in Illumos to fix issue 3085 but couldn't be ported to ZoL at the time (zfsonlinux/zfs@9e11c73) because it depended on future work.
* Don't specifically open /etc/mtab - it is done in libzfs_init()Turbo Fredriksson2013-08-151-8/+3
| | | | | | | a few lines further down and we can share the open file handle. Signed-off-by: Brian Behlendorf <[email protected]> Issue #1498
* Illumos #3098 zfs userspace/groupspace failYuri Pankov2013-08-141-10/+9
| | | | | | | | | | | | | | 3098 zfs userspace/groupspace fail without saying why when run as non-root Reviewed by: Eric Schrock <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/3098 illumos/illumos-gate@70f56fa69343b013f47e010537cff8ef3a7a40a5 Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1596
* Trivial spelling fixChris Dunlop2013-04-191-1/+1
| | | | | Signed-off-by: Brian Behlendorf <[email protected]> Closes #1411
* Illumos #1884, #3028, #3048, #3049, #3060, #3061, #3093Yuri Pankov2013-01-111-391/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1884 Empty "used" field for zfs *space commands 3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID 3048 zfs {user,group}space [-s|-S] is broken 3049 zfs {user,group}space -t doesn't really filter the results 3060 zfs {user,group}space -H output isn't tab-delimited 3061 zfs {user,group}space -o doesn't use specified fields order 3093 zfs {user,group}space's -i is noop Reviewed by: Garry Mills <[email protected]> Reviewed by: Eric Schrock <[email protected]> Approved by: Richard Lowe <[email protected]> References: illumos/illumos-gate@89f5d17b06fc4132c983112b24836a779a0ed736 illumos changeset: 13803:b5e49d71ff0e https://www.illumos.org/issues/1884 https://www.illumos.org/issues/3028 https://www.illumos.org/issues/3048 https://www.illumos.org/issues/3049 https://www.illumos.org/issues/3060 https://www.illumos.org/issues/3061 https://www.illumos.org/issues/3093 Ported-by: Brian Behlendorf <[email protected]> Closes #1194
* Illumos #2703: add mechanism to report ZFS send progressBill Pijewski2012-09-191-0/+2
| | | | | | | | | | | | | Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Robert Mustacchi <[email protected]> Reviewed by: Richard Lowe <[email protected]> Approved by: Eric Schrock <[email protected]> References: https://www.illumos.org/issues/2703 Ported by: Martin Matuska <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #1796, #2871, #2903, #2957Christopher Siden2012-08-231-1/+1
| | | | | | | | | | | | | | | | | | | 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-231-7/+11
| | | | | | | | | | | | | | | 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-231-3/+36
| | | | | | | | | | | | | | | 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]>
* Illumos #1644, #1645, #1646, #1647, #1708Matthew Ahrens2012-07-311-136/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Speed up 'zfs list -t snapshot -o name -s name'Pawel Jakub Dawidek2012-06-141-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD #xxx: Dramatically optimize listing snapshots when user requests only snapshot names and wants to sort them by name, ie. when executes: # zfs list -t snapshot -o name -s name Because only name is needed we don't have to read all snapshot properties. Below you can find how long does it take to list 34509 snapshots from a single disk pool before and after this change with cold and warm cache: before: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 525s warm cache: 218s after: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 1.7s warm cache: 1.1s NOTE: This patch only appears in FreeBSD. If/when Illumos picks up the change we may want to drop this patch and adopt their version. However, for now this addresses a real issue. Ported-by: Brian Behlendorf <[email protected]> Issue #450
* Illumos #2067: uninitialized variables in zfs(1M) may make snapshots ↵Richard Lowe2012-04-271-16/+16
| | | | | | | | | | | | | | | | | | undestroyable Reviewed by: Joshua M. Clulow <[email protected]> Reviewed by: Milan Jurik <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Approved by: Garrett D'Amore <[email protected]> References: https://www.illumos.org/issues/2067 Ported by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* ZFS list snapshot property aliasP.SCH2012-04-111-3/+4
| | | | | | | | Add support for the `zfs list -t snap` alias which is available under Oracle Solaris 11. Signed-off-by: Brian Behlendorf <[email protected]> Closes #640
* ZFS snapshot aliasP.SCH2012-04-111-1/+7
| | | | | | | | | For consistency, and because it's handy, add the 'zfs snap' alias which was introduced by Oracle Solaris 11. This includes an update to the man page to reflect all the available alias (snap, umount, and recv). Signed-off-by: Brian Behlendorf <[email protected]> Closes #640
* Fix executable permissionsBrian Behlendorf2012-03-261-0/+0
| | | | | | | | | | | | Caught by lint, this permission change was accidentally introduced by commit 42cb3819f1a1f536105faac81ffc150f3da90a80. Restore the correct permissions and while I'm at it add a missing whack-bang to config/ltmain.sh. lint: executable-not-elf-or-script: zpool_main.c zfs_main.c Signed-off-by: Brian Behlendorf <[email protected]> Closes #620
* Use stderr for 'no pools/datasets available' errorGregor Kopka2012-03-151-2/+2
| | | | | | | | | | | The 'zfs list' and 'zpool list' commands output the message 'no datasets/pools available' to stdout. This should go to stderr and only the available datasets/pools should go to stdout. Returning nothing to stdout is expected behavior when there is nothing to list. Signed-off-by: Brian Behlendorf <[email protected]> Closes #581
* Add overlay(-O) mount option supportSuman Chakravartula2012-01-121-2/+4
| | | | | | | | | | | | | | | | | | | Linux supports mounting over non-empty directories by default. In Solaris this is not the case and -O option is required for zfs mount to mount a zfs filesystem over a non-empty directory. For compatibility, I've added support for -O option to mount zfs filesystems over non-empty directories if the user wants to, just like in Solaris. I've defined MS_OVERLAY to record it in the flags variable if the -O option is supplied. The flags variable passes through a few functions and its checked before performing the empty directory check in zfs_mount function. If -O is given, the check is not performed. Signed-off-by: Brian Behlendorf <[email protected]> Closes #473
* Fix uninitialized varible in zfs_do_userspace()Brian Behlendorf2011-09-271-1/+1
| | | | | | | | | | | | | | When compiling under Debian Lenny with gcc version 4.3.2 (Debian 4.3.2-1.1) the following warning occurs. To quiet the warning initialize 'error' to zero. Newer versions of gcc correctly determine that this uninitialized varible is impossible because ZFS_NUM_USERQUOTA_PROPS is known to be greater than zero. cmd/zfs/zfs_main.c:2377: warning: "error" may be used uninitialized in this function Signed-off-by: Brian Behlendorf <[email protected]>
* Fixed uninitialized variableBrian Behlendorf2011-08-191-1/+1
| | | | | | | | | | | This warning was accidentally introduced by commit b7936d5c2337bc976ac831c1c38de563844c36b. The fix is to simply initialize the variable to ZFS_DELEG_WHO_UNKNOWN. cmd/zfs/zfs_main.c:4460:25: warning: 'who_type' may be used uninitialized in this function Signed-off-by: Brian Behlendorf <[email protected]>
* Fix missing format argumentsBrian Behlendorf2011-08-191-3/+3
| | | | | | | | | | | These warnings were accidentally introduced by commit b7936d5c2337bc976ac831c1c38de563844c36b. The fix is to simply add the missing format specifier. cmd/zfs/zfs_main.c:4565: warning: format not a string literal and no format arguments Signed-off-by: Brian Behlendorf <[email protected]>
* Disable zfs /etc/mtab updatesBrian Behlendorf2011-08-191-2/+1
| | | | | | | | | | | | Completely disable the zfs binary from attempting to directly update /etc/mtab. The Linux port relies entirely on the mount.zfs helper to safely update /etc/mtab. If we left the /etc/mtab updates to the zfs binary then they could race with concurrent non-zfs mounts. Routing everything through the system mount command ensures the /etc/mtab updates are locked properly. Signed-off-by: Brian Behlendorf <[email protected]> Issue #329
* Illumos #278: get rid zfs of python and pyzfs dependenciesAlexander Stetsenko2011-08-011-31/+2240
| | | | | | | | | | | | | | | | | | | | | Remove all python and pyzfs dependencies for consistency and to ensure full functionality even in a mimimalist environment. Reviewed by: [email protected] Reviewed by: [email protected] Reviewed by: [email protected] Reviewed by: [email protected] Approved by: [email protected] References to Illumos issue and patch: - https://www.illumos.org/issues/278 - https://github.com/illumos/illumos-gate/commit/1af68beac3 Signed-off-by: Brian Behlendorf <[email protected]> Issue #340 Issue #160 Signed-off-by: Brian Behlendorf <[email protected]>
* Illumos #510: 'zfs get' enhancement - mountpoint as an argumentShampavman2011-08-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The 'zfs get' command should be able to deal with mountpoint as an argument. It already works with 'zfs list' command: # zfs list /export/home/estibi NAME USED AVAIL REFER MOUNTPOINT rpool/export/home/estibi 1.14G 3.86G 1.14G /export/home/estibi but it fails with 'zfs get': # zfs get all /export/home/estibi cannot open '/export/home/estibi': invalid dataset name Reviewed by: Eric Schrock <[email protected]> Reviewed by: Deano <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Approved by: Garrett D'Amore <[email protected]> References to Illumos issue and patch: - https://www.illumos.org/issues/510 - https://github.com/illumos/illumos-gate/commit/5ead3ed965 Signed-off-by: Brian Behlendorf <[email protected]> Issue #340
* Update 'zfs send' documentationBrian Behlendorf2011-07-081-1/+1
| | | | | | | The -D and -p options were missing from the manpage. This commit adds documentation for these features. Closes #311
* Default to internal 'zfs userspace' implementationBrian Behlendorf2011-05-201-10/+0
| | | | | | | | | | | | | We will never bring over the pyzfs.py helper script from Solaris to Linux. Instead the missing functionality will be directly integrated in to the zfs commands and libraries. To avoid confusion remove the warning about the missing pyzfs.py utility and simply use the default internal support. The Illumous developers are of the same mind and have proposed an initial patch to do this which has been integrated in to the 'allow' development branch. After some additional testing this code can be merged in to master as the right long term solution.
* Fix mount helperBrian Behlendorf2011-03-091-425/+45
| | | | | | | | | | | | | | | | | Several issues related to strange mount/umount behavior were reported and this commit should address most of them. The original idea was to put in place a zfs mount helper (mount.zfs). This helper is used to enforce 'legacy' mount behavior, and perform any extra mount argument processing (selinux, zfsutil, etc). This helper wasn't ready for the 0.6.0-rc1 release but with this change it's functional but needs to extensively tested. This change addresses the following open issues. Closes #101 Closes #107 Closes #113 Closes #115 Closes #119
* Fix uninitialized variableBrian Behlendorf2011-02-231-1/+1
| | | | | | It was possible for rc to be unitialized in the parse_options() function which triggered a compiler warning. Ensure rc is always initialized.
* MS_DIRSYNC and MS_REC compatBrian Behlendorf2011-02-101-0/+2
| | | | | | | | | | | | | It turns out that older versions of the glibc headers do not properly define MS_DIRSYNC despite it being explicitly mentioned in the man pages. They instead call it S_WRITE, so for system where this is not correct defined map MS_DIRSYNC to S_WRITE. At the time of this commit both Ubuntu Lucid, and Debian Squeeze both use the out of date glibc headers. As for MS_REC this field is also not available in the older headers. Since there is no obvious mapping in this case we simply disable the recursive mount option which used it.
* Remove HAVE_ZPL from commands and librariesBrian Behlendorf2011-02-041-34/+0
| | | | | Thanks to the previous few commits we can now build all of the user space commands and libraries with support for the zpl.