mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Remove bcopy(), bzero(), bcmp()
bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12996
This commit is contained in:
@@ -227,7 +227,7 @@ vdev_rebuild_initiate_sync(void *arg, dmu_tx_t *tx)
|
||||
spa_feature_incr(vd->vdev_spa, SPA_FEATURE_DEVICE_REBUILD, tx);
|
||||
|
||||
mutex_enter(&vd->vdev_rebuild_lock);
|
||||
bzero(vrp, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
memset(vrp, 0, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
vrp->vrp_rebuild_state = VDEV_REBUILD_ACTIVE;
|
||||
vrp->vrp_min_txg = 0;
|
||||
vrp->vrp_max_txg = dmu_tx_get_txg(tx);
|
||||
@@ -448,7 +448,7 @@ vdev_rebuild_clear_sync(void *arg, dmu_tx_t *tx)
|
||||
}
|
||||
|
||||
clear_rebuild_bytes(vd);
|
||||
bzero(vrp, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
memset(vrp, 0, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
|
||||
if (vd->vdev_top_zap != 0 && zap_contains(mos, vd->vdev_top_zap,
|
||||
VDEV_TOP_ZAP_VDEV_REBUILD_PHYS) == 0) {
|
||||
@@ -701,7 +701,7 @@ vdev_rebuild_load(vdev_t *vd)
|
||||
vd->vdev_rebuilding = B_FALSE;
|
||||
|
||||
if (!spa_feature_is_enabled(spa, SPA_FEATURE_DEVICE_REBUILD)) {
|
||||
bzero(vrp, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
memset(vrp, 0, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
mutex_exit(&vd->vdev_rebuild_lock);
|
||||
return (SET_ERROR(ENOTSUP));
|
||||
}
|
||||
@@ -718,7 +718,7 @@ vdev_rebuild_load(vdev_t *vd)
|
||||
* status allowing a new resilver/rebuild to be started.
|
||||
*/
|
||||
if (err == ENOENT || err == EOVERFLOW || err == ECKSUM) {
|
||||
bzero(vrp, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
memset(vrp, 0, sizeof (uint64_t) * REBUILD_PHYS_ENTRIES);
|
||||
} else if (err) {
|
||||
mutex_exit(&vd->vdev_rebuild_lock);
|
||||
return (err);
|
||||
@@ -1111,7 +1111,7 @@ vdev_rebuild_get_stats(vdev_t *tvd, vdev_rebuild_stat_t *vrs)
|
||||
tvd->vdev_top_zap, VDEV_TOP_ZAP_VDEV_REBUILD_PHYS);
|
||||
|
||||
if (error == ENOENT) {
|
||||
bzero(vrs, sizeof (vdev_rebuild_stat_t));
|
||||
memset(vrs, 0, sizeof (vdev_rebuild_stat_t));
|
||||
vrs->vrs_state = VDEV_REBUILD_NONE;
|
||||
error = 0;
|
||||
} else if (error == 0) {
|
||||
|
||||
Reference in New Issue
Block a user