Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9596934ybi; Wed, 10 Jul 2019 13:11:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3KQ79A/Z3YSGX2QTG22ihDuXw7/tKZ/+ihNqtF+jsdJEQ6UGvgrVbHjrsI6YoOGMZodEx X-Received: by 2002:a17:90a:d3d4:: with SMTP id d20mr231452pjw.28.1562789496293; Wed, 10 Jul 2019 13:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562789496; cv=none; d=google.com; s=arc-20160816; b=DpIEPz4S86HjL1gUNgLKdW7cYsFqDGi6EYj0LMB3nqk0H+DzPmkB7TJqWQE4+oJGOv ZITr2/5lmcyG+D4C4sqVKbRwdSfE4UMkVbQbjfKhCneD++/KLAlgOaZF7QD9X1Do8OMt nFie3RRE9ZDPcLKToU+w36HnT4KGq+Nt4KHuGl8NErhk3Ky4JypbavS2f+kuVUGyS5Cu cNyEfkS0fq+J9azcsGARkCFzZsgybZQZChVAwSk8c2HPpnuFLwxDy0wAtd5jB7/ZPNfF jw5yAm+9fhOh5pJFaaUCtD6HWjbJe98UtI2p1jhUryNs4wi5DC0ogSQ4AxDEQ4O1biIm wg7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xnCvlWqIHB0jHiV3dyLrVkDe0dM5JbxFMEGeCSV1cfw=; b=fMsScKSOGlkC1XCs6YFm4yJ9RMjf4BTAWSDQsN+AFiAzCF6rC5BSd5xBaXrwDSCASq Cpc/GHHfTujVXg2Q06nadno9d3Gh+4MwjOgJkP3laVBj7hkhlc01yY96veghQ7ME921i nK69iUhvRcasP/M5di+SgIfEDtchXKQQxuKiOuDRdSaR53ou1gGFnohroOFKvcIcO9nx QjXG5/u46jUeTZkRJm3/8QnEUH0uyKO+8LlTaoTaA2r10EOIH/iZt0yMP2epto1+J3lJ 8J06ATysDKC2VA+/5Br1GjQFBytJGAjfX/ARLEtdCsD19RKapZ+0uQJgVAyWVTMw4Psv NehQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=ZUjott6W; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cp2si2807432plb.437.2019.07.10.13.11.04; Wed, 10 Jul 2019 13:11:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=ZUjott6W; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727196AbfGJTc2 (ORCPT + 99 others); Wed, 10 Jul 2019 15:32:28 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37669 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbfGJTc2 (ORCPT ); Wed, 10 Jul 2019 15:32:28 -0400 Received: by mail-lj1-f196.google.com with SMTP id z28so3272159ljn.4 for ; Wed, 10 Jul 2019 12:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xnCvlWqIHB0jHiV3dyLrVkDe0dM5JbxFMEGeCSV1cfw=; b=ZUjott6WbHEJrXXgBYoLp5dTTfCo5WnwkiHZ7OQbHil815wAhCbtDe2JtJL6/t4Flr jNFqhi2mF/qcBbEl7b3nIXnhsbY8d1CDXTxS1etrLhsex59+q+ZWYxlApxPrFrvHwzpF RwE+5Rp6SyHn7QhZl+1KNdbtTRVH9pum7pKKCGNL24RaQCW22d6Ugk23/JKcijPDkrfv li+veqCNA9/SyLqB+iAWhuFyfEgP0ZHvghT++MvNECYzJvwpFNU2qKhyLnSvWIetfxt6 AXOc8S2HkX0u3/9Fd016jAjs0WK0SDg7kLv5LyeoWQ4uWvmGqxqAZAM7uUFlRfqf9q/o hfxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=xnCvlWqIHB0jHiV3dyLrVkDe0dM5JbxFMEGeCSV1cfw=; b=SPTa5C3FD5Mr2e0x9R5Heup30spfSEMIP3TQeueWF249s44Fm4YSKxf3EBvtND+8F8 XZYVa2aUcIbRXYDgWa4ufwbPTtF1weHhuixkn5PLEmqTzCZpRyFQ1OdysUGu50JQNrHr ZpRSPj0WNOJt1mpvcXEvyXDzC4rpUzxGDV2DdvnerF5eDXbFNBcbXEet89Gv2wkswX/S UfomFf8mTnjdXA+moBAADGyCiAbf3XpMgfUIZRr/f1zBbmHy09Wkl65wSCQCHijSXzzW GZaW1YY478AtKgrbtXo+MsRCaJtUCPOqqoH9EuRGMNqyV1DOZuI7WHZG/vBQsZAVSa/V 0ebQ== X-Gm-Message-State: APjAAAUt52ei/EB+CQbePPZMaXn1lcVDUsAKtp0s7lH5HVEkVcz0W4pW +q+EuLjvX/d8J9I6uCTWpQDzpw== X-Received: by 2002:a2e:9116:: with SMTP id m22mr18261369ljg.216.1562787146045; Wed, 10 Jul 2019 12:32:26 -0700 (PDT) Received: from kynes (apn-77-112-37-101.dynamic.gprs.plus.pl. [77.112.37.101]) by smtp.gmail.com with ESMTPSA id p12sm611940lja.23.2019.07.10.12.32.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2019 12:32:24 -0700 (PDT) Date: Wed, 10 Jul 2019 21:32:22 +0200 From: Michal Lowas-Rzechonek To: "Gix, Brian" Cc: "Stotland, Inga" , "linux-bluetooth@vger.kernel.org" , "jakub.witowski@silvair.com" Subject: Re: [PATCH BlueZ 6/9] mesh: Define storage format specific read/write routines Message-ID: <20190710193222.obsrzfjgnfmhps4e@kynes> Mail-Followup-To: "Gix, Brian" , "Stotland, Inga" , "linux-bluetooth@vger.kernel.org" , "jakub.witowski@silvair.com" References: <20190710050959.7321-1-inga.stotland@intel.com> <20190710050959.7321-7-inga.stotland@intel.com> <20190710075245.2koao3eyj22wbj7s@mlowasrzechonek2133> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Brian, On 07/10, Gix, Brian wrote: > > I don't like the assumption that each node is stored in a separate file, and there > > needs to be a backup file. > > I think I understand what you are saying about *How* the node data is > persevered, and that the underlying storage might not be a typical > file system. Precisely. > We *do* need a mechanism to get to an earlier version of a Node if > there is corruption detected in the most resent version (perhaps an > unexpected loss of power during a write operation). That is the > purpose of the current backup system. Whether this is accomplished by > reading a backup file or "Rolling Back" the history on a journal (or > git repo, or whatever) we do need that backup. Yes, I understand that. But, as you noticed, the rollback mechanism doesn't need to be a backup *file*. This is an implementation detail of a filesystem-backed JSON storage. I would even go as far as saying that we don't need a backup - we need atomicity and durability from ACID. Achieving that is non-trivial, but is still an implementation detail. > But we could certainly hide the mechanism of backing up (and of > reverting to a backed up version). Yes, this. -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND