From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9l7W-0000BN-2y for barebox@lists.infradead.org; Thu, 05 Mar 2020 07:40:40 +0000 From: Ahmad Fatoum Date: Thu, 5 Mar 2020 08:40:31 +0100 Message-Id: <20200305074032.29725-2-a.fatoum@pengutronix.de> In-Reply-To: <20200305074032.29725-1-a.fatoum@pengutronix.de> References: <20200305074032.29725-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/2] state: backend_storage: deal gracefully with runtime bucket corruption To: barebox@lists.infradead.org Cc: =?UTF-8?q?Enrico=20J=C3=B6rns?= , Ahmad Fatoum Q29ycnVwdGluZyBhbiBhbHJlYWR5IHNlbGVjdGVkIGJ1Y2tldCBhbmQgdGhlbiByZWFkaW5nIGl0 IGFnYWluIHdpbGwKY3Jhc2ggYmFyZWJveCB3aGVuIGl0IGF0dGVtcHRzIHRoZSByZWZyZXNoOgoK ICBiYXJlYm94JCBzdGF0ZSAtbAogIGJhcmVib3gkIG13IC1kIC9kZXYvZWVwcm9tMC5zdGF0ZSAw IDB4NDIKICBiYXJlYm94JCBzdGF0ZSAtbAogIEVSUk9SOiBzdGF0ZTogTm8gbWV0YSBkYXRhIGhl YWRlciBmb3VuZAogIHN0YXRlOiBVc2luZyBidWNrZXQgMUAweDAwMDAwMDQwCiAgdW5hYmxlIHRv IGhhbmRsZSBOVUxMIHBvaW50ZXIgZGVyZWZlcmVuY2UgYXQgYWRkcmVzcyAweDAwMDAwMDAwCiAg cGMgOiBbPDRmZTRmMWVhPl0gICAgbHIgOiBbPDRmZTB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