[pve-devel] [PATCH storage 1/2] don't bail on whitespaces in backing devices
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Apr 30 11:23:51 CEST 2024
On Tue, Apr 30, 2024 at 11:13:02AM +0200, Fiona Ebner wrote:
> Am 30.04.24 um 10:38 schrieb Wolfgang Bumiller:
> > On Tue, Apr 30, 2024 at 10:14:13AM +0200, Fiona Ebner wrote:
> >>
> >> So the returned $parent will now just be undef if it contains
> >> whitespaces, even though there is a parent. Can't that cause issues
> >> further down the line? If it's fine, a comment with the rationale would
> >> be nice.
> >>
> >> Or should we rather allow whitespaces while matching and return it
> >> properly? Or are there any issues with proper escaping then?
> >
> > I was a bit too quick on the send trigger there, but it should be fine
> > IMO:
> >
> > - where we do run into this issue, we never use/need/care about the parent
>
> Maybe this part of the function could be guarded by wantarray already,
> so callers caring only about the size don't even get there? But I
> suppose we do notice other unexpected things earlier by always doing the
> additional checks, so maybe it's better like it is right now.
Unfortunately a lot of callers do also care about the format,
specifically the import code, where this causes issues, so a `wantarray`
check won't help there.
More information about the pve-devel
mailing list