Skip to content

Commit ecc44c4

Browse files
authored
include: move zio_priority_t into zfs.h
It's included so it's effectively already part of it, but it's not always installed as a userspace header, making zfs.h effectively useless. Might as well just combine it. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Rob Norris <[email protected]> Close #17066
1 parent ee8803a commit ecc44c4

File tree

5 files changed

+21
-52
lines changed

5 files changed

+21
-52
lines changed

include/Makefile.am

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ COMMON_H = \
150150
sys/zio_compress.h \
151151
sys/zio_crypt.h \
152152
sys/zio_impl.h \
153-
sys/zio_priority.h \
154153
sys/zrlock.h \
155154
sys/zthr.h \
156155
\

include/sys/dmu.h

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#include <sys/cred.h>
4949
#include <sys/fs/zfs.h>
5050
#include <sys/zio_compress.h>
51-
#include <sys/zio_priority.h>
5251
#include <sys/uio.h>
5352
#include <sys/zfs_file.h>
5453

include/sys/fs/zfs.h

+21-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
/*
2323
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24-
* Copyright (c) 2011, 2024 by Delphix. All rights reserved.
24+
* Copyright (c) 2011, 2014, 2016, 2024 by Delphix. All rights reserved.
2525
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
2626
* Copyright (c) 2013, 2017 Joyent, Inc. All rights reserved.
2727
* Copyright (c) 2014 Integros [integros.com]
@@ -37,7 +37,6 @@
3737
#define _SYS_FS_ZFS_H extern __attribute__((visibility("default")))
3838

3939
#include <sys/time.h>
40-
#include <sys/zio_priority.h>
4140

4241
#ifdef __cplusplus
4342
extern "C" {
@@ -1126,6 +1125,26 @@ typedef enum zio_type {
11261125
*/
11271126
#define ZIO_TYPE_IOCTL ZIO_TYPE_FLUSH
11281127

1128+
/*
1129+
* ZIO priority types. Needed to interpret vdev statistics below.
1130+
*
1131+
* NOTE: PLEASE UPDATE THE ENUM STRINGS IN zfs_valstr.c IF YOU ADD ANOTHER
1132+
* VALUE.
1133+
*/
1134+
typedef enum zio_priority {
1135+
ZIO_PRIORITY_SYNC_READ,
1136+
ZIO_PRIORITY_SYNC_WRITE, /* ZIL */
1137+
ZIO_PRIORITY_ASYNC_READ, /* prefetch */
1138+
ZIO_PRIORITY_ASYNC_WRITE, /* spa_sync() */
1139+
ZIO_PRIORITY_SCRUB, /* asynchronous scrub/resilver reads */
1140+
ZIO_PRIORITY_REMOVAL, /* reads/writes for vdev removal */
1141+
ZIO_PRIORITY_INITIALIZING, /* initializing I/O */
1142+
ZIO_PRIORITY_TRIM, /* trim I/O (discard) */
1143+
ZIO_PRIORITY_REBUILD, /* reads/writes for vdev rebuild */
1144+
ZIO_PRIORITY_NUM_QUEUEABLE,
1145+
ZIO_PRIORITY_NOW, /* non-queued i/os (e.g. free) */
1146+
} zio_priority_t;
1147+
11291148
/*
11301149
* Pool statistics. Note: all fields should be 64-bit because this
11311150
* is passed between kernel and userland as an nvlist uint64 array.

include/sys/zio.h

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#ifndef _ZIO_H
3636
#define _ZIO_H
3737

38-
#include <sys/zio_priority.h>
3938
#include <sys/zfs_context.h>
4039
#include <sys/spa.h>
4140
#include <sys/txg.h>

include/sys/zio_priority.h

-47
This file was deleted.

0 commit comments

Comments
 (0)