diff options
author | Dave Chinner <david@fromorbit.com> | 2015-01-21 17:51:30 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-01-21 17:51:30 -0500 |
commit | 438c3c8d2bb910966db6fc4140e62d67b3c5f2a8 (patch) | |
tree | c44fbb5488a82a24b3d71c4fe19924c2dc97df0e /fs | |
parent | 465e2def7cb45864da1f82afb973a6acd1046ed8 (diff) | |
parent | 3443a3bca54588f43286b725d8648d33a38c86f1 (diff) |
Merge branch 'xfs-buf-type-fixes' into for-next
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 6 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_symlink_remote.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.c | 1 |
5 files changed, 14 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 63a5bb9113ee..61ec015dca16 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -973,7 +973,11 @@ xfs_bmap_local_to_extents( | |||
973 | *firstblock = args.fsbno; | 973 | *firstblock = args.fsbno; |
974 | bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); | 974 | bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); |
975 | 975 | ||
976 | /* initialise the block and copy the data */ | 976 | /* |
977 | * Initialise the block and copy the data | ||
978 | * | ||
979 | * Note: init_fn must set the buffer log item type correctly! | ||
980 | */ | ||
977 | init_fn(tp, bp, ip, ifp); | 981 | init_fn(tp, bp, ip, ifp); |
978 | 982 | ||
979 | /* account for the change in fork size and log everything */ | 983 | /* account for the change in fork size and log everything */ |
diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c index c80c5236c3da..e7e26bd6468f 100644 --- a/fs/xfs/libxfs/xfs_symlink_remote.c +++ b/fs/xfs/libxfs/xfs_symlink_remote.c | |||
@@ -178,6 +178,8 @@ xfs_symlink_local_to_remote( | |||
178 | struct xfs_mount *mp = ip->i_mount; | 178 | struct xfs_mount *mp = ip->i_mount; |
179 | char *buf; | 179 | char *buf; |
180 | 180 | ||
181 | xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); | ||
182 | |||
181 | if (!xfs_sb_version_hascrc(&mp->m_sb)) { | 183 | if (!xfs_sb_version_hascrc(&mp->m_sb)) { |
182 | bp->b_ops = NULL; | 184 | bp->b_ops = NULL; |
183 | memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); | 185 | memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 925ead22803a..507d96a57ac7 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -319,6 +319,10 @@ xfs_buf_item_format( | |||
319 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 319 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
320 | ASSERT((bip->bli_flags & XFS_BLI_LOGGED) || | 320 | ASSERT((bip->bli_flags & XFS_BLI_LOGGED) || |
321 | (bip->bli_flags & XFS_BLI_STALE)); | 321 | (bip->bli_flags & XFS_BLI_STALE)); |
322 | ASSERT((bip->bli_flags & XFS_BLI_STALE) || | ||
323 | (xfs_blft_from_flags(&bip->__bli_format) > XFS_BLFT_UNKNOWN_BUF | ||
324 | && xfs_blft_from_flags(&bip->__bli_format) < XFS_BLFT_MAX_BUF)); | ||
325 | |||
322 | 326 | ||
323 | /* | 327 | /* |
324 | * If it is an inode buffer, transfer the in-memory state to the | 328 | * If it is an inode buffer, transfer the in-memory state to the |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 9916aef60997..daafa1f6d260 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -1995,6 +1995,7 @@ xfs_iunlink( | |||
1995 | agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); | 1995 | agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); |
1996 | offset = offsetof(xfs_agi_t, agi_unlinked) + | 1996 | offset = offsetof(xfs_agi_t, agi_unlinked) + |
1997 | (sizeof(xfs_agino_t) * bucket_index); | 1997 | (sizeof(xfs_agino_t) * bucket_index); |
1998 | xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); | ||
1998 | xfs_trans_log_buf(tp, agibp, offset, | 1999 | xfs_trans_log_buf(tp, agibp, offset, |
1999 | (offset + sizeof(xfs_agino_t) - 1)); | 2000 | (offset + sizeof(xfs_agino_t) - 1)); |
2000 | return 0; | 2001 | return 0; |
@@ -2086,6 +2087,7 @@ xfs_iunlink_remove( | |||
2086 | agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); | 2087 | agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); |
2087 | offset = offsetof(xfs_agi_t, agi_unlinked) + | 2088 | offset = offsetof(xfs_agi_t, agi_unlinked) + |
2088 | (sizeof(xfs_agino_t) * bucket_index); | 2089 | (sizeof(xfs_agino_t) * bucket_index); |
2090 | xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); | ||
2089 | xfs_trans_log_buf(tp, agibp, offset, | 2091 | xfs_trans_log_buf(tp, agibp, offset, |
2090 | (offset + sizeof(xfs_agino_t) - 1)); | 2092 | (offset + sizeof(xfs_agino_t) - 1)); |
2091 | } else { | 2093 | } else { |
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index fa3135b9bf04..eb90cd59a0ec 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -472,6 +472,7 @@ xfs_trans_apply_sb_deltas( | |||
472 | whole = 1; | 472 | whole = 1; |
473 | } | 473 | } |
474 | 474 | ||
475 | xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF); | ||
475 | if (whole) | 476 | if (whole) |
476 | /* | 477 | /* |
477 | * Log the whole thing, the fields are noncontiguous. | 478 | * Log the whole thing, the fields are noncontiguous. |