summaryrefslogtreecommitdiffstats
path: root/src/fuse
diff options
context:
space:
mode:
authorSimon Rettberg2015-12-03 10:12:43 +0100
committerSimon Rettberg2015-12-03 10:12:43 +0100
commit8753bfa50f86cad824c7db25733ab800303191d7 (patch)
tree74b6b3bc214588eaf5b8b6baae6652e642f6f1b0 /src/fuse
parent[SERVER] Update includes for moved log.h (diff)
downloaddnbd3-8753bfa50f86cad824c7db25733ab800303191d7.tar.gz
dnbd3-8753bfa50f86cad824c7db25733ab800303191d7.tar.xz
dnbd3-8753bfa50f86cad824c7db25733ab800303191d7.zip
[FUSE] Try to get caching right
Diffstat (limited to 'src/fuse')
-rw-r--r--src/fuse/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c
index 38074dc..036c762 100644
--- a/src/fuse/main.c
+++ b/src/fuse/main.c
@@ -62,6 +62,7 @@ static int image_getattr(const char *path, struct stat *stbuf)
stbuf->st_mode = S_IFREG | 0440;
stbuf->st_nlink = 1;
stbuf->st_size = 4096;
+ clock_gettime( CLOCK_REALTIME, &stbuf->st_mtim );
} else {
res = -ENOENT;
}
@@ -177,7 +178,7 @@ static struct fuse_operations image_oper = {
static void printVersion()
{
char *arg[] = { "foo", "-V" };
- printf( "DNBD3-Fuse Version 1.2.3.4\n" );
+ printf( "DNBD3-Fuse Version 1.2.3.4, protocol version %d\n", (int)PROTOCOL_VERSION );
fuse_main( 2, arg, NULL, NULL );
exit( 0 );
}
@@ -290,7 +291,7 @@ int main(int argc, char *argv[])
// Since dnbd3 is always read only and the remote image will not change
newArgv[newArgc++] = "-o";
- newArgv[newArgc++] = "kernel_cache,default_permissions";
+ newArgv[newArgc++] = "ro,auto_cache,default_permissions";
// Mount point goes last
newArgv[newArgc++] = argv[optind];