mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
OpenZFS 6676 - Race between unique_insert() and unique_remove() causes ZFS fsid change
Authored by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com> Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com> Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com> Reviewed by: Dan Vatca <dan.vatca@gmail.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/6676 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/40510e8 Closes #5667
This commit is contained in:
committed by
Brian Behlendorf
parent
aeacdefedc
commit
39efbde7c5
+6
-4
@@ -21,7 +21,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -1297,7 +1297,7 @@ sa_build_index(sa_handle_t *hdl, sa_buf_type_t buftype)
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
sa_evict(void *dbu)
|
||||
sa_evict_sync(void *dbu)
|
||||
{
|
||||
panic("evicting sa dbuf\n");
|
||||
}
|
||||
@@ -1394,7 +1394,8 @@ sa_handle_get_from_db(objset_t *os, dmu_buf_t *db, void *userp,
|
||||
sa_handle_t *winner = NULL;
|
||||
|
||||
handle = kmem_cache_alloc(sa_cache, KM_SLEEP);
|
||||
handle->sa_dbu.dbu_evict_func = NULL;
|
||||
handle->sa_dbu.dbu_evict_func_sync = NULL;
|
||||
handle->sa_dbu.dbu_evict_func_async = NULL;
|
||||
handle->sa_userp = userp;
|
||||
handle->sa_bonus = db;
|
||||
handle->sa_os = os;
|
||||
@@ -1405,7 +1406,8 @@ sa_handle_get_from_db(objset_t *os, dmu_buf_t *db, void *userp,
|
||||
error = sa_build_index(handle, SA_BONUS);
|
||||
|
||||
if (hdl_type == SA_HDL_SHARED) {
|
||||
dmu_buf_init_user(&handle->sa_dbu, sa_evict, NULL);
|
||||
dmu_buf_init_user(&handle->sa_dbu, sa_evict_sync, NULL,
|
||||
NULL);
|
||||
winner = dmu_buf_set_user_ie(db, &handle->sa_dbu);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user