Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70750
b: refs/heads/master
c: f92b99b
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Oct 17, 2007
1 parent dc264dd commit 7f45dad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fdc1ca8abae72c5829e099fd35626b83ecb12666
refs/heads/master: f92b99b9dccb61760b345baf40ed37f59b91f8af
8 changes: 8 additions & 0 deletions trunk/fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
fc->blocked = 0;
wake_up_all(&fc->blocked_waitq);
}
if (fc->num_background == FUSE_CONGESTION_THRESHOLD) {
clear_bdi_congested(&fc->bdi, READ);
clear_bdi_congested(&fc->bdi, WRITE);
}
fc->num_background--;
}
spin_unlock(&fc->lock);
Expand Down Expand Up @@ -378,6 +382,10 @@ static void request_send_nowait(struct fuse_conn *fc, struct fuse_req *req)
fc->num_background++;
if (fc->num_background == FUSE_MAX_BACKGROUND)
fc->blocked = 1;
if (fc->num_background == FUSE_CONGESTION_THRESHOLD) {
set_bdi_congested(&fc->bdi, READ);
set_bdi_congested(&fc->bdi, WRITE);
}

queue_request(fc, req);
spin_unlock(&fc->lock);
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
#define FUSE_MAX_PAGES_PER_REQ 32

/** Maximum number of outstanding background requests */
#define FUSE_MAX_BACKGROUND 10
#define FUSE_MAX_BACKGROUND 12

/** Congestion starts at 75% of maximum */
#define FUSE_CONGESTION_THRESHOLD (FUSE_MAX_BACKGROUND * 75 / 100)

/** It could be as large as PATH_MAX, but would that have any uses? */
#define FUSE_NAME_MAX 1024
Expand Down

0 comments on commit 7f45dad

Please sign in to comment.