@@ -503,6 +503,9 @@ xfs_buf_item_unpin(
* the AIL properly holds a reference on the bli.
*/
freed = atomic_dec_and_test(&bip->bli_refcount);
+ if (remove)
+ mdelay(1000);
+
if (freed && !stale && remove)
xfs_buf_hold(bp);
if (atomic_dec_and_test(&bp->b_pin_count))
```
Kernel patch for reproduce the issue of patch 2:
```
@@ -25,6 +25,9 @@
#include "xfs_dquot.h"
#include "xfs_icache.h"
+#include <linux/delay.h>
+#include "xfs_log_priv.h"
+
struct kmem_cache *xfs_trans_cache;
#if defined(CONFIG_TRACEPOINTS)
@@ -1002,6 +1005,8 @@ __xfs_trans_commit(
xfs_trans_apply_sb_deltas(tp);
xfs_trans_apply_dquot_deltas(tp);
+ if (xlog_is_shutdown(log))
+ mdelay(1000);
xlog_cil_commit(log, tp, &commit_seq, regrant);
xfs_trans_free(tp);