all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Friedrich Weber <f.weber@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v2 container] lxc start: warn in case of conflicting lxc.idmap entries
Date: Fri, 12 May 2023 11:58:24 +0200	[thread overview]
Message-ID: <0552f5c8-fa63-7ae0-befd-0d727767b3c0@proxmox.com> (raw)
In-Reply-To: <20230512091951.gmiysuv6bdm2wpbp@fwblub>

Thanks for the review!

On 12/05/2023 11:19, Wolfgang Bumiller wrote:
>>     So to report *all* conflicts, we'd need an algorithm that keeps track
>>     of all currently active intervals while iterating. I'm open for
> 
> ^ Only the end really.

I think you're right, we only need to track the endpoints of all
currently active intervals.

>>     implementing this, but in my opinion, the algorithm in this patch is
>>     good enough to be helpful, and since it's nicer to keep things simple,
>>     I'd keep that one. What do you think?
> 
> Yeah, given that we don't know the user's actual intention anyway, this
> really doesn't matter and the current implementation is fine.

Sounds good!

>> +sub validate_id_maps {
>> +    my ($id_map) = @_;
>> +
>> +    # $mappings->{$type}{$side} = [ { line => $line, start => $start, count => $count }, ... ]
> 
> ^ we always use arrows there: {$type}->{$side}
> 
> Basically, we always strictly separate with arrows. Old code might have
> some mixed prefix-derefs, but there shouldn't be any code using
> consecutive `{x}{y}` style dereferencing.

Makes sense. I'll send a v3 to rewrite all {x}{y} to {x}->{y}.





      reply	other threads:[~2023-05-12  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 15:05 Friedrich Weber
2023-05-12  9:19 ` Wolfgang Bumiller
2023-05-12  9:58   ` Friedrich Weber [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=0552f5c8-fa63-7ae0-befd-0d727767b3c0@proxmox.com \
    --to=f.weber@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=w.bumiller@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal