Re: [PATCH v2] cmd: ubi: add a command to swap volumes

2021-09-28 Thread Wolfgang Denk
Dear Ayoub,

In message <20210909115257.14147-1-ayoub.z...@embexus.com> you wrote:
> This commit adds the command ubi swap to swap an ubi volumes.
> The format of the command is: ubi swap  .
> To enable this command, the option CMD_UBI_SWAPVOL must be selected.

May I ask what this command is good for, i. e. what is the intended
use case?

I have the feeling that you might want to do something which
requires an atomic operation, but you should be aware that the
implementation is NOT atomic - even worse: in case of problems there
is not even a way to fall back to the old state.

So if you think to use this for example for reliable software
updates, then you have a big problem here.

Or am I missing something?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Niklaus Wirth has lamented that, whereas Europeans pronounce his name
correctly  (Ni-klows  Virt),  Americans  invariably  mangle  it  into
(Nick-les  Worth).  Which  is to say that Europeans call him by name,
but Americans call him by value.


Re: [PATCH v2] cmd: ubi: add a command to swap volumes

2021-09-28 Thread Heiko Schocher
Hello Ayoub,

On 09.09.21 13:52, Ayoub Zaki wrote:
> This commit adds the command ubi swap to swap an ubi volumes.
> The format of the command is: ubi swap  .
> To enable this command, the option CMD_UBI_SWAPVOL must be selected.
> ---
>  cmd/Kconfig |  8 
>  cmd/ubi.c   | 54 +
>  2 files changed, 62 insertions(+)

Could you please add a Signed-off-by line?

And please add in further patches a change log [1], may you want
to use patman u-boot:/tools/patman/README

Thanks!

bye,
Heiko
[1] https://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
-- 
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: h...@denx.de