The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/include/sys/vdev_removal.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * CDDL HEADER START
    3  *
    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.
    8  *
    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.
   12  *
   13  * CDDL HEADER END
   14  */
   15 
   16 /*
   17  * Copyright (c) 2014, 2019 by Delphix. All rights reserved.
   18  */
   19 
   20 #ifndef _SYS_VDEV_REMOVAL_H
   21 #define _SYS_VDEV_REMOVAL_H
   22 
   23 #include <sys/spa.h>
   24 #include <sys/bpobj.h>
   25 #include <sys/vdev_indirect_mapping.h>
   26 #include <sys/vdev_indirect_births.h>
   27 
   28 #ifdef  __cplusplus
   29 extern "C" {
   30 #endif
   31 
   32 typedef struct spa_vdev_removal {
   33         uint64_t        svr_vdev_id;
   34         uint64_t        svr_max_offset_to_sync[TXG_SIZE];
   35         /* Thread performing a vdev removal. */
   36         kthread_t       *svr_thread;
   37         /* Segments left to copy from the current metaslab. */
   38         range_tree_t    *svr_allocd_segs;
   39         kmutex_t        svr_lock;
   40         kcondvar_t      svr_cv;
   41         boolean_t       svr_thread_exit;
   42 
   43         /*
   44          * New mappings to write out each txg.
   45          */
   46         list_t          svr_new_segments[TXG_SIZE];
   47 
   48         /*
   49          * Ranges that were freed while a mapping was in flight.  This is
   50          * a subset of the ranges covered by vdev_im_new_segments.
   51          */
   52         range_tree_t    *svr_frees[TXG_SIZE];
   53 
   54         /*
   55          * Number of bytes which we have finished our work for
   56          * in each txg.  This could be data copied (which will be part of
   57          * the mappings in vdev_im_new_segments), or data freed before
   58          * we got around to copying it.
   59          */
   60         uint64_t        svr_bytes_done[TXG_SIZE];
   61 
   62         /* List of leaf zap objects to be unlinked */
   63         nvlist_t        *svr_zaplist;
   64 } spa_vdev_removal_t;
   65 
   66 typedef struct spa_condensing_indirect {
   67         /*
   68          * New mappings to write out each txg.
   69          */
   70         list_t          sci_new_mapping_entries[TXG_SIZE];
   71 
   72         vdev_indirect_mapping_t *sci_new_mapping;
   73 } spa_condensing_indirect_t;
   74 
   75 extern int spa_remove_init(spa_t *);
   76 extern void spa_restart_removal(spa_t *);
   77 extern int spa_condense_init(spa_t *);
   78 extern void spa_condense_fini(spa_t *);
   79 extern void spa_start_indirect_condensing_thread(spa_t *);
   80 extern void spa_vdev_condense_suspend(spa_t *);
   81 extern int spa_vdev_remove(spa_t *, uint64_t, boolean_t);
   82 extern void free_from_removing_vdev(vdev_t *, uint64_t, uint64_t);
   83 extern int spa_removal_get_stats(spa_t *, pool_removal_stat_t *);
   84 extern void svr_sync(spa_t *, dmu_tx_t *);
   85 extern void spa_vdev_remove_suspend(spa_t *);
   86 extern int spa_vdev_remove_cancel(spa_t *);
   87 extern void spa_vdev_removal_destroy(spa_vdev_removal_t *);
   88 extern uint64_t spa_remove_max_segment(spa_t *);
   89 
   90 extern uint_t vdev_removal_max_span;
   91 
   92 #ifdef  __cplusplus
   93 }
   94 #endif
   95 
   96 #endif  /* _SYS_VDEV_REMOVAL_H */

Cache object: e4edef2cbba5ec57aae6b70723b61a28


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.