diff options
Diffstat (limited to 'fs/xfs/xfs_buf_item.c')
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 98c6f73b6752..7b7e005e3dcc 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -130,10 +130,12 @@ xfs_buf_item_log_check( | |||
130 | orig = bip->bli_orig; | 130 | orig = bip->bli_orig; |
131 | buffer = XFS_BUF_PTR(bp); | 131 | buffer = XFS_BUF_PTR(bp); |
132 | for (x = 0; x < XFS_BUF_COUNT(bp); x++) { | 132 | for (x = 0; x < XFS_BUF_COUNT(bp); x++) { |
133 | if (orig[x] != buffer[x] && !btst(bip->bli_logged, x)) | 133 | if (orig[x] != buffer[x] && !btst(bip->bli_logged, x)) { |
134 | cmn_err(CE_PANIC, | 134 | xfs_emerg(bp->b_mount, |
135 | "xfs_buf_item_log_check bip %x buffer %x orig %x index %d", | 135 | "%s: bip %x buffer %x orig %x index %d", |
136 | bip, bp, orig, x); | 136 | __func__, bip, bp, orig, x); |
137 | ASSERT(0); | ||
138 | } | ||
137 | } | 139 | } |
138 | } | 140 | } |
139 | #else | 141 | #else |
@@ -427,13 +429,15 @@ xfs_buf_item_unpin( | |||
427 | 429 | ||
428 | if (remove) { | 430 | if (remove) { |
429 | /* | 431 | /* |
430 | * We have to remove the log item from the transaction | 432 | * If we are in a transaction context, we have to |
431 | * as we are about to release our reference to the | 433 | * remove the log item from the transaction as we are |
432 | * buffer. If we don't, the unlock that occurs later | 434 | * about to release our reference to the buffer. If we |
433 | * in xfs_trans_uncommit() will ry to reference the | 435 | * don't, the unlock that occurs later in |
436 | * xfs_trans_uncommit() will try to reference the | ||
434 | * buffer which we no longer have a hold on. | 437 | * buffer which we no longer have a hold on. |
435 | */ | 438 | */ |
436 | xfs_trans_del_item(lip); | 439 | if (lip->li_desc) |
440 | xfs_trans_del_item(lip); | ||
437 | 441 | ||
438 | /* | 442 | /* |
439 | * Since the transaction no longer refers to the buffer, | 443 | * Since the transaction no longer refers to the buffer, |
@@ -981,15 +985,14 @@ xfs_buf_iodone_callbacks( | |||
981 | if (XFS_BUF_TARGET(bp) != lasttarg || | 985 | if (XFS_BUF_TARGET(bp) != lasttarg || |
982 | time_after(jiffies, (lasttime + 5*HZ))) { | 986 | time_after(jiffies, (lasttime + 5*HZ))) { |
983 | lasttime = jiffies; | 987 | lasttime = jiffies; |
984 | cmn_err(CE_ALERT, "Device %s, XFS metadata write error" | 988 | xfs_alert(mp, "Device %s: metadata write error block 0x%llx", |
985 | " block 0x%llx in %s", | ||
986 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), | 989 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), |
987 | (__uint64_t)XFS_BUF_ADDR(bp), mp->m_fsname); | 990 | (__uint64_t)XFS_BUF_ADDR(bp)); |
988 | } | 991 | } |
989 | lasttarg = XFS_BUF_TARGET(bp); | 992 | lasttarg = XFS_BUF_TARGET(bp); |
990 | 993 | ||
991 | /* | 994 | /* |
992 | * If the write was asynchronous then noone will be looking for the | 995 | * If the write was asynchronous then no one will be looking for the |
993 | * error. Clear the error state and write the buffer out again. | 996 | * error. Clear the error state and write the buffer out again. |
994 | * | 997 | * |
995 | * During sync or umount we'll write all pending buffers again | 998 | * During sync or umount we'll write all pending buffers again |