[developer] Re: [openzfs/openzfs] 9630 add lzc_rename and lzc_destroy to libzfs_core (#660)

2018-07-10 Thread Andrew Stormont
andy-js approved this pull request.

LGTM.  Thanks for taking the time to clean-up libzfs.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/660#pullrequestreview-135829277
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T47f1cc3e459efd4d-M660c057b07aee4744d73528b
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9630 add lzc_rename and lzc_destroy to libzfs_core (#660)

2018-07-05 Thread Andrew Stormont
Might as well update libzfs to use this while you're at it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/660#issuecomment-402866513
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T47f1cc3e459efd4d-M6298d3657e8e0ed91b497a55
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9634 move reservation zfs tests to use KSH (#661)

2018-07-03 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -1,4 +1,4 @@
-#!/usr/bin/ksh -p
+#!/bin/ksh -p

We already fix the shebangs for python scripts: 
https://github.com/illumos/illumos-gate/blob/master/usr/src/Makefile.master#L267

Doing the same for the tests should be easy.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/661#discussion_r199771177
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T9e4062ea309cb695-M4d56626a8ef91d74048e2007
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9634 move reservation zfs tests to use KSH (#661)

2018-07-03 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -1,4 +1,4 @@
-#!/usr/bin/ksh -p
+#!/bin/ksh -p

A change such as this should be discussed on the illumos-dev list before 
considering integration.

@ikozhukhov Have you considered changing the tests so that the shebang is 
determined at build time?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/661#discussion_r199766907
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T9e4062ea309cb695-Maaa7d6c42a6ed1013808642f
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9616 Bogus error when attempting to set property on read-only pool (#654)

2018-06-28 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -1808,13 +1808,17 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, );
 
if (ret != 0) {
+   (void) zfs_standard_error(hdl, errno, errbuf);

Oh.  You're right.  I didn't realise zfs_standard_error was actually printing 
stuff out.  I chose to do it this way because I thought it would handle the 
case where "errorprops" comes back empty, but I don't know if that's something 
that'll actually happen.  I'll have another go.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/654#discussion_r198839823
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tb4c6684d9add7dfe-Mfa9e85476025c5f74e6f3f20
Delivery options: https://openzfs.topicbox.com/groups


Re: [developer] libfakekernel problems - 8809 libzpool should leverage work done in libfakekernel

2018-06-26 Thread Andrew Stormont via openzfs-developer
Is the zdb problem documented anywhere?  The is the first I’ve heard of it.

- Andy.

> On 24 Jun 2018, at 18:05, Igor Kozhukhov  wrote:
> 
> Hi All,
> 
> Thanks to everyone who helped with analyzes of issues with zdb and crashes 
> under dilos env with zfs tests.
> 
> zdb was broken on dilos env - no output from commands like 'zdb testpool', 
> 'zdb -dP testpool'
> 
> I have reverted changeset ' 8809 libzpool should leverage work done in 
> libfakekernel' and it fixed my problem.
> 
> zdb now works as well as usual.
> it is not gcc55 build issue - i have tested with gcc44 builds too - zdb have 
> no works with example of commands.
> i have checked sources - have no found missmerges what can be related to zdb 
> unstability.
> i think, it can be related to some of threads functions (mutex_*) in 
> libfakekernel with remup.
> 
> I’d like to start thread about: do we really need dependency to libfakekernel 
> in zfs tools like libzpool, zdb, etc ?
> 
> I think, it will be much more better for portablility try to reduce 
> dependencies in zfs code base.
> 
> I’d like propose to revert commit with dependency to libfakekernel and to go 
> to use minimal dependencies for better portablility.
> 
> it will be also helps with ports of changes from others platfrorms too, where 
> we have same/similar codebases and reduce others unknown breakages.
> 
> my work for it can be found at:
> https://bitbucket.org/dilos/dilos-illumos/commits/5a9fb49101f6854d207ec6565788cd9b8b7ac943
> 
> but i’m not sure i have fixed ztext correctly and need help with it.
> 
> Bets regards,
> -Igor
> 
> openzfs / openzfs-developer / see discussions + participants + delivery 
> options Permalink

--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tcb694a62f3cfa33c-M58fd1deba6799ea2495696b2
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9617 too-frequent TXG sync causes excessive write inflation (#655)

2018-06-22 Thread Andrew Stormont
andy-js approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/655#pullrequestreview-131113115
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T9f19347b7109d5d6-Mc316bede74bc85dd79242bf3
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] Make createtxg and guid properties public (#656)

2018-06-21 Thread Andrew Stormont
andy-js approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/656#pullrequestreview-131002382
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tb0c0d1f1c824d904-M4a8652307d947f4f2dce5b2b
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9616 Bogus error when attempting to set property on read-only pool (#654)

2018-06-17 Thread Andrew Stormont
Before patch:

```
# zfs set mountpoint=/test testpool
internal error: out of memory
```

After patch:

```
# zfs set mountpoint=/test testpool
cannot set property for 'testpool': pool is read-only
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/654#issuecomment-397879735
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tc686962be780d038-Maef5a50a0cf1fbb766a581d5
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9577 remove zfs_dbuf_evict_key tsd (#645)

2018-06-15 Thread Andrew Stormont
andy-js approved this pull request.

I've seen the deadlock.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/645#pullrequestreview-129120299
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tb73a3d2cba6f4c23-M10c2c23c8a9d5ca7738b3092
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] dnode related bug fixes (#603)

2018-03-29 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -1091,7 +1091,9 @@ dmu_object_remap_indirects(objset_t *os, uint64_t 
> object,
return (err);
}
 
-   if (dn->dn_nlevels <= 1) {
+   rw_enter(>dn_struct_rwlock, RW_WRITER);
+   if (dn->dn_phys->dn_nlevels <= 1) {
+   rw_exit(>dn_struct_rwlock);

Shouldn't there be another rw_exit at the end of this if?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/603#pullrequestreview-108085342
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/T79296838de064147-M39c4274b35ad1c988e09f66d
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v3) (#596)

2018-03-27 Thread Andrew Stormont
I have been doing my own testing with parallel mounts and have observed that 
enabling SMB shares is a significant bottleneck.  From looking at the code it's 
not clear to me that this will help.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/596#issuecomment-376534304
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/T593c4e9268e77564-M27036db2bc5530b9a2e78fae
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v3) (#596)

2018-03-26 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -73,6 +74,13 @@ struct libzfs_handle {
int libzfs_storeerr; /* stuff error messages into buffer */
void *libzfs_sharehdl; /* libshare handle */
boolean_t libzfs_mnttab_enable;
+   /*
+* We need a lock to handle the case where parallel mount threads
+* are populating the mnttab cache simultaneously. The lock only
+* protects the integrity of of the avl tree, and does not protect

"of of the avl tree"

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/596#pullrequestreview-107029958
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/T593c4e9268e77564-Mc26bb697c4b1168a22dc654c
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 9286 want refreservation=auto (#592)

2018-03-19 Thread Andrew Stormont
andy-js approved this pull request.

Good job.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/592#pullrequestreview-104984091
--
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/Tcf29132d758782be-Mde8f5728828d3a801220a311
Delivery options: https://openzfs.topicbox.com/groups


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v2) (#536)

2018-02-25 Thread Andrew Stormont
I can live with this.

Rather than having 3 userspace taskq implementations (the one in libzpool, 
libfakekernel and libutaskq) we now have 2 (one in libfakekernel and one in 
libzfs).  That's an improvement.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/536#issuecomment-368324962
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T22334a01fda83bfd-M7be148cc333a5be30855a598
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v2) (#536)

2018-02-16 Thread Andrew Stormont
@prakashsurya You may count me as a reviewer if you wish to proceed down the 
current path, though I am having some seconds thoughts based on Robert's 
comments.  We could break this up in a subsequent change I guess.  I'd be okay 
with that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/536#issuecomment-366300639
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T22334a01fda83bfd-M1e18964dfae163c46c40a2a8
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v2) (#536)

2018-02-15 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -88,6 +89,9 @@
 #include 
 #defineMAXISALEN   257 /* based on sysinfo(2) man page */
 
+static int mount_tq_nthr = 512;/* taskq threads for multi-threaded 
mounting */

I suppose this could be made a tuneable through /etc/default/zfs?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/536#discussion_r168622752
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T22334a01fda83bfd-M74b52f1243a85b4d74c05d94
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v2) (#536)

2018-02-15 Thread Andrew Stormont
andy-js commented on this pull request.



> -#ifdef   __cplusplus
-extern "C" {
-#endif
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_ZFS_CONTEXT_H */

I'm glad to see this file go.  Too bad we can't also drop the one in libzpool.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/536#pullrequestreview-97022266
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T22334a01fda83bfd-Ma6c9f448bf27adab2b3ca91f
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 9112 Improve allocation performance on high-end systems (#548)

2018-02-15 Thread Andrew Stormont
Am I right in thinking these are the changes that were presented an OpenZFS 
Europe a couple of years back?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/548#issuecomment-366071890
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T987f71bf0a7c33f4-M2a28db034451ecab3f6847d4
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 9075 Improve ZFS pool import/load process and corrupted pool recovery (#539)

2018-02-10 Thread Andrew Stormont
andy-js commented on this pull request.

Overall looks good.

> +#
+# We want to test the case where a whole created by a log device is filled
+# by a regular device
+#
+function test_remove_log_then_add_vdev
+{
+   log_note "$0."
+   log_must zpool create -o cachefile=$CPATH $TESTPOOL1 \
+   $VDEV0 $VDEV1 $VDEV2 log $VDEV3
+
+   log_must cp $CPATH $CPATHBKP
+
+   log_must zpool remove $TESTPOOL1 $VDEV1
+   log_must wait_for_pool_config $TESTPOOL1 "$VDEV0 $VDEV2 log $VDEV3"
+   log_must zpool remove $TESTPOOL1 $VDEV3
+log_must check_pool_config $TESTPOOL1 "$VDEV0 $VDEV2"

The indentation looks wonky here.

> @@ -461,6 +461,16 @@ kernel_fini(void)
system_taskq_fini();
 }
 
+/* ARGSUSED */
+uint32_t
+zone_get_hostid(void *zonep)

I think this probably belongs in libfakekernel.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/539#pullrequestreview-95153387
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T603f896faeeb4d25-Mf1cc508ea5824637283cc241
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 9077 zloop misses core files because they're no longer written into cwd (#540)

2018-02-08 Thread Andrew Stormont
Does this still work if coreadm is configured to put dumps in a different 
location?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/540#issuecomment-364252166
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb3ee378817292b38-M2e01cbad2a80c65c850800d3
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 9074 domount() interprets ZFS filesystem names as relative paths (#538)

2018-02-07 Thread Andrew Stormont
andy-js approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/538#pullrequestreview-94871236
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T7060187599fd888c-M3fbe411f7a86eb6591696b67
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (v2) (#536)

2018-02-07 Thread Andrew Stormont
I think @rmustacc is exactly right.  We should not be building the zfs command 
(or libzfs) in fakekernel context.  This is a highly specialised environment 
that really only makes sense for things like libzpool which include kernel code.

I suggest you have a look at this earlier webrev of mine which introduces 
_TASKQUSER which can be used to access the taskq API outside if fakekernel 
context.  It was modelled after the _KMEMUSER define which does something 
similar:

http://cr.illumos.org/~webrev/andy_js/8115-1/

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/536#issuecomment-363908847
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T22334a01fda83bfd-Mf7f1a0daae724f19b46654e3
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8652 Tautological comparisons with ZPROP_INVAL (followup) (#528)

2018-01-20 Thread Andrew Stormont
fprop is a different type.  It does not need to be changed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/528#issuecomment-359194535
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T91a1733d6eba5db5-M1353fe7922ddb49613ec8bd0
Powered by Topicbox: https://topicbox.com


[developer] [openzfs/openzfs] 8652 Tautological comparisons with ZPROP_INVAL (followup) (#528)

2018-01-19 Thread Andrew Stormont
8652 missed a couple of instances of ZPROP_INVAL which should be changed to 
ZPOOL_PROP_INVAL.  This causes newer versions of GCC (I'm using 5.3.0) to throw 
a warning.
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/528

-- Commit Summary --

  * 8652 Tautological comparisons with ZPROP_INVAL (followup)

-- File Changes --

M usr/src/cmd/zpool/zpool_main.c (4)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/528.patch
https://github.com/openzfs/openzfs/pull/528.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/528

--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T91a1733d6eba5db5-M0052aadc65d356a76e9e3de6
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8652 Tautological comparisons with ZPROP_INVAL (#466)

2018-01-18 Thread Andrew Stormont
Sure.  I'll take a stab at it tomorrow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/466#issuecomment-358808844
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T976ed59e1bf957fd-Mf4c6a09882df67541d9dbc46
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8652 Tautological comparisons with ZPROP_INVAL (#466)

2018-01-18 Thread Andrew Stormont
Here's the fix:


diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c
index 3f8bee81c0..a6e878a341 100644
--- a/usr/src/cmd/zpool/zpool_main.c
+++ b/usr/src/cmd/zpool/zpool_main.c
@@ -413,7 +413,7 @@ static int
 add_prop_list(const char *propname, char *propval, nvlist_t **props,
 boolean_t poolprop)
 {
-   zpool_prop_t prop = ZPROP_INVAL;
+   zpool_prop_t prop = ZPOOL_PROP_INVAL;
zfs_prop_t fprop;
nvlist_t *proplist;
const char *normnm;
@@ -431,7 +431,7 @@ add_prop_list(const char *propname, char *propval, nvlist_t 
**props,
if (poolprop) {
const char *vname = zpool_prop_to_name(ZPOOL_PROP_VERSION);

-   if ((prop = zpool_name_to_prop(propname)) == ZPROP_INVAL &&
+   if ((prop = zpool_name_to_prop(propname)) == ZPOOL_PROP_INVAL &&
!zpool_prop_feature(propname)) {
(void) fprintf(stderr, gettext("property '%s' is "
"not a valid pool property\n"), propname);


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/466#issuecomment-358802546
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T976ed59e1bf957fd-Mbc8b052cc7c3e723f7ae6cc2
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 0000 a number of light-weight extensions to libzfs_core (#508)

2018-01-18 Thread Andrew Stormont
andy-js approved this pull request.

This looks good to me, and in the spirit of libzfs_core.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/508#pullrequestreview-89831235
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T94e916bc5cb9e1ed-M9033b993505a21260cde44a9
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8962 zdb should work on non-idle pools (#520)

2018-01-18 Thread Andrew Stormont
andy-js approved this pull request.

LGTM.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/520#pullrequestreview-89814560
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tebb45b7c81c7f050-Mdff88017f2e3b7b09ab22ca2
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2018-01-09 Thread Andrew Stormont
Gordon had some concerns about the cred stuff but I'm not so sure.  What I 
would like to do - if he's happy - is go ahead and revisit that in a separate 
change.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-356417544
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M703b45a09e85cc217b14d507
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8898 creating fs with checksum=skein on the boot pools fails ungracefully (#502)

2017-12-06 Thread Andrew Stormont
andy-js approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/502#pullrequestreview-81496701
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T4cfcbfa6ec8aac94-M2ef56f3b8a73c5e1d30551ce
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8897 zpool online -e fails assertion when run on non-leaf vdevs (#501)

2017-12-06 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -2425,6 +2425,7 @@ zpool_vdev_online(zpool_handle_t *zhp, const char 
> *path, int flags,
 {
zfs_cmd_t zc = { 0 };
char msg[1024];
+   char *pathname = NULL;

Is it necessary to initialise pathname in this case?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/501#pullrequestreview-81495135
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T5be0d3fb2ad9ab5c-Mc027ccd4f430c7a4e9ec964f
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-05 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -52,6 +53,34 @@ crgetuid(const cred_t *cr)
return (0);
 }
 
+/*ARGSUSED*/

If we could add the missing functionality and make all consumers happy I'd 
rather do that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154954932
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M8ff8beb9f39dab07309890d0
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-05 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -0,0 +1,68 @@
+/*

I don't think so.  I don't see these functions defined there, anyway.  And 
besides, there's already some cred stuff in libfakekernel.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154954671
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-Mb93e77f072c7c6cc5d8c6d45
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-05 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -65,6 +67,29 @@ kmem_zalloc(size_t size, int kmflags)
return (umem_zalloc(size, kmem2umem_flags(kmflags)));
 }
 
+/*

Will do.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154935897
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-Maac2262641b297fd3ad7d396
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-05 Thread Andrew Stormont
andy-js commented on this pull request.



> + *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ * Copyright 2017 RackTop Systems.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+

I'm not sure, but if there's any question about it perhaps we don't need to 
move it out right now.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154931436
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M1f880d6a210a4a774d95890a
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-03 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -69,6 +117,32 @@ delay(clock_t ticks)
(void) poll(0, 0, msec);
 }
 
+int
+issig(int why)
+{
+   return (0);
+}
+
+/* ARGSUSED */

Sure.  This sounds good to me.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154522318
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-Me54312d7ac6dc6313af580e8
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-03 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -0,0 +1,80 @@
+/*

Some of the print functions have different prototypes (kernel versions are 
void, user space versions return number of characters printed) and this causes 
the compiler to generate an error.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r154522247
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M8ab028a28edf69b0e655e273
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-12-02 Thread Andrew Stormont
The lint and test errors have now been fixed.  If I could get another review or 
two that'd be great.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-348701614
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-Mf31b32e112766766484afb69
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-11-28 Thread Andrew Stormont
Looks like the build failure was unrelated to my changes.  I see:
"could not determine the workspace used to perform the build"

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-347681454
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M4f608548efd4b6504b2d3707
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-11-28 Thread Andrew Stormont
@zettabot go

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-347562830
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-Mf6bd133adaa01f7cc41c86e9
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-11-28 Thread Andrew Stormont
Thanks.  I think I see what's going on.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-347561219
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M6fc76d506d8bd99f3e1ab752
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8809 libzpool should leverage work done in libfakekernel (#494)

2017-11-28 Thread Andrew Stormont
Looks like some of the import tests failed.  I'm not sure why because they PASS 
on my VM.

Is there any way I can get a look at those result files?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-347545500
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T34088d4e3e9cd4f5-M354f8339940723f5caa2b699
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (take 2) (#494)

2017-11-15 Thread Andrew Stormont
Yeah I think I agree.  I will split the parallel stuff out into a separate 
change.  To make lint happy we might need to breakout 'ifdef lint'.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-344734389
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T65a1e2af407fe4b4-M42a61d712368cae88e45c08c
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (take 2) (#494)

2017-11-15 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -94,6 +95,7 @@ int zfs_vdev_async_read_max_active;
 
 static const char cmdname[] = "zdb";
 uint8_t dump_opt[256];
+extern int aok;

I am going to say that that's bogus.  Either that or we aren't linking in libc 
(which provides aok) which building the lint library, but that seems unlikely.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r151211236
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T65a1e2af407fe4b4-Md76a599626ec6cceadce4d5a
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (take 2) (#494)

2017-11-15 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -94,6 +95,7 @@ int zfs_vdev_async_read_max_active;
 
 static const char cmdname[] = "zdb";
 uint8_t dump_opt[256];
+extern int aok;

Just out of curiosity... what was the lint error?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#discussion_r151196407
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T65a1e2af407fe4b4-M41fa4cb7b65d18a369cf68e7
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (take 2) (#494)

2017-11-06 Thread Andrew Stormont
Not sure why this failed to build.  It's building fine on my OmniOS VM.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/494#issuecomment-342238703
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T65a1e2af407fe4b4-Mc290ca1e287328a9980a9ae5
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-11-06 Thread Andrew Stormont
I spent the weekend reworking libzpool to use libfakekernel.  Here's a summary 
of the changes:

- libzpool is now built in fake-kernel context and uses the taskq API in 
libfakekernel.  Most of the defines in zfs_context.h have been dropped in 
favour of included system header files.

- libfakekernel now provides implementations of many of the functions that were 
previously being compiled into libzpool (see kernel.c).

- mutex_enter/mutex_exit were renamed to kmutex_enter/kmutex_exit to avoid 
references binding again the versions in libc, which is early testing broke the 
boot.

- libzfs is now built in fake-kernel context and uses the taskq API in 
libfakekernel.  It was also changed to use the kernel mutex/condition API to 
match libzpool.

- zdb, zinject, zhack, ztest all builds in fake-kernel context as well, since 
they are using zfs_context.h from libzpool and compiling in chunks of zfs 
kernel code.

- various system headers were modified to expose more types/prototypes when 
_FAKE_KERNEL is defined, along with some missing includes being added to them.

I want to stress that this is work in progress.  I did make some pthread 
related changes which I think were a mistake, I'm going to clean that up before 
submitting this for a formal review.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-342123719
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M56afaad0c2e4cdda370eaae6
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-11-01 Thread Andrew Stormont
Sounds good to me.  I'll look at updating libzpool to use libfakekernel.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-341067822
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M889839857dbd1ea2f42c7f72
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8607 zfs: variable set but not used (#487)

2017-10-31 Thread Andrew Stormont
andy-js approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/487#pullrequestreview-73350731
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Ta708fb5dd9ee65e6-Ma6aba32575ebb775b4cd1fc2
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-10-25 Thread Andrew Stormont
Well that depends on whether or not they're pulling in both libzfs and 
libzpool.  From what I can see most things (like the zfs and zpool commands) 
only pull in libzfs, so they should be okay.

I have no problem with changing libzpool to use libfakekernel.  I chose not to 
go down that route simply because I wanted to keep the diff small, but I think 
it's probably the right thing to do.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-339452066
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M86515da545feb84ce7796e39
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-10-25 Thread Andrew Stormont
I took at stab at updating the changeset to use libfakekernel instead:
http://cr.illumos.org/~webrev/andy_js/8115/

Apart from some weirdness with sys/cmn_err.h conflicting with stdio.h it was 
straightforward.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-339273640
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-Ma85b96a9e409e6f3ee2ff7b9
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-10-24 Thread Andrew Stormont
@prakashsurya Do you think it would make sense to split the changes to the VFS 
code out into a separate issue?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-338986535
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M0598a4b5aec45c7f7434672f
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 7149 move libzpool's taskq library into libcmdutils (#141)

2017-10-23 Thread Andrew Stormont
I think it makes sense to decouple this from #451 and change the name to 
something like "libzfs should use taskq in libfakekernel".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/141#issuecomment-338808451
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T012acd019d09e76d-Mbf1bc0780ae3d51e264eb411
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 7149 move libzpool's taskq library into libcmdutils (#141)

2017-10-23 Thread Andrew Stormont
Having libzpool use libfakekernel seems like the right answer to me.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/141#issuecomment-338625995
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T012acd019d09e76d-M3cc968cae5e611ee8f6a51cb
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 7149 move libzpool's taskq library into libcmdutils (#141)

2017-10-19 Thread Andrew Stormont
That sounds like a good idea.  libcmdutils is becoming a bucket for everything.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/141#issuecomment-338036480
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T012acd019d09e76d-M55e62b27be637b2d62fd3a8a
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 7149 move libzpool's taskq library into libcmdutils (#141)

2017-10-19 Thread Andrew Stormont
I think it's time to reopen this.  The problem was addressed in #359 by giving 
the user space implementation a different name (utaskq).  Apart from a minor 
omission the changes look good.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/141#issuecomment-337964828
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T012acd019d09e76d-M90d914e09660ec7f349da544
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-10-01 Thread Andrew Stormont
You forgot to add a mapping for taskqid_t to sys/zfs_context.h.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-68160
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M52cea0cc7edafe259a23d038
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8115 parallel zfs mount (#451)

2017-09-29 Thread Andrew Stormont
Looks like the build failed because of a network issue.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/451#issuecomment-333242633
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-Mcd0d67a4e49fbeaa0351f904
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8604 Avoid unnecessary search in VFS when unmounting snapshots (#459)

2017-09-02 Thread Andrew Stormont
andy-js approved this pull request.

LGTM.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/459#pullrequestreview-60271942
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T4acb357c5e107526-Mdb38ec9d55797e34c04cfee4
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8567 Inconsistent return value in zpool_read_label (#442)

2017-08-07 Thread Andrew Stormont
Perhaps zpool_read_label should just return an errno?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/442#issuecomment-320784745
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T166e42f6e2808c99-M3f7a145a882ca68e87984a84
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8473 scrub does not detect errors on active spares (#422)

2017-07-28 Thread Andrew Stormont
LGTM.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/422#issuecomment-318613316
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Te100c9e22da2b1d8-M4c7ee9aa4b7aa5c033d84140
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-06-08 Thread Andrew Stormont
andy-js commented on this pull request.



if (ret != 0) {
-   int save_errno = errno;

I'm not sure how that happened.  I did a build before pushing and it appeared 
to complete successfully.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r120992848
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-M133b15a0ee9fd050d12bfc0f
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-30 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -3628,8 +3629,7 @@ int
 zfs_promote(zfs_handle_t *zhp)
 {
libzfs_handle_t *hdl = zhp->zfs_hdl;
-   zfs_cmd_t zc = { 0 };
-   char parent[MAXPATHLEN];
+   char snapname[MAXPATHLEN];

Fixed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r119223718
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-M4a4383429cb605fa9cbaaf35
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-30 Thread Andrew Stormont
andy-js commented on this pull request.



> +lzc_promote(const char *fsname, char *snapnamebuf, int snapnamelen)
+{
+   /*
+* The promote ioctl is still legacy, so we need to construct our
+* own zfs_cmd_t rather than using lzc_ioctl().
+*/
+   zfs_cmd_t zc = { 0 };
+
+   ASSERT3S(g_refcount, >, 0);
+   VERIFY3S(g_fd, !=, -1);
+
+   (void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_name));
+   if (ioctl(g_fd, ZFS_IOC_PROMOTE, ) != 0) {
+   if (errno == EEXIST && snapnamebuf != NULL)
+   (void) strlcpy(snapnamebuf, zc.zc_string, snapnamelen);
+   return (errno);

I updated the code anyway just in case I'm wrong or the strlcpy function ever 
changes.  Since it's not part of the standard that might well be possible.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r119223489
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-Ma6c748b7eb376cad7cc737f8
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-30 Thread Andrew Stormont
andy-js commented on this pull request.



> +lzc_promote(const char *fsname, char *snapnamebuf, int snapnamelen)
+{
+   /*
+* The promote ioctl is still legacy, so we need to construct our
+* own zfs_cmd_t rather than using lzc_ioctl().
+*/
+   zfs_cmd_t zc = { 0 };
+
+   ASSERT3S(g_refcount, >, 0);
+   VERIFY3S(g_fd, !=, -1);
+
+   (void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_name));
+   if (ioctl(g_fd, ZFS_IOC_PROMOTE, ) != 0) {
+   if (errno == EEXIST && snapnamebuf != NULL)
+   (void) strlcpy(snapnamebuf, zc.zc_string, snapnamelen);
+   return (errno);

To the best of my knowledge strlcpy does not set errno.  I looked at the source 
for it in libc and neither it, nor memcpy (which does the actual copy) set it.  
It should be safe.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r119199155
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-Meea79a6a9d7244f13434a178
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-30 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -3628,8 +3629,7 @@ int
 zfs_promote(zfs_handle_t *zhp)
 {
libzfs_handle_t *hdl = zhp->zfs_hdl;
-   zfs_cmd_t zc = { 0 };
-   char parent[MAXPATHLEN];
+   char snapname[MAXPATHLEN];

Yeah it probably should.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r119198115
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-M9c88010e7e8fcbad677899c5
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8108 zdb -l fails to read labels 2 and 3 (#358)

2017-05-30 Thread Andrew Stormont
andy-js commented on this pull request.



> @@ -2301,11 +2301,18 @@ dump_label(const char *dev)
 
(void) snprintf(path, sizeof (path), "%s%s", ZFS_RDISK_ROOTD,
dev);
-   if ((s = strrchr(dev, 's')) == NULL || !isdigit(*(s + 1)))
+   if (((s = strrchr(dev, 's')) == NULL &&
+   (s = strchr(dev, 'p')) == NULL) ||
+   !isdigit(*(s + 1)))
(void) strlcat(path, "s0", sizeof (path));

I'm not entirely sure what this fixes.  It seems to me that it would prevent 
"s0" from being appended to fdisk partitions, which would just fail anyway.  
Why not also check for ":" which is used by lofi then?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/358#discussion_r119158036
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T4f00e82271f6ca5e-M71ac2cd95ed192bd72cffc3c
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-30 Thread Andrew Stormont
@ahrens How does this version look?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#issuecomment-304845578
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-M5ce2e53350c695a7a6084c9b
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (#387)

2017-05-28 Thread Andrew Stormont
Thanks for the review Andriy.

Please see #389 which is rebased on the latest mater branch.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/387#issuecomment-304505488
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T1c0071ce4e946bb0-M9a65eec18e7f6d00e31e5026
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (#387)

2017-05-28 Thread Andrew Stormont
Closed #387.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/387#event-1100136649
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T1c0071ce4e946bb0-Md1f95cbb1e1ea9758026bbd9
Powered by Topicbox: https://topicbox.com


[developer] [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (rebase) (#389)

2017-05-28 Thread Andrew Stormont

You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/389

-- Commit Summary --

  * 8264 want support for promoting datasets in libzfs_core

-- File Changes --

M usr/src/lib/libzfs/common/libzfs_dataset.c (14)
M usr/src/lib/libzfs_core/common/libzfs_core.c (24)
M usr/src/lib/libzfs_core/common/libzfs_core.h (2)
M usr/src/lib/libzfs_core/common/mapfile-vers (2)
M usr/src/uts/common/fs/zfs/zfs_ioctl.c (39)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/389.patch
https://github.com/openzfs/openzfs/pull/389.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389

--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-Mac76fb30acc4545582972fe3
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (#385)

2017-05-27 Thread Andrew Stormont
Closing this.  Please see #387

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/385#issuecomment-304476981
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb321381674e0be00-M2ed658a2918f13685b73526d
Powered by Topicbox: https://topicbox.com


[developer] [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (#387)

2017-05-27 Thread Andrew Stormont

You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/387

-- Commit Summary --

  * 8264 want support for promoting datasets in libzfs_core

-- File Changes --

M usr/src/lib/libzfs/common/libzfs_dataset.c (14)
M usr/src/lib/libzfs_core/common/libzfs_core.c (24)
M usr/src/lib/libzfs_core/common/libzfs_core.h (2)
M usr/src/lib/libzfs_core/common/mapfile-vers (2)
M usr/src/uts/common/fs/zfs/zfs_ioctl.c (39)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/387.patch
https://github.com/openzfs/openzfs/pull/387.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/387

--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T1c0071ce4e946bb0-M8df3a82f45fd60a2a5619b49
Powered by Topicbox: https://topicbox.com


[developer] Re: [openzfs/openzfs] 8264 want support for promoting datasets in libzfs_core (#385)

2017-05-27 Thread Andrew Stormont
Closed #385.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/385#event-116149
--
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Tb321381674e0be00-M12c9b5b84b80f3fb727f3ad2
Powered by Topicbox: https://topicbox.com