diff options
| author | Sundar Raman <sunds@ti.com> | 2012-02-09 10:31:10 -0600 |
|---|---|---|
| committer | Ken Sumrall <ksumrall@android.com> | 2012-05-01 15:28:05 -0700 |
| commit | e5d32128b0f1373822b02b2a2e69c6b199e0f805 (patch) | |
| tree | 018dac4d3a8d9fb152b5b10a39f7f454666f1345 /sdcard/sdcard.c | |
| parent | 94a55df34d917492cb3613b9445ffb1659459186 (diff) | |
| download | system_core-e5d32128b0f1373822b02b2a2e69c6b199e0f805.tar.gz system_core-e5d32128b0f1373822b02b2a2e69c6b199e0f805.tar.bz2 system_core-e5d32128b0f1373822b02b2a2e69c6b199e0f805.zip | |
sdcard: use FUSE_BIG_WRITES for FUSE writes
Slightly optimizes the writes used by sdcard to increase
throughput and decrease cpu load. Update the read
size to 256 x 1024 + 128 from current 8192 bytes since
writes can go as high as that.
Change-Id: I3bad425f31d4aa6f44f546e3d31439fd5bdca9ea
Signed-off-by: Sundar Raman <sunds@ti.com>
Diffstat (limited to 'sdcard/sdcard.c')
| -rw-r--r-- | sdcard/sdcard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c index dba5a4e3..a95513c3 100644 --- a/sdcard/sdcard.c +++ b/sdcard/sdcard.c @@ -912,7 +912,7 @@ void handle_fuse_request(struct fuse *fuse, struct fuse_in_header *hdr, void *da out.major = FUSE_KERNEL_VERSION; out.minor = FUSE_KERNEL_MINOR_VERSION; out.max_readahead = req->max_readahead; - out.flags = FUSE_ATOMIC_O_TRUNC; + out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES; out.max_background = 32; out.congestion_threshold = 32; out.max_write = 256 * 1024; @@ -941,7 +941,7 @@ void handle_fuse_requests(struct fuse *fuse) int len; for (;;) { - len = read(fuse->fd, req, 8192); + len = read(fuse->fd, req, sizeof(req)); if (len < 0) { if (errno == EINTR) continue; |
