/freebsd/sys/dev/enic/ |
H A D | vnic_dev.h | 53 void *vnic_dev_priv(struct vnic_dev *vdev); 54 unsigned int vnic_dev_get_res_count(struct vnic_dev *vdev, 56 void vnic_register_cbacks(struct vnic_dev *vdev, 62 void __iomem *vnic_dev_get_res(struct vnic_dev *vdev, enum vnic_res_type type, 64 uint8_t vnic_dev_get_res_bar(struct vnic_dev *vdev, 66 uint32_t vnic_dev_get_res_offset(struct vnic_dev *vdev, 68 unsigned long vnic_dev_get_res_type_len(struct vnic_dev *vdev, 72 int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring *ring, 74 void vnic_dev_free_desc_ring(struct vnic_dev *vdev, 76 int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, [all …]
|
H A D | vnic_dev.c | 20 void *vnic_dev_priv(struct vnic_dev *vdev) in vnic_dev_priv() argument 22 return vdev->priv; in vnic_dev_priv() 25 void vnic_register_cbacks(struct vnic_dev *vdev, in vnic_register_cbacks() argument 32 vdev->alloc_consistent = alloc_consistent; in vnic_register_cbacks() 33 vdev->free_consistent = free_consistent; in vnic_register_cbacks() 36 static int vnic_dev_discover_res(struct vnic_dev *vdev, in vnic_dev_discover_res() argument 39 struct enic_softc *softc = vdev->softc; in vnic_dev_discover_res() 107 vdev->res[type].count = count; in vnic_dev_discover_res() 108 bcopy(&softc->mem, &vdev->res[type].bar, sizeof(softc->mem)); in vnic_dev_discover_res() 109 vdev->res[type].bar.offset = bar_offset; in vnic_dev_discover_res() [all …]
|
H A D | vnic_wq.c | 10 int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev, in vnic_dev_alloc_desc_ring() argument 18 device_printf(dev_from_vnic_dev(vdev), in vnic_dev_alloc_desc_ring() 23 err = iflib_dma_alloc(vdev->softc->ctx, desc_count * desc_size, in vnic_dev_alloc_desc_ring() 26 device_printf(dev_from_vnic_dev(vdev), in vnic_dev_alloc_desc_ring() 53 void vnic_dev_free_desc_ring(struct vnic_dev *vdev, struct vnic_dev_ring *ring) in vnic_dev_free_desc_ring() argument 63 vnic_dev_free_desc_ring(wq->vdev, &wq->ring); in vnic_wq_free() 67 int enic_wq_devcmd2_alloc(struct vnic_dev *vdev, struct vnic_wq *wq, in enic_wq_devcmd2_alloc() argument 73 wq->vdev = vdev; in enic_wq_devcmd2_alloc() 76 wq->ctrl = vnic_dev_get_res(vdev, RES_TYPE_DEVCMD2, 0); in enic_wq_devcmd2_alloc() 80 err = vnic_dev_alloc_desc_ring(vdev, &wq->ring, desc_count, desc_size); in enic_wq_devcmd2_alloc() [all …]
|
H A D | if_enic.c | 311 speed = vnic_dev_port_speed(enic->vdev); in enic_set_rx_coal_setting() 336 struct vnic_dev *vdev; in enic_attach_pre() local 371 vdev = &softc->vdev; in enic_attach_pre() 372 vdev->softc = softc; in enic_attach_pre() 373 enic->vdev = vdev; in enic_attach_pre() 374 vdev->priv = enic; in enic_attach_pre() 377 vnic_dev_register(vdev, &softc->mem, 1); in enic_attach_pre() 378 enic->vdev = vdev; in enic_attach_pre() 379 vnic_dev_cmd_init(enic->vdev); in enic_attach_pre() 381 vdev->devcmd = vnic_dev_get_res(vdev, RES_TYPE_DEVCMD, 0); in enic_attach_pre() [all …]
|
/freebsd/cddl/usr.sbin/zfsd/ |
H A D | vdev.h | 34 * \file vdev.h 36 * Definition of the Vdev class. 56 /*----------------------------------- Vdev -----------------------------------*/ 58 * \brief Wrapper class for a vdev's name/value configuration list 59 * simplifying access to commonly used vdev attributes. 61 class Vdev 65 * \brief Instantiate a vdev object for a vdev that is a member 68 * \param pool The pool object containing the vdev with 70 * \param vdevConfig Vdev configuratio [all...] |
H A D | case_file.h | 36 * CaseFile objects aggregate vdev faults that may require ZFSD action 51 class Vdev; variable 62 * A CaseFile object is instantiated anytime a vdev for an active pool 66 * A vdev may have at most one CaseFile. 68 * CaseFiles are retired when a vdev leaves an active pool configuration 71 * Logging a case against a vdev does not imply that an immediate action 76 * Vdev I/O errors are not recorded in ZFS label inforamation. For this 87 * \brief Find a CaseFile object by a vdev's pool/vdev GUID tuple. 89 * \param poolGUID Pool GUID for the vdev of the CaseFile to find. 90 * If InvalidGuid, then only match the vdev GUID [all …]
|
H A D | vdev.cc | 34 * \file vdev.cc 36 * Implementation of the Vdev class. 61 #include "vdev.h" 71 Vdev NonexistentVdev; 73 //- Vdev Inline Public Methods ------------------------------------------------ 75 /*----------------------------------- Vdev -----------------------------------*/ 78 Vdev::Vdev() in Vdev() function in Vdev 84 Vdev::VdevLookupPoolGuid() in VdevLookupPoolGuid() 94 Vdev::VdevLookupGuid() in VdevLookupGuid() 98 throw ZfsdException("Unable to extract vdev GUID " in VdevLookupGuid() [all …]
|
H A D | case_file.cc | 36 * We keep case files for any leaf vdev that is not in the optimal state. 73 #include "vdev.h" 109 * We only carry one active case per-vdev. in Find() 173 CaseFile::Create(Vdev &vdev) in Create() argument 177 activeCase = Find(vdev.PoolGUID(), vdev.GUID()); in Create() 179 activeCase = new CaseFile(vdev); in Create() 252 Vdev vd(casePool, CaseVdev(casePool)); in RefreshVdevState() 263 CaseFile::ReEvaluate(const string &devPath, const string &physPath, Vdev *vdev) in ReEvaluate() argument 271 * The pool or vdev for this case file is no longer in ReEvaluate() 278 "CaseFile::ReEvaluate(%s,%s) Pool/Vdev unconfigured. " in ReEvaluate() [all …]
|
H A D | zfsd.8 | 70 When a leaf vdev disappears, 77 If it matches a previously removed vdev on an active pool, 83 physical path of a previously removed vdev on an active pool, and that 86 will replace the missing vdev with the newly arrived device. 88 .It vdev degrade or fault events 89 If a vdev becomes degraded or faulted, 93 By default, if a leaf vdev generates more than 50 I/O errors in a 60 second 96 will mark that vdev as 105 vdev properties. See 109 By default, if a leaf vdev generates more than delayed 8 I/O events in a 60 [all …]
|
H A D | vdev_iterator.h | 52 class Vdev; variable 56 typedef bool VdevCallback_t(Vdev &vdev, void *cbArg); 87 * \brief Report the leaf vdev at this iterator's cursor and increment 94 * first member, returning a vdev object with the given 95 * vdev GUID if found. 97 * \param vdevGUID The vdev GUID of the vdev object to find. 99 * \return A Vdev object for the matching vdev if found. Otherwise 102 * Upon return, the VdevIterator's cursor points to the vdev just 103 * past the returned vdev or end() if no matching vdev is found. 109 * a pool's vdev membership.
|
H A D | zfsd_event.cc | 67 #include "vdev.h" 156 caseFile->ReEvaluate(devPath, physPath, /*vdev*/NULL); in Process() 209 Vdev vdev(devLabel); in ReadLabel() local 210 degraded = vdev.State() != VDEV_STATE_HEALTHY; in ReadLabel() 238 syslog(LOG_INFO, "Interrogating VDEV label for %s\n", in OnlineByLabel() 240 Vdev vdev(devConfig); in OnlineByLabel() local 241 CaseFile::Find(vdev.PoolGUID(),vdev.GUID(), case_list); in OnlineByLabel() 244 ret |= (*curr)->ReEvaluate(devPath, physPath, &vdev); in OnlineByLabel() 304 /* Only currently interested in Vdev related events. */ in Process() 319 if (Value("class").find("fs.zfs.vdev.no_replicas") == 0) { in Process() [all …]
|
/freebsd/sys/contrib/openzfs/man/man7/ |
H A D | vdevprops.7 | 45 Every vdev has a set of properties that export statistics about the vdev 65 vdev. 69 Percentage of vdev space used 71 state of this vdev such as online, faulted, or offline 73 globally unique id of this vdev 75 The allocatable size of this vdev 77 The physical size of this vdev 79 The physical sector size of this vdev expressed as the power of two 81 The total size of this vdev 83 The amount of remaining free space on this vdev [all …]
|
/freebsd/sys/contrib/openzfs/man/man8/ |
H A D | zpool-events.8 | 78 .Bl -tag -compact -width "vdev.bad_guid_sum" 82 Issued when there is an I/O error in a vdev in the pool. 117 Issued every time a vdev change have been done to the pool. 129 .It Sy vdev.unknown 130 Issued when the vdev is unknown. 131 Such as trying to clear device errors on a vdev that have failed/been kicked 133 .It Sy vdev.open_failed 134 Issued when a vdev could not be opened (because it didn't exist for example). 135 .It Sy vdev.corrupt_data 136 Issued when corrupt data have been detected on a vdev. [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_split/ |
H A D | zpool_split_vdevs.ksh | 24 # 'zpool split' should only work on mirrors. Every other VDEV layout is not 28 # Create pools with various VDEV layouts and verify only mirrors can be split 41 # Given a vdev type generate a pool configuration which can be immediately 43 # Supported vdev types are: 57 function pool_config # <vdev-type> 75 vdev='' ;; 77 vdev='mirror';; 79 vdev='raidz1';; 81 vdev='raidz2';; 83 vdev='raidz3';; [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/ |
H A D | zpool_add_001_pos.ksh | 38 # 'zpool add <pool> <vdev> ...' can successfully add the specified 55 log_assert "'zpool add <pool> <vdev> ...' can add devices to the pool." 74 typeset vdev 84 for vdev in "${poolarray[@]}"; do 87 log_must zpool add -f "$TESTPOOL" ${keywords[i]} $vdev 88 log_must vdevs_in_pool "$TESTPOOL" "$vdev" 94 for vdev in "${mirrorarray[@]}"; do 98 log_must zpool add "$TESTPOOL" ${keywords[i]} $vdev 99 log_must vdevs_in_pool "$TESTPOOL" "$vdev" 105 for vdev in "${raidzarray[@]}"; do [all …]
|
/freebsd/stand/libsa/zfs/ |
H A D | zfsimpl.c | 58 * The indirect_child_t represents the vdev that we will read from, when we 71 * indirect vdev. For non-split (contiguously-mapped) blocks, there will be 84 vdev_t *is_vdev; /* top-level vdev */ 99 * The indirect_vsd_t is associated with each i/o to the indirect vdev. 100 * It is the "Vdev-Specific Data" in the zio_t's io_vsd. 233 vdev_read_phys(vdev_t *vdev, const blkptr_t *bp, void *buf, in vdev_read_phys() argument 239 if (vdev->v_phys_read == NULL) in vdev_read_phys() 248 rc = vdev->v_phys_read(vdev, vdev->v_priv, offset, buf, psize); in vdev_read_phys() 251 rc = zio_checksum_verify(vdev->v_spa, bp, buf); in vdev_read_phys() 258 vdev_write_phys(vdev_t *vdev, void *buf, off_t offset, size_t size) in vdev_write_phys() argument [all …]
|
/freebsd/sys/contrib/openzfs/include/sys/ |
H A D | vdev_impl.h | 38 #include <sys/vdev.h> 88 * Given a target vdev, translates the logical range "in" to the physical 167 * On-disk indirect vdev state. 169 * An indirect vdev is described exclusively in the MOS config of a pool. 170 * The config for an indirect vdev includes several fields, which are 178 * vdev_indirect_mapping_phys_t. This object is allocated when a vdev 181 * Note that this object can be empty if none of the data on the vdev 191 * is allocated when a vdev removal is initiated. 193 * Note that this object can be empty if none of the vdev has yet been 199 * This is the vdev ID which was removed previous to this vdev, or [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/ |
H A D | zed_slow_io.ksh | 29 # Verify that vdev properties, slow_io_n and slow_io_t, work with ZED. 32 # 1. Create a pool with single vdev 35 # 4. Verify that ZED degrades vdev 41 VDEV="$TEST_BASE_DIR/vdevfile.$$" 52 log_must truncate -s 1G $VDEV 53 default_setup_noexit $VDEV 70 log_must rm -f $VDEV 87 log_must rm -f $VDEV 99 log_must zinject -d $VDEV -D10:1 -T read $TESTPOOL 130 log_note $degrades vdev degrades in ZED log [all …]
|
H A D | zed_io_config.ksh | 28 # Verify that vdev properties, io_n and io_t, work with ZED. 34 # 4. Verify that ZED degrades vdev 43 VDEV="$TEST_BASE_DIR/vdevfile.$$" 55 log_must rm -fd $VDEV $VDEV1 $MOUNTDIR 67 log_must zpool create -f -m $MOUNTDIR $POOL mirror $VDEV $VDEV1 90 log_must zinject -a -d $VDEV -e io -T read -f 100 $POOL 99 log_must wait_vdev_state $POOL $VDEV "FAULTED" 60 109 log_must zpool set io_n=1 $POOL $VDEV 111 log_must zinject -a -d $VDEV -e io -T read -f 100 $POOL 115 log_must wait_vdev_state $POOL $VDEV "FAULTED" 60 [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/replacement/ |
H A D | attach_multiple.ksh | 29 # 1. Create a single vdev pool 31 # a. Attach a vdev to convert the pool to a mirror. 32 # b. Attach a vdev to convert the pool to a 3-way mirror. 33 # c. Verify the original vdev cannot be removed (no redundant copies) 34 # d. Detach a vdev. Healing and sequential resilver remain running. 35 # e. Detach a vdev. Healing resilver remains running, sequential 73 # Attach first vdev (stripe -> mirror) 78 # Attach second vdev (2-way -> 3-way mirror) 83 # Original vdev cannot be detached until there is sufficient redundancy. 86 # Detach first vdev (resilver keeps running) [all …]
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zpool_add/ |
H A D | zpool_add_001_pos.ksh | 36 # 'zpool add <pool> <vdev> ...' can successfully add the specified 56 log_assert "'zpool add <pool> <vdev> ...' can add devices to the pool." 75 typeset vdev 83 for vdev in "${poolarray[@]}"; do 87 $vdev 88 log_must iscontained "$TESTPOOL" "$vdev" 94 for vdev in "${mirrorarray[@]}"; do 99 $vdev 100 log_must iscontained "$TESTPOOL" "$vdev" 106 for vdev in "${raidzarray[@]}"; do [all …]
|
/freebsd/cddl/usr.sbin/zfsd/tests/ |
H A D | zfsd_unittest.cc | 59 #include <zfsd/vdev.h> 128 * A dummy Vdev class used for testing other classes 130 class MockVdev : public Vdev 144 : Vdev(vdevConfig) in MockVdev() 154 static TestableCaseFile &Create(Vdev &vdev); 155 TestableCaseFile(Vdev &vdev); 184 TestableCaseFile::TestableCaseFile(Vdev &vdev) in TestableCaseFile() argument 185 : CaseFile(vdev) in TestableCaseFile() 190 TestableCaseFile::Create(Vdev &vdev) in Create() argument 193 newCase = new TestableCaseFile(vdev); in Create() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zed/agents/ |
H A D | zfs_mod.c | 57 * 6. If the pool has the 'autoreplace' property set, and the matching vdev 94 #define DEV_BYVDEV_PATH "/dev/disk/by-vdev/" 180 * The device associated with the given vdev (either by devid or physical path) 197 zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled) in zfs_process_add() argument 222 * '/dev/disk/by-vdev' directories. Note that this path can change in zfs_process_add() 223 * when a vdev is replaced with a new disk. in zfs_process_add() 225 if (nvlist_lookup_string(vdev, ZPOOL_CONFIG_PATH, &path) != 0) in zfs_process_add() 229 verify(nvlist_lookup_uint64_array(vdev, ZPOOL_CONFIG_VDEV_STATS, in zfs_process_add() 237 (void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_PHYS_PATH, &physpath); in zfs_process_add() 239 update_vdev_config_dev_sysfs_path(vdev, path, in zfs_process_add() [all …]
|
H A D | zfs_retire.c | 36 * marking the vdev FAULTY (for I/O errors) or DEGRADED (for checksum errors). 100 * Find a vdev within a tree with a matching GUID. 113 "matched vdev %llu", guid); in find_vdev() 191 * Given a vdev guid, find and remove all spares associated with it. 206 * Given a (pool, vdev) GUID pair, find the matching pool and vdev. 217 * Find the corresponding pool and make sure the vdev still exists. in find_by_guid() 242 * Given a vdev, attempt to replace it with every known spare until one 247 replace_with_spare(fmd_hdl_t *hdl, zpool_handle_t *zhp, nvlist_t *vdev) in replace_with_spare() argument 278 dev_name = zpool_vdev_name(NULL, zhp, vdev, B_FALSE); in replace_with_spare() 323 * Repair this vdev if we had diagnosed a 'fault.fs.zfs.device' and [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/removal/ |
H A D | remove_expanded.ksh | 30 # vdev. The issue was that the vdev's ms_shift had changed after 31 # it was removed by the addition of another vdev. This test is 58 # Expand vdev. 65 # Fill up the whole vdev. 70 # Add another vdev and remove the first vdev creating indirect 72 # vdev. Wait for removal to finish. 79 # Add a new vdev that will trigger a change in the config. 90 log_pass "Removal of expanded vdev doesn't cause any problems."
|