]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Move metaslab_group_alloc_update() call
authorPrakash Surya <surya1@llnl.gov>
Fri, 11 Jul 2014 20:03:29 +0000 (13:03 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 22 Jul 2014 16:38:16 +0000 (09:38 -0700)
This changes moves the called to metaslab_group_alloc_update() to the
metaslab_sync_reassess() function. The original placement of the call
within metaslab_sync_done() appears to have been a simple mistake,
introduced by ac72fac3eaa569902cad88053167f7d74e7fe7e4.

This aligns us more closely to the upstream illumos code base.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/metaslab.c

index a8b4b0a0e578b9cc6f245354298e68304f806a64..fe2428ac0ba246c5f361c012242011e88679a276 100644 (file)
@@ -1398,8 +1398,6 @@ metaslab_sync_done(metaslab_t *msp, uint64_t txg)
                vdev_dirty(vd, VDD_METASLAB, msp, txg + 1);
        }
 
-       metaslab_group_alloc_update(mg);
-
        /*
         * If the map is loaded but no longer active, evict it as soon as all
         * future allocations have synced.  (If we unloaded it now and then
@@ -1428,6 +1426,8 @@ metaslab_sync_reassess(metaslab_group_t *mg)
        int64_t failures = mg->mg_alloc_failures;
        int m;
 
+       metaslab_group_alloc_update(mg);
+
        /*
         * Re-evaluate all metaslabs which have lower offsets than the
         * bonus area.