From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [RFC storage] zfspoolplugin: check if mounted instead of imported
Date: Thu, 18 Feb 2021 14:37:17 +0100 [thread overview]
Message-ID: <6662cee7-5a58-03bc-4c7a-e37758720d86@proxmox.com> (raw)
In-Reply-To: <65ace04f-f5c6-9a35-f9a4-f6a266dd1601@proxmox.com>
On 18.02.21 14:34, Thomas Lamprecht wrote:
>>>> + if (!defined($dataset_mounted->())) {
>>> don't complicated boolean, drop the defined.
>> in that case the return value of $dataset_mounted->() is ternary:
> Then the more NAK'd for my taste, that method being ternary is IMO
> not nice and sensible.
>
> Please, make it boolean (in the perverse sense perl defines bool)
>
>> * undefined - error during `zfs get` -> we most likely need to import the
>> pool
And here I do not mean I do not want to have such a heuristic or the like,
but I'd like it a bit more explicit, as having defined but false and undefined
differ is always a bit a recipe for misuse (yeah it's a local closure so it
doesn't need to be held against the standards of a "public" method but still,
not ideal.
Maybe avoid the eval in the closure and handle the error explicit?
prev parent reply other threads:[~2021-02-18 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 11:33 Stoiko Ivanov
2021-02-18 12:20 ` Thomas Lamprecht
2021-02-18 13:15 ` Stoiko Ivanov
2021-02-18 13:34 ` Thomas Lamprecht
2021-02-18 13:37 ` Thomas Lamprecht [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6662cee7-5a58-03bc-4c7a-e37758720d86@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.ivanov@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox