Skip to content

Commit e5d3212

Browse files
Sundar RamanKen Sumrall
Sundar Raman
authored and
Ken Sumrall
committed
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 <[email protected]>
1 parent 94a55df commit e5d3212

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdcard/sdcard.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ void handle_fuse_request(struct fuse *fuse, struct fuse_in_header *hdr, void *da
912912
out.major = FUSE_KERNEL_VERSION;
913913
out.minor = FUSE_KERNEL_MINOR_VERSION;
914914
out.max_readahead = req->max_readahead;
915-
out.flags = FUSE_ATOMIC_O_TRUNC;
915+
out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
916916
out.max_background = 32;
917917
out.congestion_threshold = 32;
918918
out.max_write = 256 * 1024;
@@ -941,7 +941,7 @@ void handle_fuse_requests(struct fuse *fuse)
941941
int len;
942942

943943
for (;;) {
944-
len = read(fuse->fd, req, 8192);
944+
len = read(fuse->fd, req, sizeof(req));
945945
if (len < 0) {
946946
if (errno == EINTR)
947947
continue;

0 commit comments

Comments
 (0)