Skip to content

Commit

Permalink
include: move zio_priority_t into zfs.h
Browse files Browse the repository at this point in the history
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 <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Close openzfs#17066
  • Loading branch information
robn authored Feb 22, 2025
1 parent ee8803a commit ecc44c4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 52 deletions.
1 change: 0 additions & 1 deletion include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ COMMON_H = \
sys/zio_compress.h \
sys/zio_crypt.h \
sys/zio_impl.h \
sys/zio_priority.h \
sys/zrlock.h \
sys/zthr.h \
\
Expand Down
1 change: 0 additions & 1 deletion include/sys/dmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <sys/cred.h>
#include <sys/fs/zfs.h>
#include <sys/zio_compress.h>
#include <sys/zio_priority.h>
#include <sys/uio.h>
#include <sys/zfs_file.h>

Expand Down
23 changes: 21 additions & 2 deletions include/sys/fs/zfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

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

#include <sys/time.h>
#include <sys/zio_priority.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -1126,6 +1125,26 @@ typedef enum zio_type {
*/
#define ZIO_TYPE_IOCTL ZIO_TYPE_FLUSH

/*
* ZIO priority types. Needed to interpret vdev statistics below.
*
* NOTE: PLEASE UPDATE THE ENUM STRINGS IN zfs_valstr.c IF YOU ADD ANOTHER
* VALUE.
*/
typedef enum zio_priority {
ZIO_PRIORITY_SYNC_READ,
ZIO_PRIORITY_SYNC_WRITE, /* ZIL */
ZIO_PRIORITY_ASYNC_READ, /* prefetch */
ZIO_PRIORITY_ASYNC_WRITE, /* spa_sync() */
ZIO_PRIORITY_SCRUB, /* asynchronous scrub/resilver reads */
ZIO_PRIORITY_REMOVAL, /* reads/writes for vdev removal */
ZIO_PRIORITY_INITIALIZING, /* initializing I/O */
ZIO_PRIORITY_TRIM, /* trim I/O (discard) */
ZIO_PRIORITY_REBUILD, /* reads/writes for vdev rebuild */
ZIO_PRIORITY_NUM_QUEUEABLE,
ZIO_PRIORITY_NOW, /* non-queued i/os (e.g. free) */
} zio_priority_t;

/*
* Pool statistics. Note: all fields should be 64-bit because this
* is passed between kernel and userland as an nvlist uint64 array.
Expand Down
1 change: 0 additions & 1 deletion include/sys/zio.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#ifndef _ZIO_H
#define _ZIO_H

#include <sys/zio_priority.h>
#include <sys/zfs_context.h>
#include <sys/spa.h>
#include <sys/txg.h>
Expand Down
47 changes: 0 additions & 47 deletions include/sys/zio_priority.h

This file was deleted.

0 comments on commit ecc44c4

Please sign in to comment.