diff options
author | Christoph Hellwig <hch@lst.de> | 2013-04-03 01:11:17 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-04-21 16:03:33 -0400 |
commit | 93848a999cf9b9e4f4f77dba843a48c393f33c59 (patch) | |
tree | 92c2fb4e741a8d70e70f9d31df308d1a30ecaef6 /fs/xfs/xfs_trans_buf.c | |
parent | 3fe58f30b4fc3f8a9084b035a02bc0c67bee8d00 (diff) |
xfs: add version 3 inode format with CRCs
Add a new inode version with a larger core. The primary objective is
to allow for a crc of the inode, and location information (uuid and ino)
to verify it was written in the right place. We also extend it by:
a creation time (for Samba);
a changecount (for NFSv4);
a flush sequence (in LSN format for recovery);
an additional inode flags field; and
some additional padding.
These additional fields are not implemented yet, but already laid
out in the structure.
[dchinner@redhat.com] Added LSN and flags field, some factoring and rework to
capture all the necessary information in the crc calculation.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index f950edd0d537..8a0f6af51206 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -704,12 +704,13 @@ xfs_trans_inode_buf( | |||
704 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 704 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
705 | 705 | ||
706 | bip->bli_flags |= XFS_BLI_INODE_BUF; | 706 | bip->bli_flags |= XFS_BLI_INODE_BUF; |
707 | xfs_trans_buf_set_type(tp, bp, XFS_BLF_DINO_BUF); | ||
707 | } | 708 | } |
708 | 709 | ||
709 | /* | 710 | /* |
710 | * This call is used to indicate that the buffer is going to | 711 | * This call is used to indicate that the buffer is going to |
711 | * be staled and was an inode buffer. This means it gets | 712 | * be staled and was an inode buffer. This means it gets |
712 | * special processing during unpin - where any inodes | 713 | * special processing during unpin - where any inodes |
713 | * associated with the buffer should be removed from ail. | 714 | * associated with the buffer should be removed from ail. |
714 | * There is also special processing during recovery, | 715 | * There is also special processing during recovery, |
715 | * any replay of the inodes in the buffer needs to be | 716 | * any replay of the inodes in the buffer needs to be |
@@ -728,6 +729,7 @@ xfs_trans_stale_inode_buf( | |||
728 | 729 | ||
729 | bip->bli_flags |= XFS_BLI_STALE_INODE; | 730 | bip->bli_flags |= XFS_BLI_STALE_INODE; |
730 | bip->bli_item.li_cb = xfs_buf_iodone; | 731 | bip->bli_item.li_cb = xfs_buf_iodone; |
732 | xfs_trans_buf_set_type(tp, bp, XFS_BLF_DINO_BUF); | ||
731 | } | 733 | } |
732 | 734 | ||
733 | /* | 735 | /* |
@@ -751,6 +753,7 @@ xfs_trans_inode_alloc_buf( | |||
751 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 753 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
752 | 754 | ||
753 | bip->bli_flags |= XFS_BLI_INODE_ALLOC_BUF; | 755 | bip->bli_flags |= XFS_BLI_INODE_ALLOC_BUF; |
756 | xfs_trans_buf_set_type(tp, bp, XFS_BLF_DINO_BUF); | ||
754 | } | 757 | } |
755 | 758 | ||
756 | /* | 759 | /* |