From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0C64C433EF for ; Tue, 28 Sep 2021 10:17:25 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40A8460F21 for ; Tue, 28 Sep 2021 10:17:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 40A8460F21 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CFC3982EE0; Tue, 28 Sep 2021 12:17:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1632824243; bh=5ivn1pbHiIAkSQvwjJrkmv9EKYRuJSVt8TsKs/n/6Ic=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s056zb5DC23VV5ZI6IDL/9qQ3SvBhecAav47dqllJBnC0LDsYq5aKyxJ7kgOsaYZM 9UPxTaz0VKQO7PYyROeBR05VEXHX5XS1K85PxkE8L7dA0vxFdBQ8xyUcgduV296Jgp 9dhXbnQYBjqYwYSLhdCv5Nq3sdorVHvgL9a7sYk+YvbYrMOSaOX87PJzqETzkEbpe6 KgZIc4zeVDepslLvs+B+bJnypc/RMOTCGq90cI5zuSb1tYveJg9gJ+5r3Upo0XBbGb cZlfq89BwD+jwIl7HHv7xOqNZZCSfdV6VXiA+vy9brg0ctB9jctlT6EwDLn+KamIH6 9eA77QoOUnFfQ== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 9C69F80C68 for ; Tue, 28 Sep 2021 12:17:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1632824240; bh=5ivn1pbHiIAkSQvwjJrkmv9EKYRuJSVt8TsKs/n/6Ic=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=0DequokNMUwrksA+m+0wFOw/H6teDvEuk2R3TAWh2PnlNBl1IUU9vR5wsqVlv6gW9 DwZ4uCt0NSqEZBNuoI6oYrt/4mfz/y3iaclSHtZovMjcK22ZwRVr7kalFyHryAjur4 wcjUkygspqUXNUBtQg+gqjKiPJa7+LweABWYqR7UoY7fA1Wco2nh9S4CLq5VBiteIP bU58WvqsKFF18FSgbf+jphznkrCTgvL6LURb9ZlSJtR+Bhni1l0c3znJsAbVtCWco2 F6Yp6f7DKLX819BQxh8jlrYSi0fHXJEmREOuy+cq27jQe0qpH/mhEqllf91oT/0OgA df3oHbAIuV5xA== Received: by janitor.denx.de (Postfix, from userid 108) id 4C38EA0215; Tue, 28 Sep 2021 12:17:20 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id A5E5FA0040; Tue, 28 Sep 2021 12:17:12 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 3E6AD1E0F1B; Tue, 28 Sep 2021 12:17:12 +0200 (CEST) To: Ayoub Zaki cc: u-boot@lists.denx.de, hs@denx.de From: Wolfgang Denk Subject: Re: [PATCH v2] cmd: ubi: add a command to swap volumes MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <20210909115257.14147-1-ayoub.zaki@embexus.com> References: <20210909115257.14147-1-ayoub.zaki@embexus.com> Comments: In-reply-to Ayoub Zaki message dated "Thu, 09 Sep 2021 13:52:57 +0200." Date: Tue, 28 Sep 2021 12:17:12 +0200 Message-ID: <2309251.1632824232@gemini.denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Dear Ayoub, In message <20210909115257.14147-1-ayoub.zaki@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: wd@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.