diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-04-23 07:58:50 +0200 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 23:20:46 +0200 |
commit | de1cbee46269a3b707eb99b37f33afdd4cfaaea4 (patch) | |
tree | 9dcf9e5336c6be32f7f8f37a93b79159b2cff94f /fs/xfs/xfs_buf.h | |
parent | xfs: clean up buffer get/read call API (diff) | |
download | linux-de1cbee46269a3b707eb99b37f33afdd4cfaaea4.tar.xz linux-de1cbee46269a3b707eb99b37f33afdd4cfaaea4.zip |
xfs: kill b_file_offset
Seeing as we pass block numbers around everywhere in the buffer
cache now, it makes no sense to index everything by byte offset.
Replace all the byte offset indexing with block number based
indexing, and replace all uses of the byte offset with direct
conversion from the block index.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_buf.h')
-rw-r--r-- | fs/xfs/xfs_buf.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index ffd6da045d22..4d472e5ded7a 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -116,7 +116,7 @@ typedef struct xfs_buf { * fast-path on locking. */ struct rb_node b_rbnode; /* rbtree node */ - xfs_off_t b_file_offset; /* offset in file */ + xfs_daddr_t b_bn; /* block number for I/O */ size_t b_buffer_length;/* size of buffer in bytes */ atomic_t b_hold; /* reference count */ atomic_t b_lru_ref; /* lru reclaim ref count */ @@ -128,7 +128,6 @@ typedef struct xfs_buf { struct list_head b_list; struct xfs_perag *b_pag; /* contains rbtree root */ xfs_buftarg_t *b_target; /* buffer target (device) */ - xfs_daddr_t b_bn; /* block number for I/O */ size_t b_count_desired;/* desired transfer size */ void *b_addr; /* virtual address of buffer */ struct work_struct b_iodone_work; @@ -245,8 +244,6 @@ void xfs_buf_stale(struct xfs_buf *bp); #define XFS_BUF_ADDR(bp) ((bp)->b_bn) #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_bn = (xfs_daddr_t)(bno)) -#define XFS_BUF_OFFSET(bp) ((bp)->b_file_offset) -#define XFS_BUF_SET_OFFSET(bp, off) ((bp)->b_file_offset = (off)) #define XFS_BUF_COUNT(bp) ((bp)->b_count_desired) #define XFS_BUF_SET_COUNT(bp, cnt) ((bp)->b_count_desired = (cnt)) #define XFS_BUF_SIZE(bp) ((bp)->b_buffer_length) |