-
Smithx10
Nice, I don't know how many folks are gonna try to do what I just did but is there a way to change the error from "Invalid Argument" to someone better or is that bhyve cli eatting the error
-
sommerfeld
A recurring problem at the syscall API is that you only have a limited number of ways for the kernel to say "nope" and you quickly run out of errno values that both fit the situation and are specific enough to tell you what's up.
-
iximeow
theoretically your ABI could reserve some bits for a "why" code alongside an error number, but then you're committing to specific error semantics and that's its own can of worms
-
Smithx10
makes sense.
-
jclulow
sommerfeld: It's remarkable how many of the errno values are just not generically applicable to the kinds of scenarios that actually arise haha
-
jclulow
Surprisingly frequent that EINVAL is the best we can do
-
jclulow
iximeow: Yeah, for new things we usually try to just ... have a new error code that isn't related to errno
-
jclulow
-
jclulow
-
jclulow
Which are extremely unhelpful in many debugging contexts haha
-
iximeow
jclulow: lol i have to admit if i saw something return EBADE i would seriously wonder if i had gone off the deep end
-
alanc
and of course the errnos that get shoved into places they don't quite fit, like ENOTTY for "You used a STREAMS ioctl on something that wasn't a stream" in very non-tty related contexts
-
jclulow
alanc: Indeed
-
jclulow
That one is at least a well-established practice
-
jclulow
And the strerror() text is "Inappropriate ioctl for device"
-
jclulow
ENOCSI No CSI structure available
-
jclulow
what even is a CSI structure!
-
jbk
and does it involve having to put on sunglasses while making a wry humorous comment?
-
twobitsahead
Would there be any other way to do it?
-
iprog4u
Why, oh why must my mind latch on to random acronym expansions? Caeser Salad Infrascructure? Computationally Savory Impala? Chronologically Sound Impressionism?
-
nikolam
I am on SmartOS and I want to add an ZFS dataset with files to the zone (native illumos or LX) but i am afraid I would loose and dataset would be deleted if I remove and delete that zone.
-
nikolam
I think it happened to me at least once.
-
nikolam
Can I safely aff dataset to the zone, via zonecfg or SmartOS vmadm and safely remove dataset from the zone so i won't loose data if zone itself is deleted ?
-
nahamu
nikolam: the only question is whether you need to be able to do zfs administrative commands from inside the zone. If not, the best thing to do is create a separate filesystem outside the zone and add it to the zone via lofs. That way it is not tied to the existence of the zone.
-
nahamu
Otherwise, if you need to do delegation, I think you can put holds in place on filesystems and zones to prevent accidental deletion and then you'd have to manually reparent the filesystem before destroying the zone.
-
nahamu
An example use case from me is I have a filesystem from my data pool that holds all my bandcamp music. I lofs mount it into a lx branded zone running mstream. I can recreate that zone without worrying about wiping out my media.
-
nikolam
nahamu, lofs it will be ;P
-
sommerfeld
lofs mounts into zones are very useful. realized earlier this week that I could skip socat for VNC console access by having bhyve put the VNC socket into a lofs-mounted filesystem that the VM's user can access
-
sommerfeld
bhyve creates the socket as owned by root, with only root able to write, but setting an inherited file acl on the directory lets other users access it..)
-
nikolam
sommerfeld, great to know :P
-
gitomat
[illumos-gate] 17248 asy_put() ASSERTs during reboot -- Patrick Mooney <pmooney⊙pc>
-
tsoome
-
fenix
→ GitHub commit d0aa9db: Use memset to zero stack allocations containing unions (committed)
-
richlowe
"padding" leaks?
-
richlowe
danmcd: a fun one for you
-
danmcd
The C standard language in the OpenZFS bug report is like... wow! What were they smoking?
-
tsoome
quite frankly, I had no idea:)
-
danmcd
(They == C standards people )
-
danmcd
"C99 6.7.8.17 says that when an undesignated initialiser is used, only the first element of a union is initialised. If the first element is not the largest within the union, how the remaining space is initialised is up to the compiler."
-
tsoome
accident waiting to happen.
-
danmcd
This is EXACTLY a rage-inducer with me. Was there a problem they were solving by this language? Apart from "piss off danmcd" ?
-
richlowe
that's our C
-
danmcd
Good catch @tsoome
-
rmustacc
This isn't different from padding in structs and why C23 added new syntax and related.
-
danmcd
(Well, that doesn't eliminate "piss of danmcd" but it DOES make a slight bit more sense...)
-
rmustacc
Well, a bunch of this came that way from New Jersey probably, so.
-
danmcd
Eeesh.
-
rmustacc
I can't tell you not to get mad, but it's also why I tell folks to always use bzero/memset on anything going out via DMA and related.
-
rmustacc
Or anything that goes out to userland.
-
rmustacc
C23 adds syntax of '= {}' which I expect will get around this gotcha.
-
tsoome
makes sense a lot.
-
danmcd
Had I followed the Don Hausen plan for DST in the US, I'd have already been gone, but now I'm kinda glad I wasn't.
-
danmcd
And good for C23.
-
danmcd
Outa here!
-
danmcd
-
Woodstock
that's a great plan