From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: miklos@szeredi.hu, ktkhai@virtuozzo.com, linux-fsdevel@vger.kernel.org
Subject: [PATCH 6/7] fuse: Kill unused FR_ABORTED, FR_LOCKED and FR_PRIVATE flags
Date: Tue, 15 Jan 2019 13:19:47 +0300 [thread overview]
Message-ID: <154754758730.4244.17451195008535612523.stgit@localhost.localdomain> (raw)
In-Reply-To: <154754701031.4244.8089449938935364463.stgit@localhost.localdomain>
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
fs/fuse/dev.c | 9 ++-------
fs/fuse/fuse_i.h | 14 +-------------
2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 4905abfb279e..c3bacf9191a6 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1349,7 +1349,6 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
(struct fuse_arg *) in->args, 0);
fuse_copy_finish(cs);
spin_lock(&fpq->lock);
- clear_bit(FR_LOCKED, &req->flags);
if (!fpq->connected) {
err = fc->aborted ? -ECONNABORTED : -ENODEV;
goto out_end;
@@ -1376,8 +1375,7 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
return reqsize;
out_end:
- if (!test_bit(FR_PRIVATE, &req->flags))
- list_del_init(&req->list);
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
return err;
@@ -1955,7 +1953,6 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
clear_bit(FR_SENT, &req->flags);
list_move(&req->list, &fpq->io);
req->out.h = oh;
- set_bit(FR_LOCKED, &req->flags);
spin_unlock(&fpq->lock);
cs->req = req;
if (!req->out.page_replace)
@@ -1965,13 +1962,11 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
fuse_copy_finish(cs);
spin_lock(&fpq->lock);
- clear_bit(FR_LOCKED, &req->flags);
if (!fpq->connected)
err = -ENOENT;
else if (err)
req->out.h.error = -EIO;
- if (!test_bit(FR_PRIVATE, &req->flags))
- list_del_init(&req->list);
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index b5f2265c437c..09ea5773ad81 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -332,35 +332,23 @@ struct fuse_io_priv {
* FR_FORCE: force sending of the request even if interrupted
* FR_BACKGROUND: request is sent in the background
* FR_WAITING: request is counted as "waiting"
- * 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
- * FR_PRIVATE: request is on private list
*/
enum fuse_req_flag {
FR_ISREPLY,
FR_FORCE,
FR_BACKGROUND,
FR_WAITING,
- FR_ABORTED,
FR_INTERRUPTED,
- FR_LOCKED,
FR_PENDING,
FR_SENT,
FR_FINISHED,
- FR_PRIVATE,
};
-/**
- * A request to the client
- *
- * .waitq.lock protects the following fields:
- * - FR_ABORTED
- * - FR_LOCKED (may also be modified under fc->lock, tested under both)
- */
+/* A request to the client */
struct fuse_req {
/** This can be on either pending processing or io lists in
fuse_conn */
next prev parent reply other threads:[~2019-01-15 10:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 10:19 [PATCH 0/7] fuse: Improve disconnect scheme and avoid taking fpq->lock on hot paths Kirill Tkhai
2019-01-15 10:19 ` [PATCH 1/7] fuse: Check for fc->connected in fuse_dev_alloc() Kirill Tkhai
2019-01-18 12:07 ` Miklos Szeredi
2019-01-18 12:28 ` Kirill Tkhai
2019-01-23 9:45 ` Miklos Szeredi
2019-01-23 9:55 ` Kirill Tkhai
2019-01-23 10:24 ` Miklos Szeredi
2019-01-15 10:19 ` [PATCH 2/7] fuse: Move flush_bg_queue() up in fuse_abort_conn() Kirill Tkhai
2019-01-15 10:19 ` [PATCH 3/7] fuse: Drop and reacquire fc->lock in middle of fuse_abort_conn() Kirill Tkhai
2019-01-15 10:19 ` [PATCH 4/7] fuse: Add fud pointer to struct fuse_copy_state Kirill Tkhai
2019-01-15 10:19 ` [PATCH 5/7] fuse: Introduce generic fuse_copy_aborted() Kirill Tkhai
2019-01-17 9:48 ` Miklos Szeredi
2019-01-15 10:19 ` Kirill Tkhai [this message]
2019-01-15 10:19 ` [PATCH 7/7] fuse: Kill fuse_pqueue::io list and avoid taking fpq->lock on hot paths Kirill Tkhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=154754758730.4244.17451195008535612523.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox