[ostree] core: use open(..., O_NOATIME) for reading loose objects
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: use open(..., O_NOATIME) for reading loose objects
- Date: Mon, 24 Sep 2012 12:35:47 +0000 (UTC)
commit 26e487bacffe34a1ff9c2d8eab5bab00400eba5d
Author: Colin Walters <walters verbum org>
Date: Mon Sep 24 07:36:42 2012 -0400
core: use open(..., O_NOATIME) for reading loose objects
More efficient, and atime shouldn't matter for these.
src/libostree/ostree-core.c | 2 +-
src/libostree/ostree-repo.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 2906da1..ac9bc2e 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -516,7 +516,7 @@ ostree_content_file_parse (GFile *content_path,
ot_lobj GFileInfo *ret_file_info = NULL;
ot_lvariant GVariant *ret_xattrs = NULL;
- file_input = (GInputStream*)g_file_read (content_path, cancellable, error);
+ file_input = (GInputStream*)gs_file_read_noatime (content_path, cancellable, error);
if (!file_input)
goto out;
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 2d2f81d..44f0905 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -2576,7 +2576,7 @@ ostree_repo_load_file (OstreeRepo *self,
if (out_input)
{
- ret_input = (GInputStream*)g_file_read (archive_content_path, cancellable, error);
+ ret_input = (GInputStream*)gs_file_read_noatime (archive_content_path, cancellable, error);
if (!ret_input)
goto out;
}
@@ -2590,7 +2590,7 @@ ostree_repo_load_file (OstreeRepo *self,
ot_lobj GInputStream *uncomp_input = NULL;
guint64 uncompressed_len;
- file_in = (GInputStream*)g_file_read (loose_path, cancellable, error);
+ file_in = (GInputStream*)gs_file_read_noatime (loose_path, cancellable, error);
if (!file_in)
goto out;
@@ -2621,7 +2621,7 @@ ostree_repo_load_file (OstreeRepo *self,
if (out_input && g_file_info_get_file_type (ret_file_info) == G_FILE_TYPE_REGULAR)
{
- ret_input = (GInputStream*) g_file_read (loose_path, cancellable, error);
+ ret_input = (GInputStream*) gs_file_read_noatime (loose_path, cancellable, error);
if (!ret_input)
{
g_prefix_error (error, "Error opening loose file object %s: ", ot_gfile_get_path_cached (loose_path));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]