public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH pxar/backup 0/6] bump timestamps to 96 bit
@ 2020-07-28 10:33 Wolfgang Bumiller
  2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 1/6] add format description to format module Wolfgang Bumiller
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Wolfgang Bumiller @ 2020-07-28 10:33 UTC (permalink / raw)
  To: pbs-devel

So apparently modification time values of *before* Jan 1 1970 are a
thing, so here's support for that...

This bumps the `Entry` struct in pxar (meaning an API bump), and still
supports reading old archives.

Note that I've introduced a new `StatxTimestamp` struct. I chose this
name as the `statx(2)` manpage's `struct statx_timestamp` is the only
struct which actually documents the fact that only the seconds are
signed, and the nanoseconds are *positive* and *relative* to the
seconds, iow. a timestamp of "-3.5 seconds" is represented as "-4
seconds, plus 500_000_000 nanoseconds". (The only other time I found
this to be explicitly mentioned is in the `chrono` crate's
`TimeZone::timestamp` method which explicitly creates a "DateTime from
the number of non-leap seconds since (...) 1970 (...) and the number of
nanoseconds since the last whole non-leap second.".

Wolfgang Bumiller (6):
 pxar:
  add format description to format module
  introduce StatxTimestamp helper type
  update mk-format-hashes for a new ENTRY
  implement Entry v2
  add entry v1 compatiblity test
  bump version to 0.3.0-1

 Cargo.toml                   |   2 +-
 debian/changelog             |   8 ++
 examples/mk-format-hashes.rs |  11 ++-
 src/decoder/mod.rs           |  21 +++-
 src/errors.rs                |  25 -----
 src/format/mod.rs            | 179 ++++++++++++++++++++++++++++++++---
 src/lib.rs                   |  28 +++---
 tests/compat.rs              | 136 ++++++++++++++++++++++++++
 8 files changed, 353 insertions(+), 57 deletions(-)
 delete mode 100644 src/errors.rs
 create mode 100644 tests/compat.rs

 backup:
  update to pxar 0.3 to support negative timestamps

-- 
2.20.1





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-07-29  6:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 10:33 [pbs-devel] [PATCH pxar/backup 0/6] bump timestamps to 96 bit Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 1/6] add format description to format module Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH backup] update to pxar 0.3 to support negative timestamps Wolfgang Bumiller
2020-07-29  6:32   ` [pbs-devel] applied: " Dietmar Maurer
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 2/6] introduce StatxTimestamp helper type Wolfgang Bumiller
2020-07-28 14:05   ` [pbs-devel] [PATCH pxar v2 " Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 3/6] update mk-format-hashes for a new ENTRY Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 4/6] implement Entry v2 Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 5/6] add entry v1 compatiblity test Wolfgang Bumiller
2020-07-28 10:33 ` [pbs-devel] [PATCH pxar 6/6] bump version to 0.3.0-1 Wolfgang Bumiller
2020-07-29  6:14 ` [pbs-devel] applied: [PATCH pxar/backup 0/6] bump timestamps to 96 bit Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal