git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Evict meta data from ghost lists + l2arc headers
[zfs.git]
/
module
/
zfs
/
spa.c
diff --git
a/module/zfs/spa.c
b/module/zfs/spa.c
index
82ee445
..
65f78b7
100644
(file)
--- a/
module/zfs/spa.c
+++ b/
module/zfs/spa.c
@@
-64,6
+64,7
@@
#include <sys/zfs_ioctl.h>
#include <sys/dsl_scan.h>
#include <sys/zfeature.h>
#include <sys/zfs_ioctl.h>
#include <sys/dsl_scan.h>
#include <sys/zfeature.h>
+#include <sys/zvol.h>
#ifdef _KERNEL
#include <sys/bootprops.h>
#ifdef _KERNEL
#include <sys/bootprops.h>
@@
-920,7
+921,7
@@
spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
if (tqs->stqs_count == 1) {
tq = tqs->stqs_taskq[0];
} else {
if (tqs->stqs_count == 1) {
tq = tqs->stqs_taskq[0];
} else {
- tq = tqs->stqs_taskq[
gethrtime(
) % tqs->stqs_count];
+ tq = tqs->stqs_taskq[
((uint64_t)gethrtime()
) % tqs->stqs_count];
}
taskq_dispatch_ent(tq, func, arg, flags, ent);
}
taskq_dispatch_ent(tq, func, arg, flags, ent);
@@
-943,7
+944,7
@@
spa_taskq_dispatch_sync(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
if (tqs->stqs_count == 1) {
tq = tqs->stqs_taskq[0];
} else {
if (tqs->stqs_count == 1) {
tq = tqs->stqs_taskq[0];
} else {
- tq = tqs->stqs_taskq[
gethrtime(
) % tqs->stqs_count];
+ tq = tqs->stqs_taskq[
((uint64_t)gethrtime()
) % tqs->stqs_count];
}
id = taskq_dispatch(tq, func, arg, flags);
}
id = taskq_dispatch(tq, func, arg, flags);
@@
-1856,7
+1857,7
@@
spa_load_verify_done(zio_t *zio)
/*ARGSUSED*/
static int
spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
/*ARGSUSED*/
static int
spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
-
arc_buf_t *pbuf,
const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg)
+ const zbookmark_t *zb, const dnode_phys_t *dnp, void *arg)
{
if (bp != NULL) {
zio_t *rio = arg;
{
if (bp != NULL) {
zio_t *rio = arg;
@@
-2856,6
+2857,7
@@
spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
spa_load_state_t state = SPA_LOAD_OPEN;
int error;
int locked = B_FALSE;
spa_load_state_t state = SPA_LOAD_OPEN;
int error;
int locked = B_FALSE;
+ int firstopen = B_FALSE;
*spapp = NULL;
*spapp = NULL;
@@
-2879,6
+2881,8
@@
spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
if (spa->spa_state == POOL_STATE_UNINITIALIZED) {
zpool_rewind_policy_t policy;
if (spa->spa_state == POOL_STATE_UNINITIALIZED) {
zpool_rewind_policy_t policy;
+ firstopen = B_TRUE;
+
zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config,
&policy);
if (policy.zrp_request & ZPOOL_DO_REWIND)
zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config,
&policy);
if (policy.zrp_request & ZPOOL_DO_REWIND)
@@
-2953,6
+2957,11
@@
spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
mutex_exit(&spa_namespace_lock);
}
mutex_exit(&spa_namespace_lock);
}
+#ifdef _KERNEL
+ if (firstopen)
+ zvol_create_minors(spa->spa_name);
+#endif
+
*spapp = spa;
return (0);
*spapp = spa;
return (0);
@@
-4010,6
+4019,10
@@
spa_import(const char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
mutex_exit(&spa_namespace_lock);
spa_history_log_version(spa, LOG_POOL_IMPORT);
mutex_exit(&spa_namespace_lock);
spa_history_log_version(spa, LOG_POOL_IMPORT);
+#ifdef _KERNEL
+ zvol_create_minors(pool);
+#endif
+
return (0);
}
return (0);
}
@@
-5162,7
+5175,7
@@
spa_vdev_remove_evacuate(spa_t *spa, vdev_t *vd)
* The evacuation succeeded. Remove any remaining MOS metadata
* associated with this vdev, and wait for these changes to sync.
*/
* The evacuation succeeded. Remove any remaining MOS metadata
* associated with this vdev, and wait for these changes to sync.
*/
- ASSERT
3U(vd->vdev_stat.vs_alloc, ==, 0
);
+ ASSERT
0(vd->vdev_stat.vs_alloc
);
txg = spa_vdev_config_enter(spa);
vd->vdev_removing = B_TRUE;
vdev_dirty(vd, 0, NULL, txg);
txg = spa_vdev_config_enter(spa);
vd->vdev_removing = B_TRUE;
vdev_dirty(vd, 0, NULL, txg);
@@
-6163,7
+6176,7
@@
spa_sync(spa_t *spa, uint64_t txg)
zio_t *zio = zio_root(spa, NULL, NULL, 0);
VERIFY3U(bpobj_iterate(defer_bpo,
spa_free_sync_cb, zio, tx), ==, 0);
zio_t *zio = zio_root(spa, NULL, NULL, 0);
VERIFY3U(bpobj_iterate(defer_bpo,
spa_free_sync_cb, zio, tx), ==, 0);
- VERIFY
3U(zio_wait(zio), ==, 0
);
+ VERIFY
0(zio_wait(zio)
);
}
/*
}
/*