aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bio.h
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-12-17 00:13:35 +0000
committerWarner Losh <imp@FreeBSD.org>2019-12-17 00:13:35 +0000
commitb182c792119393b096f5b7ff16809b04fc3cf4ba (patch)
treec703bd1b0e1a5ef6bf76ed594223e0e920bcf2e8 /sys/sys/bio.h
parent7918ea40a5cda5ed14c754bfd3d2b584d18ea162 (diff)
downloadsrc-b182c792119393b096f5b7ff16809b04fc3cf4ba.tar.gz
src-b182c792119393b096f5b7ff16809b04fc3cf4ba.zip
Add BIO_SPEEDUP
Add BIO_SPEEDUP bio command and g_io_speedup wrapper. It tells the lower layers that the upper layers are dealing with some shortage (dirty pages and/or disk blocks). The lower layers should do what they can to speed up anything that's been delayed. The first use will be to tell the CAM I/O scheduler that any TRIM shaping should be short-circuited because the system needs blocks. We'll also call it when there's too many resources used by UFS. Reviewed by: kirk, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18351
Notes
Notes: svn path=/head/; revision=355835
Diffstat (limited to 'sys/sys/bio.h')
-rw-r--r--sys/sys/bio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index 26a7ef444b4d..488f3039778d 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -53,6 +53,7 @@
#define BIO_CMD1 0x07 /* Available for local hacks */
#define BIO_CMD2 0x08 /* Available for local hacks */
#define BIO_ZONE 0x09 /* Zone command */
+#define BIO_SPEEDUP 0x0a /* Upper layers face shortage */
/* bio_flags */
#define BIO_ERROR 0x01 /* An error occurred processing this bio. */
@@ -70,6 +71,9 @@
#define PRINT_BIO_FLAGS "\20\7vlist\6transient_mapping\5unmapped" \
"\4ordered\3onqueue\2done\1error"
+#define BIO_SPEEDUP_WRITE 0x4000 /* Resource shortage at upper layers */
+#define BIO_SPEEDUP_TRIM 0x8000 /* Resource shortage at upper layers */
+
#ifdef _KERNEL
struct disk;
struct bio;