Loading include/client/fuse/fuse_client.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ struct u_data { int writeback; int direct_io; int max_readahead; int max_read; int fifo; int access; int xattr; Loading src/client/fuse/fuse_client.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ static const struct fuse_opt lo_opts[] = { {"direct_io", offsetof(struct u_data, direct_io), 1}, {"no_direct_io", offsetof(struct u_data, direct_io), 0}, {"max_readahead=%ui", offsetof(struct u_data, max_readahead), 0}, {"max_read=%ui", offsetof(struct u_data, max_read), 0}, {"fifo", offsetof(struct u_data, fifo), 1}, {"no_fifo", offsetof(struct u_data, fifo), 0}, {"access", offsetof(struct u_data, access), 1}, Loading @@ -144,7 +145,8 @@ passthrough_ll_help(void) { " -o no_writeback Disable write back\n" " -o direct_io Enables direct io\n" " -o no_direct_io Disable direct io\n" " -o max_readahead=1 Amount of allowed readaheads\n" " -o max_readahead=0 Amount of allowed readaheads in bytes\n" " -o max_read=0 Preferred read buffer size, depends on kernel, 0 for unlimited\n" " -o fifo Enable fifo, disables GekkoFS access check\n" " -o no_fifo Disable fifo\n" " -o access Enable GekkoFS access check if fifo is deactivated\n" Loading @@ -161,8 +163,8 @@ passthrough_ll_help(void) { static void init_handler(void* userdata, struct fuse_conn_info* conn) { struct u_data* ud = (struct u_data*) userdata; DEBUG_INFO(ud, "init handler readahead %i direct_io %i", ud->max_readahead, ud->direct_io); DEBUG_INFO(ud, "init handler readahead %i direct_io %i max_read %i", ud->max_readahead, ud->direct_io, ud->max_read); // TODO check other capabilities e.g. FUSE_CAP_READDIRPLUS if(ud->writeback) { Loading @@ -173,8 +175,7 @@ init_handler(void* userdata, struct fuse_conn_info* conn) { // for older fuse versions like on the ubuntu22 conn->want |= FUSE_CAP_WRITEBACK_CACHE; #endif DEBUG_INFO(ud, "init_handler: try to activate writeback", ud->max_readahead, ud->direct_io); DEBUG_INFO(ud, "init_handler: try to activate writeback"); } // if(lo->flock && conn->capable & FUSE_CAP_FLOCK_LOCKS) { // has_flag = fuse_set_feature_flag(conn, FUSE_CAP_FLOCK_LOCKS); Loading @@ -186,6 +187,7 @@ init_handler(void* userdata, struct fuse_conn_info* conn) { /* Disable the receiving and processing of FUSE_INTERRUPT requests */ // conn->no_interrupt = 1; conn->max_readahead = ud->max_readahead; conn->max_read = ud->max_read; } static void Loading Loading
include/client/fuse/fuse_client.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ struct u_data { int writeback; int direct_io; int max_readahead; int max_read; int fifo; int access; int xattr; Loading
src/client/fuse/fuse_client.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -124,6 +124,7 @@ static const struct fuse_opt lo_opts[] = { {"direct_io", offsetof(struct u_data, direct_io), 1}, {"no_direct_io", offsetof(struct u_data, direct_io), 0}, {"max_readahead=%ui", offsetof(struct u_data, max_readahead), 0}, {"max_read=%ui", offsetof(struct u_data, max_read), 0}, {"fifo", offsetof(struct u_data, fifo), 1}, {"no_fifo", offsetof(struct u_data, fifo), 0}, {"access", offsetof(struct u_data, access), 1}, Loading @@ -144,7 +145,8 @@ passthrough_ll_help(void) { " -o no_writeback Disable write back\n" " -o direct_io Enables direct io\n" " -o no_direct_io Disable direct io\n" " -o max_readahead=1 Amount of allowed readaheads\n" " -o max_readahead=0 Amount of allowed readaheads in bytes\n" " -o max_read=0 Preferred read buffer size, depends on kernel, 0 for unlimited\n" " -o fifo Enable fifo, disables GekkoFS access check\n" " -o no_fifo Disable fifo\n" " -o access Enable GekkoFS access check if fifo is deactivated\n" Loading @@ -161,8 +163,8 @@ passthrough_ll_help(void) { static void init_handler(void* userdata, struct fuse_conn_info* conn) { struct u_data* ud = (struct u_data*) userdata; DEBUG_INFO(ud, "init handler readahead %i direct_io %i", ud->max_readahead, ud->direct_io); DEBUG_INFO(ud, "init handler readahead %i direct_io %i max_read %i", ud->max_readahead, ud->direct_io, ud->max_read); // TODO check other capabilities e.g. FUSE_CAP_READDIRPLUS if(ud->writeback) { Loading @@ -173,8 +175,7 @@ init_handler(void* userdata, struct fuse_conn_info* conn) { // for older fuse versions like on the ubuntu22 conn->want |= FUSE_CAP_WRITEBACK_CACHE; #endif DEBUG_INFO(ud, "init_handler: try to activate writeback", ud->max_readahead, ud->direct_io); DEBUG_INFO(ud, "init_handler: try to activate writeback"); } // if(lo->flock && conn->capable & FUSE_CAP_FLOCK_LOCKS) { // has_flag = fuse_set_feature_flag(conn, FUSE_CAP_FLOCK_LOCKS); Loading @@ -186,6 +187,7 @@ init_handler(void* userdata, struct fuse_conn_info* conn) { /* Disable the receiving and processing of FUSE_INTERRUPT requests */ // conn->no_interrupt = 1; conn->max_readahead = ud->max_readahead; conn->max_read = ud->max_read; } static void Loading