iAlign some comments - dedup - deduplicating backup program Err bitreich.org 70 hgit clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ URL:git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ bitreich.org 70 1Log /scm/dedup/log.gph bitreich.org 70 1Files /scm/dedup/files.gph bitreich.org 70 1Refs /scm/dedup/refs.gph bitreich.org 70 1Tags /scm/dedup/tag bitreich.org 70 1README /scm/dedup/file/README.gph bitreich.org 70 1LICENSE /scm/dedup/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit ca0493fa7861e7fd5bcdc108d7f56c4109d09fae /scm/dedup/commit/ca0493fa7861e7fd5bcdc108d7f56c4109d09fae.gph bitreich.org 70 1parent d68ea46d747443f91d963fce511b5fbf46ad11aa /scm/dedup/commit/d68ea46d747443f91d963fce511b5fbf46ad11aa.gph bitreich.org 70 hAuthor: sin URL:mailto:sin@2f30.org bitreich.org 70 iDate: Wed, 8 May 2019 00:57:04 +0100 Err bitreich.org 70 i Err bitreich.org 70 iAlign some comments Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M bstorage.c | 28 ++++++++++++++-------------- Err bitreich.org 70 i M snap.c | 14 +++++++------- Err bitreich.org 70 i Err bitreich.org 70 i2 files changed, 21 insertions(+), 21 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/bstorage.c b/bstorage.c /scm/dedup/file/bstorage.c.gph bitreich.org 70 i@@ -82,30 +82,30 @@ static struct bops bops = { Err bitreich.org 70 i /* Block header structure */ Err bitreich.org 70 i struct bhdr { Err bitreich.org 70 i char magic[NBHDRMAGIC]; /* magic number for file(1) */ Err bitreich.org 70 i- uint64_t flags; /* version number, compression/encryption configuration */ Err bitreich.org 70 i- uint64_t nbd; /* number of block descriptors */ Err bitreich.org 70 i+ uint64_t flags; /* version number, compression/encryption configuration */ Err bitreich.org 70 i+ uint64_t nbd; /* number of block descriptors */ Err bitreich.org 70 i }; Err bitreich.org 70 i Err bitreich.org 70 i /* Block descriptor */ Err bitreich.org 70 i struct bd { Err bitreich.org 70 i- uint16_t type; /* BDTYPE */ Err bitreich.org 70 i- uint8_t reserved[6]; /* should be set to 0 when writing */ Err bitreich.org 70 i- uint64_t offset; /* block offset */ Err bitreich.org 70 i- uint64_t size; /* block size */ Err bitreich.org 70 i- uint64_t refcnt; /* reference count of block, 0 if block is removed */ Err bitreich.org 70 i+ uint16_t type; /* BDTYPE */ Err bitreich.org 70 i+ uint8_t reserved[6]; /* should be set to 0 when writing */ Err bitreich.org 70 i+ uint64_t offset; /* block offset */ Err bitreich.org 70 i+ uint64_t size; /* block size */ Err bitreich.org 70 i+ uint64_t refcnt; /* reference count of block, 0 if block is removed */ Err bitreich.org 70 i unsigned char md[MDSIZE]; /* hash of block */ Err bitreich.org 70 i- RB_ENTRY(bd) rbe; /* bdcache link node */ Err bitreich.org 70 i- SLIST_ENTRY(bd) sle; /* gchead link node */ Err bitreich.org 70 i+ RB_ENTRY(bd) rbe; /* bdcache link node */ Err bitreich.org 70 i+ SLIST_ENTRY(bd) sle; /* gchead link node */ Err bitreich.org 70 i }; Err bitreich.org 70 i RB_HEAD(bdcache, bd); Err bitreich.org 70 i- Err bitreich.org 70 i+ Err bitreich.org 70 i /* Storage layer context */ Err bitreich.org 70 i struct sctx { Err bitreich.org 70 i- struct bdcache bdcache; /* cache of block descriptors */ Err bitreich.org 70 i+ struct bdcache bdcache; /* cache of block descriptors */ Err bitreich.org 70 i SLIST_HEAD(gchead, bd) gchead; /* list of all blocks with a zero refcount */ Err bitreich.org 70 i- int fd; /* underlying storage file descriptor */ Err bitreich.org 70 i- int rdonly; /* when set to 1, the bssync() operation is a no-op */ Err bitreich.org 70 i- struct bhdr bhdr; /* block header */ Err bitreich.org 70 i+ int fd; /* underlying storage file descriptor */ Err bitreich.org 70 i+ int rdonly; /* when set to 1, the bssync() operation is a no-op */ Err bitreich.org 70 i+ struct bhdr bhdr; /* block header */ Err bitreich.org 70 i }; Err bitreich.org 70 i Err bitreich.org 70 i static int Err bitreich.org 70 1diff --git a/snap.c b/snap.c /scm/dedup/file/snap.c.gph bitreich.org 70 i@@ -37,11 +37,11 @@ extern int unpack(unsigned char *, char *, ...); Err bitreich.org 70 i Err bitreich.org 70 i /* Snapshot header structure */ Err bitreich.org 70 i struct shdr { Err bitreich.org 70 i- char magic[NSHDRMAGIC]; /* magic number for file(1) */ Err bitreich.org 70 i+ char magic[NSHDRMAGIC]; /* magic number for file(1) */ Err bitreich.org 70 i unsigned char nonce[crypto_aead_xchacha20poly1305_ietf_NPUBBYTES]; Err bitreich.org 70 i unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES]; Err bitreich.org 70 i- uint64_t flags; /* version number */ Err bitreich.org 70 i- uint64_t nbd; /* number of block hashes */ Err bitreich.org 70 i+ uint64_t flags; /* version number */ Err bitreich.org 70 i+ uint64_t nbd; /* number of block hashes */ Err bitreich.org 70 i }; Err bitreich.org 70 i Err bitreich.org 70 i struct mdnode { Err bitreich.org 70 i@@ -51,10 +51,10 @@ struct mdnode { Err bitreich.org 70 i Err bitreich.org 70 i struct sctx { Err bitreich.org 70 i TAILQ_HEAD(mdhead, mdnode) mdhead; /* list of hashes contained in snapshot */ Err bitreich.org 70 i- struct mdnode *mdnext; /* next hash to be returned via sget() */ Err bitreich.org 70 i- int fd; /* underlying snapshot file descriptor */ Err bitreich.org 70 i- int rdonly; /* when set to 1, the ssync() operation is a no-op */ Err bitreich.org 70 i- struct shdr shdr; /* snapshot header */ Err bitreich.org 70 i+ struct mdnode *mdnext; /* next hash to be returned via sget() */ Err bitreich.org 70 i+ int fd; /* underlying snapshot file descriptor */ Err bitreich.org 70 i+ int rdonly; /* when set, ssync() is a no-op */ Err bitreich.org 70 i+ struct shdr shdr; /* snapshot header */ Err bitreich.org 70 i }; Err bitreich.org 70 i Err bitreich.org 70 i static char errbuf[NERRBUF]; Err bitreich.org 70 .