system/core
リビジョン | f944c6a1017feb3b37890dbb9e0f209043f52d89 (tree) |
---|---|
日時 | 2016-09-14 01:39:15 |
作者 | Keith Mok <kmok@cyng...> |
コミッター | Gerrit Code Review |
sdcard: add FUSE_STACKED_IO
Some kernel use FUSE_STACKED_IO
instead of FUSE_SHORTCIRCUIT
Change-Id: I6da68acba9d3a86f896743d161d63b2acc3ab571
@@ -1221,7 +1221,7 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, | ||
1221 | 1221 | } |
1222 | 1222 | out.fh = ptr_to_id(h); |
1223 | 1223 | out.open_flags = 0; |
1224 | - #ifdef FUSE_SHORTCIRCUIT | |
1224 | + #if defined(FUSE_SHORTCIRCUIT) || defined(FUSE_STACKED_IO) | |
1225 | 1225 | out.lower_fd = h->fd; |
1226 | 1226 | #elif defined FUSE_PASSTHROUGH |
1227 | 1227 | out.passthrough_fd = h->fd; |
@@ -1392,7 +1392,7 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, | ||
1392 | 1392 | } |
1393 | 1393 | out.fh = ptr_to_id(h); |
1394 | 1394 | out.open_flags = 0; |
1395 | - #ifdef FUSE_SHORTCIRCUIT | |
1395 | + #if defined(FUSE_SHORTCIRCUIT) || defined(FUSE_STACKED_IO) | |
1396 | 1396 | out.lower_fd = -1; |
1397 | 1397 | #elif defined FUSE_PASSTHROUGH |
1398 | 1398 | out.passthrough_fd = -1; |
@@ -1481,6 +1481,9 @@ static int handle_init(struct fuse* fuse, struct fuse_handler* handler, | ||
1481 | 1481 | out.max_readahead = req->max_readahead; |
1482 | 1482 | out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES; |
1483 | 1483 | |
1484 | + #ifdef FUSE_STACKED_IO | |
1485 | + out.flags |= FUSE_STACKED_IO; | |
1486 | + #endif | |
1484 | 1487 | #ifdef FUSE_SHORTCIRCUIT |
1485 | 1488 | out.flags |= FUSE_SHORTCIRCUIT; |
1486 | 1489 | #endif |