storage/pkg/archive
Valentin Rothberg f58686dcce lockfile: implement reader-writer locks
Implement reader-writer locks to allow allow multiple readers to hold
the lock in parallel.

* The locks are still based on fcntl(2).

* Changing the lock from a reader to a writer and vice versa will block
  on the syscall.

* A writer lock can be held only by one process.  To protect against
  concurrent accesses by gourtines within the same process space, use a
  writer mutex.

* Extend the Locker interface with the `RLock()` method to acquire a
  reader lock.  If the lock is set to be read-only, all calls to
  `Lock()` will be redirected to `RLock()`.  A reader lock is only
  released via fcntl(2) when all gourtines within the same process space
  have unlocked it.  This is done via an internal counter which is
  protected (among other things) by an internal state mutex.

* Panic on violations of the lock protocol, namely when calling
  `Unlock()` on an unlocked lock.  This helps detecting violations in
  the code but also protects the storage from corruption.  Doing this
  has revealed some bugs fixed in ealier commits.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-15 09:49:44 +01:00
..
testdata Move archive package into pkg/archive 2014-09-29 23:23:36 -07:00
README.md Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
archive.go Move copytar functions from buildah to storage 2019-01-31 15:26:03 +00:00
archive_19.go pkg/archive: truncate ModTime when we'd otherwise round it 2018-12-06 13:50:38 -05:00
archive_110.go pkg/archive: truncate ModTime when we'd otherwise round it 2018-12-06 13:50:38 -05:00
archive_ffjson.go lockfile: implement reader-writer locks 2019-02-15 09:49:44 +01:00
archive_linux.go archive.Tar: don't trust the "trusted.overlay.opaque" xattr 2018-02-23 16:00:48 -05:00
archive_linux_test.go archive.Tar: don't trust the "trusted.overlay.opaque" xattr 2018-02-23 16:00:48 -05:00
archive_other.go archive.Tar: don't trust the "trusted.overlay.opaque" xattr 2018-02-23 16:00:48 -05:00
archive_test.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
archive_unix.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
archive_unix_test.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
archive_windows.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
archive_windows_test.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
changes.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_linux.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_other.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_posix_test.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_test.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_unix.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
changes_windows.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
copy.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
copy_unix.go Windows - make docker cp functional 2015-08-06 11:22:38 -07:00
copy_unix_test.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
copy_windows.go Windows - make docker cp functional 2015-08-06 11:22:38 -07:00
diff.go Support for per-container uid/gid mapping: lower 2018-04-03 10:34:32 -04:00
diff_test.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
example_changes.go Update deps to github.com/sirupsen/logrus v1.0.0 2017-08-01 07:25:56 -07:00
time_linux.go Move archive package into pkg/archive 2014-09-29 23:23:36 -07:00
time_unsupported.go Move archive package into pkg/archive 2014-09-29 23:23:36 -07:00
utils_test.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
whiteouts.go Fix typos found across repository 2015-12-13 18:04:12 +02:00
wrap.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00
wrap_test.go Update packages to match latest code in moby/pkg 2017-09-12 18:00:29 +00:00

README.md

This code provides helper functions for dealing with archive files.