[pbs-devel] [PATCH proxmox-backup v2 1/2] fix #5439: allow to reuse existing datastore
Gabriel Goller
g.goller at proxmox.com
Thu Jul 18 14:18:47 CEST 2024
>>
>> Ooh, I think I got it...
>> So basically we could just call `ChunkStore::verify_chunkstore` in
>> `ChunkStore::open` and drop the `open` call above, right?
>
>no, what I meant is:
>
>in open, split out the checks there (that base is absolute, and that the
>chunk dir is accessible) into a new helper fn. then call that new helper
>fn in open (so that the behaviour of open stays the same).
>
>then, also call this helper in your patch here - it doesn't really give
>much extra benefit atm, but it makes it less easy to miss that this
>should be done in both places when adding new checks.
>
>I don't think we want to do the full verification on each open, but when
>creating a datastore config entry with an existing datastore, we want to
>do both the extensive checks and those we'd do when opening it.
>
>of course another option would be to have a single helper, and a
>parameter that controls whether the extensive checks should be done or
>not. even harder to miss that there are two related sets of checks then
>;)
>
Got it! Didn't have my coffee yet, sorry about that :)
Will submit a new version soon!
More information about the pbs-devel
mailing list