aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-07 21:08:40 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-08 21:26:36 -0700
commit97f4a9cb4fc69be5c3b4d7631ebe20355bdc83dc (patch)
treea8575cf3f00cf10ec0a6bd0e591fabe1a697c5e5
parent2680c5b9951b022351dd698b1ba21e965355ad16 (diff)
Removed ``-o big_writes`` option
This option is obsolete and should always be enabled. File systems that want to limit the size of write requests should use the ``-o max_write=<N>`` option instead.
-rw-r--r--ChangeLog.rst7
-rw-r--r--include/fuse_common.h4
-rw-r--r--lib/fuse_i.h1
-rw-r--r--lib/fuse_lowlevel.c12
-rwxr-xr-xtest/test_examples.py2
5 files changed, 14 insertions, 12 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 78f6d51..bfe956b 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,3 +1,10 @@
+Unreleased Changes
+==================
+
+* The ``-o big_writes`` mount option has been removed. It is now
+ always active. File systems that want to limit the size of write
+ requests should use the ``-o max_write=<N>`` option instead.
+
FUSE 3.0.0pre0 (2016-10-03)
============================
diff --git a/include/fuse_common.h b/include/fuse_common.h
index f32c872..6eadc90 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -90,7 +90,6 @@ struct fuse_file_info {
* FUSE_CAP_POSIX_LOCKS: filesystem supports "remote" locking
* FUSE_CAP_ATOMIC_O_TRUNC: filesystem handles the O_TRUNC open flag
* FUSE_CAP_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
- * FUSE_CAP_BIG_WRITES: filesystem can handle write size larger than 4kB
* FUSE_CAP_DONT_MASK: don't apply umask to file mode on create operations
* FUSE_CAP_SPLICE_WRITE: ability to use splice() to write to the fuse device
* FUSE_CAP_SPLICE_MOVE: ability to move data to the fuse device with splice()
@@ -107,7 +106,8 @@ struct fuse_file_info {
#define FUSE_CAP_POSIX_LOCKS (1 << 1)
#define FUSE_CAP_ATOMIC_O_TRUNC (1 << 3)
#define FUSE_CAP_EXPORT_SUPPORT (1 << 4)
-#define FUSE_CAP_BIG_WRITES (1 << 5)
+/* (1 << 5) used to be FUSE_CAP_BIG_WRITES, which is now
+ always enabled */
#define FUSE_CAP_DONT_MASK (1 << 6)
#define FUSE_CAP_SPLICE_WRITE (1 << 7)
#define FUSE_CAP_SPLICE_MOVE (1 << 8)
diff --git a/lib/fuse_i.h b/lib/fuse_i.h
index cbc4483..446842a 100644
--- a/lib/fuse_i.h
+++ b/lib/fuse_i.h
@@ -52,7 +52,6 @@ struct fuse_session {
int atomic_o_trunc;
int no_remote_posix_lock;
int no_remote_flock;
- int big_writes;
int splice_write;
int splice_move;
int splice_read;
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 34d17a9..4ad5daf 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1860,8 +1860,6 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
f->conn.capable |= FUSE_CAP_ATOMIC_O_TRUNC;
if (arg->flags & FUSE_EXPORT_SUPPORT)
f->conn.capable |= FUSE_CAP_EXPORT_SUPPORT;
- if (arg->flags & FUSE_BIG_WRITES)
- f->conn.capable |= FUSE_CAP_BIG_WRITES;
if (arg->flags & FUSE_DONT_MASK)
f->conn.capable |= FUSE_CAP_DONT_MASK;
if (arg->flags & FUSE_FLOCK_LOCKS)
@@ -1906,8 +1904,6 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
f->conn.want |= FUSE_CAP_POSIX_LOCKS;
if (f->op.flock && !f->no_remote_flock)
f->conn.want |= FUSE_CAP_FLOCK_LOCKS;
- if (f->big_writes)
- f->conn.want |= FUSE_CAP_BIG_WRITES;
if (f->auto_inval_data)
f->conn.want |= FUSE_CAP_AUTO_INVAL_DATA;
if (f->op.readdirplus && !f->no_readdirplus) {
@@ -1951,6 +1947,10 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
if (f->no_writeback_cache)
f->conn.want &= ~FUSE_CAP_WRITEBACK_CACHE;
+ /* Always enable big writes, this is superseded
+ by the max_write option */
+ outarg.flags |= FUSE_BIG_WRITES;
+
if (f->conn.async_read || (f->conn.want & FUSE_CAP_ASYNC_READ))
outarg.flags |= FUSE_ASYNC_READ;
if (f->conn.want & FUSE_CAP_POSIX_LOCKS)
@@ -1959,8 +1959,6 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
outarg.flags |= FUSE_ATOMIC_O_TRUNC;
if (f->conn.want & FUSE_CAP_EXPORT_SUPPORT)
outarg.flags |= FUSE_EXPORT_SUPPORT;
- if (f->conn.want & FUSE_CAP_BIG_WRITES)
- outarg.flags |= FUSE_BIG_WRITES;
if (f->conn.want & FUSE_CAP_DONT_MASK)
outarg.flags |= FUSE_DONT_MASK;
if (f->conn.want & FUSE_CAP_FLOCK_LOCKS)
@@ -2565,7 +2563,6 @@ static const struct fuse_opt fuse_ll_opts[] = {
{ "no_remote_lock", offsetof(struct fuse_session, no_remote_flock), 1},
{ "no_remote_flock", offsetof(struct fuse_session, no_remote_flock), 1},
{ "no_remote_posix_lock", offsetof(struct fuse_session, no_remote_posix_lock), 1},
- { "big_writes", offsetof(struct fuse_session, big_writes), 1},
{ "splice_write", offsetof(struct fuse_session, splice_write), 1},
{ "no_splice_write", offsetof(struct fuse_session, no_splice_write), 1},
{ "splice_move", offsetof(struct fuse_session, splice_move), 1},
@@ -2605,7 +2602,6 @@ void fuse_lowlevel_help(void)
" -o async_read perform reads asynchronously (default)\n"
" -o sync_read perform reads synchronously\n"
" -o atomic_o_trunc enable atomic open+truncate support\n"
-" -o big_writes enable larger than 4kB writes\n"
" -o no_remote_lock disable remote file locking\n"
" -o no_remote_flock disable remote file locking (BSD)\n"
" -o no_remote_posix_lock disable remote file locking (POSIX)\n"
diff --git a/test/test_examples.py b/test/test_examples.py
index 3f8892b..226835f 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -28,7 +28,7 @@ def name_generator(__ctr=[0]):
return 'testfile_%d' % __ctr[0]
LL_OPTIONS = [ ['-o', 'splice_move,splice_write,splice_read' ],
- ['-o', 'clone_fd,big_writes,writeback_cache' ] ]
+ ['-o', 'clone_fd,writeback_cache' ] ]
@pytest.mark.parametrize("name", ('hello', 'hello_ll'))
@pytest.mark.parametrize("options", LL_OPTIONS)