Commit 606d1d91 authored by Julius Athenstaedt's avatar Julius Athenstaedt
Browse files

max_read renamed to not clash with internal max_read, this can probably...

max_read renamed to not clash with internal max_read, this can probably changed in later fuse versions
parent 51e93d25
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ struct u_data {
    int writeback;
    int direct_io;
    int max_readahead;
    int max_read;
    int max_read2;
    int fifo;
    int access;
    int xattr;
+5 −5
Original line number Diff line number Diff line
@@ -124,7 +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},
        {"max_read2=%ui", offsetof(struct u_data, max_read2), 0},
        {"fifo", offsetof(struct u_data, fifo), 1},
        {"no_fifo", offsetof(struct u_data, fifo), 0},
        {"access", offsetof(struct u_data, access), 1},
@@ -146,7 +146,7 @@ passthrough_ll_help(void) {
           "    -o direct_io           Enables direct io\n"
           "    -o no_direct_io        Disable direct io\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 max_read2=0         Preferred read buffer size, depends on kernel, default: 0 for unlimited. You have to set -o max_read to the same value. This is due to fuse internal logic\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"
@@ -163,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 max_read %i",
               ud->max_readahead, ud->direct_io, ud->max_read);
    DEBUG_INFO(ud, "init handler readahead %i direct_io %i max_read2 %i",
               ud->max_readahead, ud->direct_io, ud->max_read2);

    // TODO check other capabilities e.g. FUSE_CAP_READDIRPLUS
    if(ud->writeback) {
@@ -187,7 +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;
    conn->max_read = ud->max_read2;
}

static void