diff options
author | bonwick <none@none> | 2007-11-27 22:58:05 -0800 |
---|---|---|
committer | bonwick <none@none> | 2007-11-27 22:58:05 -0800 |
commit | e05725b117836db173257fae43fb0746eb857fb5 (patch) | |
tree | dbdd58653bf6cebb69156f3361a6e1d72643b100 /usr/src/uts/common/fs/zfs/metaslab.c | |
parent | b9bc7f7832704fda46b4d6b04f3f7be1227dc644 (diff) | |
download | illumos-gate-onnv_79.tar.gz |
6354519 stack overflow in zfs due to zio pipelineonnv_79
6533726 single-threaded checksum & parity calculations limit write bandwidth
6547248 ztest detects a future leak when there is none
6604198 zfs only using single cpu for compression (part II)
--HG--
rename : usr/src/uts/common/fs/zfs/rprwlock.c => deleted_files/usr/src/uts/common/fs/zfs/rprwlock.c
rename : usr/src/uts/common/fs/zfs/sys/rprwlock.h => deleted_files/usr/src/uts/common/fs/zfs/sys/rprwlock.h
Diffstat (limited to 'usr/src/uts/common/fs/zfs/metaslab.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/metaslab.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/metaslab.c b/usr/src/uts/common/fs/zfs/metaslab.c index 589dc7e3de..9365dbdb14 100644 --- a/usr/src/uts/common/fs/zfs/metaslab.c +++ b/usr/src/uts/common/fs/zfs/metaslab.c @@ -35,6 +35,7 @@ #include <sys/zio.h> uint64_t metaslab_aliquot = 512ULL << 10; +uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ /* * ========================================================================== @@ -728,6 +729,12 @@ metaslab_alloc_dva(spa_t *spa, metaslab_class_t *mc, uint64_t psize, ASSERT(!DVA_IS_VALID(&dva[d])); /* + * For testing, make some blocks above a certain size be gang blocks. + */ + if (psize >= metaslab_gang_bang && (lbolt & 3) == 0) + return (ENOSPC); + + /* * Start at the rotor and loop through all mgs until we find something. * Note that there's no locking on mc_rotor or mc_allocated because * nothing actually breaks if we miss a few updates -- we just won't |