summaryrefslogtreecommitdiff
path: root/document-portal
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-09-08 11:14:51 +0200
committerAlexander Larsson <alexl@redhat.com>2015-09-08 11:15:05 +0200
commitbb6e476f62015ab9ae3c0d1827507838f2f5c851 (patch)
treee1f41888b4c64ab7ac202f65a9ac1014dfc03891 /document-portal
parent8fe6a115f6c577a0cfc432239eda9d54bdcf72d4 (diff)
downloadxdg-app-bb6e476f62015ab9ae3c0d1827507838f2f5c851.tar.gz
fuse: Raise entry cache times now that we invalidate
Diffstat (limited to 'document-portal')
-rw-r--r--document-portal/xdp-fuse.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/document-portal/xdp-fuse.c b/document-portal/xdp-fuse.c
index 65f1e65..85ec5aa 100644
--- a/document-portal/xdp-fuse.c
+++ b/document-portal/xdp-fuse.c
@@ -93,11 +93,9 @@ get_attr_cache_time (int st_mode)
}
static double
-get_entry_cache_time (int st_mode)
+get_entry_cache_time (fuse_ino_t inode)
{
- if (S_ISDIR (st_mode))
- return DIRS_ATTR_CACHE_TIME;
- return 1.0;
+ return 60.0;
}
/******************************* XdpTmp *******************************
@@ -1041,7 +1039,7 @@ xdp_fuse_lookup (fuse_req_t req,
if (res == 0)
{
e.attr_timeout = get_attr_cache_time (e.attr.st_mode);
- e.entry_timeout = get_entry_cache_time (e.attr.st_mode);
+ e.entry_timeout = get_entry_cache_time (e.ino);
fuse_reply_entry (req, &e);
}
else
@@ -1523,7 +1521,7 @@ xdp_fuse_create (fuse_req_t req,
}
e.attr_timeout = get_attr_cache_time (e.attr.st_mode);
- e.entry_timeout = get_entry_cache_time (e.attr.st_mode);
+ e.entry_timeout = get_entry_cache_time (e.ino);
if (fuse_reply_create (req, &e, fi))
xdp_fh_unref (fh);
@@ -1603,7 +1601,7 @@ xdp_fuse_create (fuse_req_t req,
return;
}
e.attr_timeout = get_attr_cache_time (e.attr.st_mode);
- e.entry_timeout = get_entry_cache_time (e.attr.st_mode);
+ e.entry_timeout = get_entry_cache_time (e.ino);
fh = xdp_fh_new (e.ino, fi, steal_fd (&fd), tmpfile);
fh->can_write = TRUE;