Skip to content
Permalink
Browse files

ztest: dmu_tx_assign() gets ENOSPC in spa_vdev_remove_thread()

When running zloop, we occasionally see the following crash:

    dmu_tx_assign(tx, TXG_WAIT) == 0 (0x1c == 0)
    ASSERT at ../../module/zfs/vdev_removal.c:1507:spa_vdev_remove_thread()/sbin/ztest(+0x89c3)[0x55faf567b9c3]

The error value 0x1c is ENOSPC.

The transaction used by spa_vdev_remove_thread() should not be able to
fail due to being out of space. i.e. we should not call
dmu_tx_hold_space().  This will allow the removal thread to schedule its
work even when the pool is low on space.  The "slop space" will provide
enough free space to sync out the txg.

External-issue: DLPX-37853
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
  • Loading branch information...
Steve Gonczi authored and ahrens committed Aug 19, 2016
1 parent 5662fd5 commit 3ea0e9a68175ce59f0e6d33503faea39448998b0
Showing with 1 addition and 1 deletion.
  1. +1 −1 module/zfs/vdev_removal.c
@@ -1498,7 +1498,7 @@ spa_vdev_remove_thread(void *arg)

dmu_tx_t *tx =
dmu_tx_create_dd(spa_get_dsl(spa)->dp_mos_dir);
dmu_tx_hold_space(tx, SPA_MAXBLOCKSIZE);

VERIFY0(dmu_tx_assign(tx, TXG_WAIT));
uint64_t txg = dmu_tx_get_txg(tx);

0 comments on commit 3ea0e9a

Please sign in to comment.
You can’t perform that action at this time.