# \[PATCH 2/6\] fs: add kiocb alloc cache flag

- From: Jens Axboe \<axboe@kernel.dk\>
- Date: 2021-08-11 19:35:45 
- List: io-uring
- Page: https://ratatoskr.run/io-uring/2021/08/6404556
- Thread: https://ratatoskr.run/io-uring/2021/08/6404554/t.md

```text
If this kiocb can safely use the polled bio allocation cache, then this
flag must be set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 include/linux/fs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 640574294216..0dcc5de779c9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -319,6 +319,8 @@ enum rw_hint {
 /* iocb->ki_waitq is valid */
 #define IOCB_WAITQ		(1 << 19)
 #define IOCB_NOIO		(1 << 20)
+/* can use bio alloc cache */
+#define IOCB_ALLOC_CACHE	(1 << 21)
 
 struct kiocb {
 	struct file		*ki_filp;
-- 
2.32.0

```
