lib/commit: Refactor file commits to separate subdir from content
authorColin Walters <walters@verbum.org>
Tue, 5 Dec 2017 21:33:31 +0000 (16:33 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 7 Dec 2017 19:49:23 +0000 (19:49 +0000)
commit9bb59511ae70b325d6d693f64bda976aed19e2e1
treea97435198cf73055d391fd2a5992dcba8c27e670
parente108bef816de0c3cecf0186eb557f20ce0db3580
lib/commit: Refactor file commits to separate subdir from content

One major thing we can do to speed up local commits is multithreading. In
preparation for that, split up the recursion function so that the subdirectory
case is separate from the content (regfile/symlink) case. Then for non-subdirs,
we can easily peel off worker threads and gather the final checksums and update
the mtree from the main thread.

The diff here looks large but it's pretty straightforward; amazingly this change
compiled the very first time I tried it!

Closes: #1365
Approved by: jlebon
src/libostree/ostree-repo-commit.c