Merge commit 'refs/top-bases/linux-libspl' into linux-libspl
This commit is contained in:
commit
547471e842
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of the ZFS Linux port.
|
* This file is part of the ZFS Linux port.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008 Lawrence Livermore National Security, LLC.
|
* Copyright (c) 2009 Lawrence Livermore National Security, LLC.
|
||||||
* Produced at Lawrence Livermore National Laboratory
|
* Produced at Lawrence Livermore National Laboratory
|
||||||
* Written by:
|
* Written by:
|
||||||
* Brian Behlendorf <behlendorf1@llnl.gov>,
|
* Brian Behlendorf <behlendorf1@llnl.gov>,
|
||||||
|
|
|
@ -4069,7 +4069,7 @@ int
|
||||||
zfs_hold(zfs_handle_t *zhp, const char *snapname, const char *tag,
|
zfs_hold(zfs_handle_t *zhp, const char *snapname, const char *tag,
|
||||||
boolean_t recursive)
|
boolean_t recursive)
|
||||||
{
|
{
|
||||||
zfs_cmd_t zc = { 0 };
|
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
|
||||||
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
||||||
|
|
||||||
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
|
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
|
||||||
|
@ -4107,7 +4107,7 @@ int
|
||||||
zfs_release(zfs_handle_t *zhp, const char *snapname, const char *tag,
|
zfs_release(zfs_handle_t *zhp, const char *snapname, const char *tag,
|
||||||
boolean_t recursive)
|
boolean_t recursive)
|
||||||
{
|
{
|
||||||
zfs_cmd_t zc = { 0 };
|
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
|
||||||
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
||||||
|
|
||||||
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
|
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
|
||||||
|
|
|
@ -1023,13 +1023,14 @@ vdev_open_children(vdev_t *vd)
|
||||||
{
|
{
|
||||||
taskq_t *tq;
|
taskq_t *tq;
|
||||||
int children = vd->vdev_children;
|
int children = vd->vdev_children;
|
||||||
|
int c;
|
||||||
|
|
||||||
tq = taskq_create("vdev_open", children, minclsyspri,
|
tq = taskq_create("vdev_open", children, minclsyspri,
|
||||||
children, children, TASKQ_PREPOPULATE);
|
children, children, TASKQ_PREPOPULATE);
|
||||||
|
|
||||||
for (int c = 0; c < children; c++)
|
for (c = 0; c < children; c++)
|
||||||
VERIFY(taskq_dispatch(tq, vdev_open_child, vd->vdev_child[c],
|
VERIFY(taskq_dispatch(tq, vdev_open_child, vd->vdev_child[c],
|
||||||
TQ_SLEEP) != NULL);
|
TQ_SLEEP) != 0);
|
||||||
|
|
||||||
taskq_destroy(tq);
|
taskq_destroy(tq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
{
|
{
|
||||||
int numerrors = 0;
|
int numerrors = 0;
|
||||||
int lasterror = 0;
|
int lasterror = 0;
|
||||||
|
int c;
|
||||||
|
|
||||||
if (vd->vdev_children == 0) {
|
if (vd->vdev_children == 0) {
|
||||||
vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
|
vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
|
||||||
|
@ -134,7 +135,7 @@ vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
|
|
||||||
vdev_open_children(vd);
|
vdev_open_children(vd);
|
||||||
|
|
||||||
for (int c = 0; c < vd->vdev_children; c++) {
|
for (c = 0; c < vd->vdev_children; c++) {
|
||||||
vdev_t *cvd = vd->vdev_child[c];
|
vdev_t *cvd = vd->vdev_child[c];
|
||||||
|
|
||||||
if (cvd->vdev_open_error) {
|
if (cvd->vdev_open_error) {
|
||||||
|
@ -158,7 +159,9 @@ vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
static void
|
static void
|
||||||
vdev_mirror_close(vdev_t *vd)
|
vdev_mirror_close(vdev_t *vd)
|
||||||
{
|
{
|
||||||
for (int c = 0; c < vd->vdev_children; c++)
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < vd->vdev_children; c++)
|
||||||
vdev_close(vd->vdev_child[c]);
|
vdev_close(vd->vdev_child[c]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ vdev_raidz_matrix_reconstruct(raidz_map_t *rm, int n, int nmissing,
|
||||||
uint64_t ccount;
|
uint64_t ccount;
|
||||||
uint8_t *dst[VDEV_RAIDZ_MAXPARITY];
|
uint8_t *dst[VDEV_RAIDZ_MAXPARITY];
|
||||||
uint64_t dcount[VDEV_RAIDZ_MAXPARITY];
|
uint64_t dcount[VDEV_RAIDZ_MAXPARITY];
|
||||||
uint8_t log, val;
|
uint8_t log = 0, val;
|
||||||
int ll;
|
int ll;
|
||||||
uint8_t *invlog[VDEV_RAIDZ_MAXPARITY];
|
uint8_t *invlog[VDEV_RAIDZ_MAXPARITY];
|
||||||
uint8_t *p, *pp;
|
uint8_t *p, *pp;
|
||||||
|
@ -1506,7 +1506,7 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
|
||||||
void *orig[VDEV_RAIDZ_MAXPARITY];
|
void *orig[VDEV_RAIDZ_MAXPARITY];
|
||||||
int tstore[VDEV_RAIDZ_MAXPARITY + 2];
|
int tstore[VDEV_RAIDZ_MAXPARITY + 2];
|
||||||
int *tgts = &tstore[1];
|
int *tgts = &tstore[1];
|
||||||
int current, next, i, c, n;
|
int curr, next, i, c, n;
|
||||||
int code, ret = 0;
|
int code, ret = 0;
|
||||||
|
|
||||||
ASSERT(total_errors < rm->rm_firstdatacol);
|
ASSERT(total_errors < rm->rm_firstdatacol);
|
||||||
|
@ -1554,12 +1554,12 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
|
||||||
|
|
||||||
orig[n - 1] = zio_buf_alloc(rm->rm_col[0].rc_size);
|
orig[n - 1] = zio_buf_alloc(rm->rm_col[0].rc_size);
|
||||||
|
|
||||||
current = 0;
|
curr = 0;
|
||||||
next = tgts[current];
|
next = tgts[curr];
|
||||||
|
|
||||||
while (current != n) {
|
while (curr != n) {
|
||||||
tgts[current] = next;
|
tgts[curr] = next;
|
||||||
current = 0;
|
curr = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save off the original data that we're going to
|
* Save off the original data that we're going to
|
||||||
|
@ -1606,34 +1606,34 @@ vdev_raidz_combrec(zio_t *zio, int total_errors, int data_errors)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
/*
|
/*
|
||||||
* Find the next valid column after the current
|
* Find the next valid column after the curr
|
||||||
* position..
|
* position..
|
||||||
*/
|
*/
|
||||||
for (next = tgts[current] + 1;
|
for (next = tgts[curr] + 1;
|
||||||
next < rm->rm_cols &&
|
next < rm->rm_cols &&
|
||||||
rm->rm_col[next].rc_error != 0; next++)
|
rm->rm_col[next].rc_error != 0; next++)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ASSERT(next <= tgts[current + 1]);
|
ASSERT(next <= tgts[curr + 1]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If that spot is available, we're done here.
|
* If that spot is available, we're done here.
|
||||||
*/
|
*/
|
||||||
if (next != tgts[current + 1])
|
if (next != tgts[curr + 1])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Otherwise, find the next valid column after
|
* Otherwise, find the next valid column after
|
||||||
* the previous position.
|
* the previous position.
|
||||||
*/
|
*/
|
||||||
for (c = tgts[current - 1] + 1;
|
for (c = tgts[curr - 1] + 1;
|
||||||
rm->rm_col[c].rc_error != 0; c++)
|
rm->rm_col[c].rc_error != 0; c++)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tgts[current] = c;
|
tgts[curr] = c;
|
||||||
current++;
|
curr++;
|
||||||
|
|
||||||
} while (current != n);
|
} while (curr != n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
n--;
|
n--;
|
||||||
|
|
|
@ -54,6 +54,7 @@ vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
{
|
{
|
||||||
int lasterror = 0;
|
int lasterror = 0;
|
||||||
int numerrors = 0;
|
int numerrors = 0;
|
||||||
|
int c;
|
||||||
|
|
||||||
if (vd->vdev_children == 0) {
|
if (vd->vdev_children == 0) {
|
||||||
vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
|
vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
|
||||||
|
@ -62,7 +63,7 @@ vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
|
|
||||||
vdev_open_children(vd);
|
vdev_open_children(vd);
|
||||||
|
|
||||||
for (int c = 0; c < vd->vdev_children; c++) {
|
for (c = 0; c < vd->vdev_children; c++) {
|
||||||
vdev_t *cvd = vd->vdev_child[c];
|
vdev_t *cvd = vd->vdev_child[c];
|
||||||
|
|
||||||
if (cvd->vdev_open_error && !cvd->vdev_islog) {
|
if (cvd->vdev_open_error && !cvd->vdev_islog) {
|
||||||
|
@ -85,7 +86,9 @@ vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
|
||||||
static void
|
static void
|
||||||
vdev_root_close(vdev_t *vd)
|
vdev_root_close(vdev_t *vd)
|
||||||
{
|
{
|
||||||
for (int c = 0; c < vd->vdev_children; c++)
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < vd->vdev_children; c++)
|
||||||
vdev_close(vd->vdev_child[c]);
|
vdev_close(vd->vdev_child[c]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ EXTRA_DIST = zfs-update.sh $(nobase_pkglibexec_SCRIPTS)
|
||||||
|
|
||||||
ZFS=${top_srcdir}/scripts/zfs.sh
|
ZFS=${top_srcdir}/scripts/zfs.sh
|
||||||
ZTEST=${top_builddir}/cmd/ztest/ztest
|
ZTEST=${top_builddir}/cmd/ztest/ztest
|
||||||
ZPIOS=${top_srcdir}/scripts/zpios.sh
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@$(ZFS) -v
|
@$(ZFS) -v
|
||||||
|
|
Loading…
Reference in New Issue