config/dracut/90zfs: handle cases where hostid(1) returns all zeros
[zfs.git] / include / sys / objlist.h
bloba124a61fdc953a78ea4c12e307949ec44959d622
1 /*
2 * CDDL HEADER START
4 * This file and its contents are supplied under the terms of the
5 * Common Development and Distribution License ("CDDL"), version 1.0.
6 * You may only use this file in accordance with the terms of version
7 * 1.0 of the CDDL.
9 * A full copy of the text of the CDDL should have accompanied this
10 * source. A copy of the CDDL is also available via the Internet at
11 * http://www.illumos.org/license/CDDL.
13 * CDDL HEADER END
16 * Copyright (c) 2018 by Delphix. All rights reserved.
19 #ifndef _OBJLIST_H
20 #define _OBJLIST_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #include <sys/zfs_context.h>
28 typedef struct objlist_node {
29 list_node_t on_node;
30 uint64_t on_object;
31 } objlist_node_t;
33 typedef struct objlist {
34 list_t ol_list; /* List of struct objnode. */
36 * Last object looked up. Used to assert that objects are being looked
37 * up in ascending order.
39 uint64_t ol_last_lookup;
40 } objlist_t;
42 objlist_t *objlist_create(void);
43 void objlist_destroy(objlist_t *);
44 boolean_t objlist_exists(objlist_t *, uint64_t);
45 void objlist_insert(objlist_t *, uint64_t);
47 #ifdef __cplusplus
49 #endif
51 #endif /* _OBJLIST_H */