This repository was archived by the owner on Nov 7, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
usr/src/uts/common/fs/zfs Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,24 @@ zil_lwb_write_start(zilog_t *zilog, lwb_t *lwb)
974
974
* to clean up in the event of allocation failure or I/O failure.
975
975
*/
976
976
tx = dmu_tx_create (zilog -> zl_os );
977
- VERIFY (dmu_tx_assign (tx , TXG_WAIT ) == 0 );
977
+
978
+ /*
979
+ * Since we are not going to create any new dirty data and we can even
980
+ * help with clearing the existing dirty data, we should not be subject
981
+ * to the dirty data based delays.
982
+ * We (ab)use TXG_WAITED to bypass the delay mechanism.
983
+ * One side effect from using TXG_WAITED is that dmu_tx_assign() can
984
+ * fail if the pool is suspended. Those are dramatic circumstances,
985
+ * so we return NULL to signal that the normal ZIL processing is not
986
+ * possible and txg_wait_synced() should be used to ensure that the data
987
+ * is on disk.
988
+ */
989
+ error = dmu_tx_assign (tx , TXG_WAITED );
990
+ if (error != 0 ) {
991
+ ASSERT3S (error , = = , EIO );
992
+ dmu_tx_abort (tx );
993
+ return (NULL );
994
+ }
978
995
dsl_dataset_dirty (dmu_objset_ds (zilog -> zl_os ), tx );
979
996
txg = dmu_tx_get_txg (tx );
980
997
You can’t perform that action at this time.
0 commit comments