summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf_item.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-06-22 18:50:12 +1000
committerBen Myers <bpm@sgi.com>2012-07-01 14:50:06 -0500
commit372cc85ec6820c91b4eeff303880f25cb5a00ab5 (patch)
treef35125a854ebc54c64d46c37fde9e91cc68ed991 /fs/xfs/xfs_buf_item.h
parentde2a4f59190303ff5b82ead2969968a325e61230 (diff)
downloadlinux-stable-372cc85ec6820c91b4eeff303880f25cb5a00ab5.tar.gz
linux-stable-372cc85ec6820c91b4eeff303880f25cb5a00ab5.tar.bz2
linux-stable-372cc85ec6820c91b4eeff303880f25cb5a00ab5.zip
xfs: support discontiguous buffers in the xfs_buf_log_item
discontigous buffer in separate buffer format structures. This means log recovery will recover all the changes on a per segment basis without requiring any knowledge of the fact that it was logged from a compound buffer. To do this, we need to be able to determine what buffer segment any given offset into the compound buffer sits over. This enables us to translate the dirty bitmap in the number of separate buffer format structures required. We also need to be able to determine the number of bitmap elements that a given buffer segment has, as this determines the size of the buffer format structure. Hence we need to be able to determine the both the start offset into the buffer and the length of a given segment to be able to calculate this. With this information, we can preallocate, build and format the correct log vector array for each segment in a compound buffer to appear exactly the same as individually logged buffers in the log. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf_item.h')
-rw-r--r--fs/xfs/xfs_buf_item.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf_item.h b/fs/xfs/xfs_buf_item.h
index ff2686780239..6850f49f4af3 100644
--- a/fs/xfs/xfs_buf_item.h
+++ b/fs/xfs/xfs_buf_item.h
@@ -102,6 +102,8 @@ typedef struct xfs_buf_log_item {
char *bli_orig; /* original buffer copy */
char *bli_logged; /* bytes logged (bitmap) */
#endif
+ int bli_format_count; /* count of headers */
+ struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */
struct xfs_buf_log_format bli_format; /* embedded in-log header */
} xfs_buf_log_item_t;