diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 16:26:01 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 16:26:01 +0200 |
commit | 33e14b4dfdc477344efbcd9b4218f2b350f0f893 (patch) | |
tree | 8f56045f3f3de4f5e1fc42fe0d03e48c1ede57c4 /fs/fuse/fuse_i.h | |
parent | 7a3b2c754749c73b4a255b2a1070c24dba589098 (diff) | |
download | op-kernel-dev-33e14b4dfdc477344efbcd9b4218f2b350f0f893.zip op-kernel-dev-33e14b4dfdc477344efbcd9b4218f2b350f0f893.tar.gz |
fuse: req state use flags
Use flags for representing the state in fuse_req. This is needed since
req->list will be protected by different locks in different states, hence
we'll want the state itself to be split into distinct bits, each protected
with the relevant lock in that state.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 3fd65f61..8eaf3b0 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -241,14 +241,6 @@ struct fuse_args { #define FUSE_ARGS(args) struct fuse_args args = {} -/** The request state */ -enum fuse_req_state { - FUSE_REQ_PENDING = 0, - FUSE_REQ_IO, - FUSE_REQ_SENT, - FUSE_REQ_FINISHED -}; - /** The request IO state (for asynchronous processing) */ struct fuse_io_priv { int async; @@ -274,6 +266,9 @@ struct fuse_io_priv { * FR_ABORTED: the request was aborted * FR_INTERRUPTED: the request has been interrupted * FR_LOCKED: data is being copied to/from the request + * FR_PENDING: request is not yet in userspace + * FR_SENT: request is in userspace, waiting for an answer + * FR_FINISHED: request is finished */ enum fuse_req_flag { FR_ISREPLY, @@ -283,6 +278,9 @@ enum fuse_req_flag { FR_ABORTED, FR_INTERRUPTED, FR_LOCKED, + FR_PENDING, + FR_SENT, + FR_FINISHED, }; /** @@ -309,9 +307,6 @@ struct fuse_req { /* Request flags, updated with test/set/clear_bit() */ unsigned long flags; - /** State of the request */ - enum fuse_req_state state; - /** The request input */ struct fuse_in in; |