]> granicus.if.org Git - zfs/commitdiff
Merge commit 'refs/top-bases/gcc-no-parenthesis' into gcc-no-parenthesis
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 May 2010 21:54:33 +0000 (14:54 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 May 2010 21:54:33 +0000 (14:54 -0700)
Conflicts:
lib/libzfs/libzfs_dataset.c
module/zfs/dmu_objset.c
module/zfs/dsl_dataset.c
module/zfs/dsl_pool.c
module/zfs/spa.c
module/zfs/zfs_ioctl.c
module/zfs/zio.c

20 files changed:
1  2 
cmd/zfs/zfs_main.c
lib/libzfs/libzfs_dataset.c
module/nvpair/nvpair.c
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dmu_objset.c
module/zfs/dmu_tx.c
module/zfs/dnode.c
module/zfs/dnode_sync.c
module/zfs/dsl_deleg.c
module/zfs/dsl_dir.c
module/zfs/dsl_pool.c
module/zfs/dsl_prop.c
module/zfs/dsl_synctask.c
module/zfs/refcount.c
module/zfs/spa.c
module/zfs/vdev.c
module/zfs/zap_micro.c
module/zfs/zfs_fuid.c
module/zfs/zfs_ioctl.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a5c949ec083ff01939b7ca8bda9842def7a45b52,690e6ecdee6ab84e5611ee49ca8ca295fb25c97a..22c0f6f0a3e609bd999d3c8d5b15d1869419ed6e
@@@ -1041,12 -1124,8 +1124,8 @@@ dmu_objset_do_userquota_updates(objset_
  
        ASSERT(list_head(list) == NULL || dmu_objset_userused_enabled(os));
  
 -      while (dn = list_head(list)) {
 +      while ((dn = list_head(list))) {
-               dmu_object_type_t bonustype;
                ASSERT(!DMU_OBJECT_IS_SPECIAL(dn->dn_object));
-               ASSERT(dn->dn_oldphys);
                ASSERT(dn->dn_phys->dn_type == DMU_OT_NONE ||
                    dn->dn_phys->dn_flags &
                    DNODE_FLAG_USERUSED_ACCOUNTED);
Simple merge
Simple merge
index 511552ba48b8c6c9b11dd874ebf21fe30d2f150e,f9ec9f6023d2abc3c4feb63c2111756cd2ce58b9..3df63f255a0eedcb45359a7086b9f7d52baf1694
@@@ -590,8 -611,15 +611,15 @@@ dnode_sync(dnode_t *dn, dmu_tx_t *tx
  
        mutex_exit(&dn->dn_mtx);
  
+       if (kill_spill) {
+               (void) free_blocks(dn, &dn->dn_phys->dn_spill, 1, tx);
+               mutex_enter(&dn->dn_mtx);
+               dnp->dn_flags &= ~DNODE_FLAG_SPILL_BLKPTR;
+               mutex_exit(&dn->dn_mtx);
+       }
        /* process all the "freed" ranges in the file */
 -      while (rp = avl_last(&dn->dn_ranges[txgoff])) {
 +      while ((rp = avl_last(&dn->dn_ranges[txgoff]))) {
                dnode_sync_free_range(dn, rp->fr_blkid, rp->fr_nblks, tx);
                /* grab the mutex so we don't race with dnode_block_freed() */
                mutex_enter(&dn->dn_mtx);
Simple merge
Simple merge
index f2eb2386338cfb7d83587173b4cdf91a0327c331,2cd21a102beb10904ae8139993af786167265dcf..19114ef4cb70e43d024986d4274f09dcdab66587
@@@ -339,7 -357,17 +357,17 @@@ dsl_pool_sync(dsl_pool_t *dp, uint64_t 
        }
        err = zio_wait(zio);
  
 -      while (dstg = txg_list_remove(&dp->dp_sync_tasks, txg)) {
+       /*
+        * Move dead blocks from the pending deadlist to the on-disk
+        * deadlist.
+        */
+       for (ds = list_head(&dp->dp_synced_datasets); ds;
+           ds = list_next(&dp->dp_synced_datasets, ds)) {
+               bplist_iterate(&ds->ds_pending_deadlist,
+                   deadlist_enqueue_cb, &ds->ds_deadlist, tx);
+       }
 +      while ((dstg = txg_list_remove(&dp->dp_sync_tasks, txg))) {
                /*
                 * No more sync tasks should have been added while we
                 * were syncing.
  }
  
  void
- dsl_pool_zil_clean(dsl_pool_t *dp)
+ dsl_pool_sync_done(dsl_pool_t *dp, uint64_t txg)
  {
        dsl_dataset_t *ds;
+       objset_t *os;
  
 -      while (ds = list_head(&dp->dp_synced_datasets)) {
 +      while ((ds = list_head(&dp->dp_synced_datasets))) {
                list_remove(&dp->dp_synced_datasets, ds);
-               ASSERT(ds->ds_user_ptr != NULL);
-               zil_clean(((objset_impl_t *)ds->ds_user_ptr)->os_zil);
+               os = ds->ds_objset;
+               zil_clean(os->os_zil);
+               ASSERT(!dmu_objset_is_dirty(os, txg));
                dmu_buf_rele(ds->ds_dbuf, ds);
        }
+       ASSERT(!dmu_objset_is_dirty(dp->dp_meta_objset, txg));
  }
  
  /*
index ab34098514f6c2a0e455c1aee47219106ac38d59,aa66b32e79388cbe0b7cc68caf33a33c30ca9bdf..d12d05a62473c02583fe3c9f0f6157b42f987cee
@@@ -508,9 -825,10 +825,10 @@@ dsl_props_set(const char *dsname, zprop
        dsl_dataset_t *ds;
        uint64_t version;
        nvpair_t *elem = NULL;
+       dsl_props_arg_t pa;
        int err;
  
 -      if (err = dsl_dataset_hold(dsname, FTAG, &ds))
 +      if ((err = dsl_dataset_hold(dsname, FTAG, &ds)))
                return (err);
        /*
         * Do these checks before the syncfunc, since it can't fail.
Simple merge
Simple merge
index 15193bc82ab5c5935af3a90767f3957cda98dfff,d7c5de0d357a2fab7e3a281ed52196aab97519c8..63d4a0f9c218baf59e9ac6c8a3451ad65bcf3523
@@@ -371,12 -395,14 +395,14 @@@ spa_prop_validate(spa_t *spa, nvlist_t 
                                        break;
                                }
  
-                               if ((error = dmu_objset_open(strval,DMU_OST_ZFS,
-                                   DS_MODE_USER | DS_MODE_READONLY, &os)))
 -                              if (error = dmu_objset_hold(strval, FTAG, &os))
++                              if ((error = dmu_objset_hold(strval,FTAG,&os)))
                                        break;
  
-                               /* We don't support gzip bootable datasets */
-                               if ((error = dsl_prop_get_integer(strval,
+                               /* Must be ZPL and not gzip compressed. */
+                               if (dmu_objset_type(os) != DMU_OST_ZFS) {
+                                       error = ENOTSUP;
+                               } else if ((error = dsl_prop_get_integer(strval,
                                    zfs_prop_to_name(ZFS_PROP_COMPRESSION),
                                    &compress, NULL)) == 0 &&
                                    !BOOTFS_COMPRESS_VALID(compress)) {
@@@ -4309,9 -5431,11 +5431,11 @@@ spa_sync(spa_t *spa, uint64_t txg
        /*
         * Update usable space statistics.
         */
 -      while (vd = txg_list_remove(&spa->spa_vdev_txg_list, TXG_CLEAN(txg)))
 +      while ((vd = txg_list_remove(&spa->spa_vdev_txg_list, TXG_CLEAN(txg))))
                vdev_sync_done(vd, txg);
  
+       spa_update_dspace(spa);
        /*
         * It had better be the case that we didn't dirty anything
         * since vdev_config_sync().
index ae758e0aff4ca4f17b8877ab697f99bc0ad1ee8f,a61f29b8e78a6deb58690a813aeed9ccee715ad1..2ea640cf6866f86add420b038517e46ddfbe3689
  vdev_sync_done(vdev_t *vd, uint64_t txg)
  {
        metaslab_t *msp;
+       boolean_t reassess = !txg_list_empty(&vd->vdev_ms_list, TXG_CLEAN(txg));
+       ASSERT(!vd->vdev_ishole);
  
 -      while (msp = txg_list_remove(&vd->vdev_ms_list, TXG_CLEAN(txg)))
 +      while ((msp = txg_list_remove(&vd->vdev_ms_list, TXG_CLEAN(txg))))
                metaslab_sync_done(msp, txg);
+       if (reassess)
+               metaslab_sync_reassess(vd->vdev_mg);
  }
  
  void
Simple merge
Simple merge
index df73a5dd173cd1e8b86061f2493092c722c16da8,de5fb1e4ce3efb9fae1e309befe3f4d1fb22e8c3..6032705565299918c5886bf56a769a9b659e5ada
@@@ -1380,8 -1594,7 +1594,7 @@@ zfs_ioc_objset_stats(zfs_cmd_t *zc
        int error;
        nvlist_t *nv;
  
-       if ((error = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
 -      if (error = dmu_objset_hold(zc->zc_name, FTAG, &os))
++      if ((error = dmu_objset_hold(zc->zc_name, FTAG, &os)))
                return (error);
  
        dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@@ -1438,8 -1695,8 +1695,8 @@@ zfs_ioc_objset_zplprops(zfs_cmd_t *zc
        objset_t *os;
        int err;
  
-       if ((err = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
+       /* XXX reading without owning */
 -      if (err = dmu_objset_hold(zc->zc_name, FTAG, &os))
++      if ((err = dmu_objset_hold(zc->zc_name, FTAG, &os)))
                return (err);
  
        dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@@ -1504,9 -1761,10 +1761,10 @@@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc
        objset_t *os;
        int error;
        char *p;
+       size_t orig_len = strlen(zc->zc_name);
  
-       if ((error = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))) {
+ top:
 -      if (error = dmu_objset_hold(zc->zc_name, FTAG, &os)) {
++      if ((error = dmu_objset_hold(zc->zc_name, FTAG, &os))) {
                if (error == ENOENT)
                        error = ESRCH;
                return (error);
@@@ -1871,11 -2179,11 +2179,11 @@@ zfs_check_userprops(char *fsname, nvlis
                char *valstr;
  
                if (!zfs_prop_user(propname) ||
-                   nvpair_type(elem) != DATA_TYPE_STRING)
+                   nvpair_type(pair) != DATA_TYPE_STRING)
                        return (EINVAL);
  
 -              if (error = zfs_secpolicy_write_perms(fsname,
 -                  ZFS_DELEG_PERM_USERPROP, CRED()))
 +              if ((error = zfs_secpolicy_write_perms(fsname,
 +                  ZFS_DELEG_PERM_USERPROP, CRED())))
                        return (error);
  
                if (strlen(propname) >= ZAP_MAXNAMELEN)