repo: Store pending objects in prefixed subdirectory

I was hitting a bug in libguestfs/guestmount/FUSE where it blew up
with EINVAL on directories containing lots of files (more than
32000?).  We really want to use prefixed subdirs just like the real
objects/ directory does.

This allows us to share more code between the paths, is more
efficient, etc.
This commit is contained in:
Colin Walters committed 2015-02-15 15:30:19 -05:00
1 parent 49bdbf1db0
commit ee4e393fa1
3 files changed
+93 -71

No files matched your search

+2 -5
View File
@@ -35,6 +35,8 @@ struct OstreeRepo {
GObject parent;
char *boot_id;
int commit_stagedir_fd;
char *commit_stagedir_name;
GFile *repodir;
int repo_dir_fd;
@@ -85,11 +87,6 @@ _ostree_repo_ensure_loose_objdir_at (int dfd,
const char *loose_path,
GCancellable *cancellable,
GError **error);
void
_ostree_repo_get_tmpobject_path (OstreeRepo *repo,
char *output,
const char *checksum,
OstreeObjectType objtype);
gboolean
_ostree_repo_find_object (OstreeRepo *self,