summaryrefslogtreecommitdiffstats
path: root/src/ioq.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-03-23 13:59:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-06-13 11:06:47 -0400
commit6719107e95a41b9ef241bdaa272eed505865710c (patch)
tree0d44c4640ef123ee8f74e051b6fe5c628d62de95 /src/ioq.c
parent9dca9f2bcd06f921312762e0b07254f5f8f51fc2 (diff)
downloadbfs-6719107e95a41b9ef241bdaa272eed505865710c.tar.xz
dir: New bfs_polldir() function for directory readahead
Diffstat (limited to 'src/ioq.c')
-rw-r--r--src/ioq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ioq.c b/src/ioq.c
index 1b61fb0..74d2e09 100644
--- a/src/ioq.c
+++ b/src/ioq.c
@@ -158,6 +158,10 @@ static void *ioq_work(void *ptr) {
res->ptr = req.ptr;
res->dir = bfs_opendir(req.dfd, req.path);
res->error = errno;
+ if (res->dir) {
+ bfs_polldir(res->dir);
+ }
+
ioqq_push(ioq->ready, cmd);
}