summaryrefslogtreecommitdiffstats
path: root/src/fuse
diff options
context:
space:
mode:
authorSimon Rettberg2020-07-24 16:43:03 +0200
committerSimon Rettberg2020-07-24 16:43:03 +0200
commitb515e37f8f21e30a45de7faef678a5ebdf3ebd87 (patch)
tree2c22af241c461e7f497599107bd157177697e025 /src/fuse
parent[FUSE] Fix returning pending request on RTT measurement (diff)
downloaddnbd3-b515e37f8f21e30a45de7faef678a5ebdf3ebd87.tar.gz
dnbd3-b515e37f8f21e30a45de7faef678a5ebdf3ebd87.tar.xz
dnbd3-b515e37f8f21e30a45de7faef678a5ebdf3ebd87.zip
[FUSE] Tweak timeout values to prevent stale status file
If we cat the stats file right after starting the fuse client, its contents will be cached forever. The exact cause is unknown, since the timeout was specified as one second, but setting it to 0 seems to fix this issue.
Diffstat (limited to 'src/fuse')
-rw-r--r--src/fuse/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c
index df30602..f303c9c 100644
--- a/src/fuse/main.c
+++ b/src/fuse/main.c
@@ -99,7 +99,7 @@ static void image_ll_getattr( fuse_req_t req, fuse_ino_t ino, struct fuse_file_i
if ( image_stat( ino, &stbuf ) == -1 ) {
fuse_reply_err( req, ENOENT );
} else {
- fuse_reply_attr( req, &stbuf, ino == INO_IMAGE ? 120 : 1 ); // seconds validity timeout
+ fuse_reply_attr( req, &stbuf, ino == INO_IMAGE ? 1200 : 1 ); // seconds validity timeout
}
}
@@ -111,10 +111,10 @@ static void image_ll_lookup( fuse_req_t req, fuse_ino_t parent, const char *name
struct fuse_entry_param e = { 0 };
if ( strcmp( name, IMAGE_NAME ) == 0 ) {
e.ino = INO_IMAGE;
- e.attr_timeout = e.entry_timeout = 120;
+ e.attr_timeout = e.entry_timeout = 1200;
} else {
e.ino = INO_STATS;
- e.attr_timeout = e.entry_timeout = 1;
+ e.attr_timeout = e.entry_timeout = 0;
}
if ( image_stat( e.ino, &e.attr ) == 0 ) {
fuse_reply_entry( req, &e );