From e85cafdfac4f5bf29c1165ad9dc77dca9769e9ee Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 19 Apr 2015 23:45:04 +0000 Subject: [PATCH 1/4] Sync Makefile.files to illumos-gate@244781f10dcd82684fd8163c016540667842f203. --- uts/common/Makefile.files | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/uts/common/Makefile.files b/uts/common/Makefile.files index a564615ed740..8d9abca90695 100644 --- a/uts/common/Makefile.files +++ b/uts/common/Makefile.files @@ -21,9 +21,9 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2013 by Delphix. All rights reserved. # Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +# Copyright 2014 Nexenta Systems, Inc. All rights reserved. # # @@ -1328,6 +1328,7 @@ TRANS_OBJS += mdtrans.o trans_ioctl.o trans_log.o ZFS_COMMON_OBJS += \ arc.o \ + blkptr.o \ bplist.o \ bpobj.o \ bptree.o \ @@ -1360,6 +1361,7 @@ ZFS_COMMON_OBJS += \ lz4.o \ lzjb.o \ metaslab.o \ + multilist.o \ range_tree.o \ refcount.o \ rrwlock.o \ @@ -1846,7 +1848,8 @@ ZYD_OBJS += zyd.o zyd_usb.o zyd_hw.o zyd_fw.o MXFE_OBJS += mxfe.o -MPTSAS_OBJS += mptsas.o mptsas_impl.o mptsas_init.o mptsas_raid.o mptsas_smhba.o +MPTSAS_OBJS += mptsas.o mptsas_hash.o mptsas_impl.o mptsas_init.o \ + mptsas_raid.o mptsas_smhba.o SFE_OBJS += sfe.o sfe_util.o @@ -1865,6 +1868,8 @@ ATGE_OBJS += atge_main.o atge_l1e.o atge_mii.o atge_l1.o atge_l1c.o YGE_OBJS = yge.o +SKD_OBJS = skd.o + # # Build up defines and paths. # From c20c6dfa6853718c1f6ba557f6762149ce376ce2 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Tue, 28 Apr 2015 07:14:08 +0000 Subject: [PATCH 2/4] 5610 zfs clone from different source and target pools produces coredump Author: Alexander Eremin Reviewed by: Josef 'Jeff' Sipek Reviewed by: Matthew Ahrens Approved by: Dan McDonald illumos/illumos-gate@03b1c2971d24a9cd2c073d634f7e074fbd14e984 --- uts/common/fs/zfs/dmu_objset.c | 13 ++----------- uts/common/fs/zfs/dsl_dir.c | 3 ++- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/uts/common/fs/zfs/dmu_objset.c b/uts/common/fs/zfs/dmu_objset.c index 8593e2c94f6c..2732d989929f 100644 --- a/uts/common/fs/zfs/dmu_objset.c +++ b/uts/common/fs/zfs/dmu_objset.c @@ -24,6 +24,7 @@ * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -904,11 +905,7 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx) dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -921,12 +918,6 @@ dmu_objset_clone_check(void *arg, dmu_tx_t *tx) if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!origin->ds_is_snapshot) { dsl_dataset_rele(origin, FTAG); diff --git a/uts/common/fs/zfs/dsl_dir.c b/uts/common/fs/zfs/dsl_dir.c index ee69cc8dbffe..6a20ab3ca2ad 100644 --- a/uts/common/fs/zfs/dsl_dir.c +++ b/uts/common/fs/zfs/dsl_dir.c @@ -24,6 +24,7 @@ * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -421,7 +422,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag, /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From 9696b15081a6b817a57d742293ca7c9c21485cd5 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Tue, 28 Apr 2015 07:15:34 +0000 Subject: [PATCH 3/4] 5393 spurious failures from dsl_dataset_hold_obj() Author: Justin T. Gibbs Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Reviewed by: Prakash Surya Reviewed by: Steven Hartland Approved by: Dan McDonald illumos/illumos-gate@e1f3c208abda53769a6531bb1141618555273460 --- uts/common/fs/zfs/dsl_dataset.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/uts/common/fs/zfs/dsl_dataset.c b/uts/common/fs/zfs/dsl_dataset.c index d3ca43af47d1..ec2d022aed39 100644 --- a/uts/common/fs/zfs/dsl_dataset.c +++ b/uts/common/fs/zfs/dsl_dataset.c @@ -405,11 +405,12 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uint64_t dsobj, void *tag, offsetof(dmu_sendarg_t, dsa_link)); if (doi.doi_type == DMU_OTN_ZAP_METADATA) { - err = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); - if (err == 0) + int zaperr = zap_contains(mos, dsobj, + DS_FIELD_LARGE_BLOCKS); + if (zaperr != ENOENT) { + VERIFY0(zaperr); ds->ds_large_blocks = B_TRUE; - else - ASSERT3U(err, ==, ENOENT); + } } if (err == 0) { From f43d56620fe5ad0c7545e06c499aaf85eebe48a7 Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Fri, 8 May 2015 13:55:24 +0000 Subject: [PATCH 4/4] 5809 Blowaway full receive in v1 pool causes kernel panic Author: Paul Dagnelie Reviewed by: Matthew Ahrens Reviewed by: Alex Reece Reviewed by: Will Andrews Approved by: Gordon Ross illumos/illumos-gate@f40b29ce2a815bcc0787acf6f520a2b74258b785 --- uts/common/fs/zfs/dmu_send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uts/common/fs/zfs/dmu_send.c b/uts/common/fs/zfs/dmu_send.c index 3c156054877b..acc9f28f9d44 100644 --- a/uts/common/fs/zfs/dmu_send.c +++ b/uts/common/fs/zfs/dmu_send.c @@ -1108,7 +1108,8 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t *tx) } dsobj = dsl_dataset_create_sync(ds->ds_dir, recv_clone_name, snap, crflags, drba->drba_cred, tx); - dsl_dataset_rele(snap, FTAG); + if (drba->drba_snapobj != 0) + dsl_dataset_rele(snap, FTAG); dsl_dataset_rele(ds, FTAG); } else { dsl_dir_t *dd;