projects
/
rrq
/
fusefile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e65b7e
)
disable asynchronous reading/writing
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 16 Jul 2022 11:14:20 +0000
(21:14 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 16 Jul 2022 11:14:20 +0000
(21:14 +1000)
fusefile.c
patch
|
blob
|
history
diff --git
a/fusefile.c
b/fusefile.c
index a0f09818da187d7958c75d6117ef5ed6bdebd06c..b9d3b2d68b7ee71ba0ab2080187d6f2584c3f52e 100644
(file)
--- a/
fusefile.c
+++ b/
fusefile.c
@@
-225,6
+225,7
@@
static int fusefile_read(const char *path, char *buf, size_t size,
#if DEBUG
print_source( &sources.array[i] );
#endif
#if DEBUG
print_source( &sources.array[i] );
#endif
+ times.atime = time( 0 );
size_t b = off - sources.array[i].start + sources.array[i].from;
size_t n = sources.array[i].to - b;
if ( n > size ) {
size_t b = off - sources.array[i].start + sources.array[i].from;
size_t n = sources.array[i].to - b;
if ( n > size ) {
@@
-252,7
+253,6
@@
static int fusefile_read(const char *path, char *buf, size_t size,
off += r;
size -= r;
}
off += r;
size -= r;
}
- times.atime = time( 0 );
return rr;
}
return rr;
}
@@
-411,6
+411,19
@@
static int fusefile_truncate(const char *path, off_t len) {
return -EIO;
}
return -EIO;
}
+void *fusefile_init(struct fuse_conn_info *fci) {
+#if DEBUG
+ fprintf( stderr, "fusefile_init( %d, %d )\n", fci->async_read, fci->want );
+#endif
+ // Disable asynchronous reading
+ fci->async_read = 0;
+ fci->want &= ~FUSE_CAP_ASYNC_READ;
+#if DEBUG
+ fprintf( stderr, "fusefile_init( %d, %d )\n", fci->async_read, fci->want );
+#endif
+ return 0;
+}
+
static struct fuse_operations fusefile_oper = {
.getattr = fusefile_getattr,
.chmod = fusefile_chmod,
static struct fuse_operations fusefile_oper = {
.getattr = fusefile_getattr,
.chmod = fusefile_chmod,
@@
-426,7
+439,7
@@
static struct fuse_operations fusefile_oper = {
.truncate = fusefile_truncate,
//.truncate = fusefile_truncate,
//.release = fusefile_release,
.truncate = fusefile_truncate,
//.truncate = fusefile_truncate,
//.release = fusefile_release,
- //void *(*init) (struct fuse_conn_info *conn);
+ .init = fusefile_init,
};
static void usage() {
};
static void usage() {