From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1757566AFD for ; Tue, 28 Jul 2020 12:33:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1500D237B8 for ; Tue, 28 Jul 2020 12:33:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 1FDC6237A0 for ; Tue, 28 Jul 2020 12:33:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DF56D433C1 for ; Tue, 28 Jul 2020 12:33:25 +0200 (CEST) From: Wolfgang Bumiller To: pbs-devel@lists.proxmox.com Date: Tue, 28 Jul 2020 12:33:15 +0200 Message-Id: <20200728103321.16843-2-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200728103321.16843-1-w.bumiller@proxmox.com> References: <20200728103321.16843-1-w.bumiller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mod.rs] Subject: [pbs-devel] [PATCH pxar 1/6] add format description to format module X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 10:33:27 -0000 Signed-off-by: Wolfgang Bumiller --- src/format/mod.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/format/mod.rs b/src/format/mod.rs index 2a7d377..0f9db79 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -4,6 +4,36 @@ //! //! The Archive contains a list of items. Each item starts with a `Header`, followed by the //! item data. +//! +//! An archive contains items in the following order: +//! * `ENTRY` -- containing general stat() data and related bits +//! * `XATTR` -- one extended attribute +//! * ... -- more of these when there are multiple defined +//! * `ACL_USER` -- one `USER ACL` entry +//! * ... -- more of these when there are multiple defined +//! * `ACL_GROUP` -- one `GROUP ACL` entry +//! * ... -- more of these when there are multiple defined +//! * `ACL_GROUP_OBJ` -- The `ACL_GROUP_OBJ` +//! * `ACL_DEFAULT` -- The various default ACL fields if there's one defined +//! * `ACL_DEFAULT_USER` -- one USER ACL entry +//! * ... -- more of these when multiple are defined +//! * `ACL_DEFAULT_GROUP` -- one GROUP ACL entry +//! * ... -- more of these when multiple are defined +//! * `FCAPS` -- file capability in Linux disk format +//! * `QUOTA_PROJECT_ID` -- the ext4/xfs quota project ID +//! * `PAYLOAD` -- file contents, if it is one +//! * `SYMLINK` -- symlink target, if it is one +//! * `DEVICE` -- device major/minor, if it is a block/char device +//! +//! If we are serializing a directory, then this is followed by: +//! +//! * `FILENAME` -- name of the first directory entry (strictly ordered!) +//! * `` -- serialization of the first directory entry's metadata and contents, +//! following the exact same archive format +//! * `FILENAME` -- name of the second directory entry (strictly ordered!) +//! * `` -- serialization of the second directory entry +//! * ... +//! * `GOODBYE` -- lookup table at the end of a list of directory entries use std::cmp::Ordering; use std::ffi::{CStr, OsStr}; -- 2.20.1