]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/bcachefs.h
Update bcachefs sources to a1b6677dca57 bcachefs: Fix looping around bch2_propagate_k...
[bcachefs-tools-debian] / libbcachefs / bcachefs.h
index 9ae82254452fa799b0aa10ddb544f2bd81d3dc23..ef5c078b4c550a216eaa840a30edacb5d3ebabb0 100644 (file)
@@ -293,9 +293,17 @@ do {                                                                       \
        printk_ratelimited(KERN_ERR bch2_fmt_inum_offset(c, _inum, _offset, fmt), ##__VA_ARGS__)
 
 #define bch_err_fn(_c, _ret)                                           \
-        bch_err(_c, "%s(): error %s", __func__, bch2_err_str(_ret))
+do {                                                                   \
+       if (_ret && !bch2_err_matches(_ret, BCH_ERR_transaction_restart))\
+               bch_err(_c, "%s(): error %s", __func__, bch2_err_str(_ret));\
+} while (0)
+
 #define bch_err_msg(_c, _ret, _msg, ...)                               \
-        bch_err(_c, "%s(): error " _msg " %s", __func__, ##__VA_ARGS__, bch2_err_str(_ret))
+do {                                                                   \
+       if (_ret && !bch2_err_matches(_ret, BCH_ERR_transaction_restart))\
+               bch_err(_c, "%s(): error " _msg " %s", __func__,        \
+                       ##__VA_ARGS__, bch2_err_str(_ret));             \
+} while (0)
 
 #define bch_verbose(c, fmt, ...)                                       \
 do {                                                                   \