ahrens commented on this pull request.


> @@ -231,11 +231,14 @@ typedef enum dmu_object_type {
        DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE),
 } dmu_object_type_t;
 
-typedef enum txg_how {
-       TXG_WAIT = 1,
-       TXG_NOWAIT,
-       TXG_WAITED,
-} txg_how_t;
+/*
+ * These flags are intended to be used to specify the "txg_how"
+ * parameter when calling the dmu_tx_assign() function. See the comment
+ * above dmu_tx_assign() for more details on the meaning of these flags.
+ */
+#define        TXG_NOWAIT      (0ULL)
+#define        TXG_WAIT        (1ULL<<0)
+#define        TXG_WAITED      (1ULL<<1)

It's a little hard to wrap my head around WAIT vs NOWAIT vs WAITED.  Your 
explanation is clear, but for some reason it isn't intuitive to me.  E.g. 
WAITED kind of means "don't wait" (in one aspect) and NOWAIT also means "don't 
wait".  So WAITED | NOWAIT feels redundant, and WAIT | WAITED seems 
contradictory.  I wonder if we should expose some of the underlying meaning by 
changing TXG_WAITED to TXG_NO_THROTTLE (and perhaps tx_waited -> 
tx_no_throttle)?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/514#pullrequestreview-88018212
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T9a006f4f91609eb5-Md82c4a3e4c99d682c0569439
Powered by Topicbox: https://topicbox.com

Reply via email to