aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index c79882ecb51..161333785f6 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -162,33 +162,41 @@ typedef int (*xfs_buf_bdstrat_t)(struct xfs_buf *);
162#define XB_PAGES 2 162#define XB_PAGES 2
163 163
164typedef struct xfs_buf { 164typedef struct xfs_buf {
165 /*
166 * first cacheline holds all the fields needed for an uncontended cache
167 * hit to be fully processed. The semaphore straddles the cacheline
168 * boundary, but the counter and lock sits on the first cacheline,
169 * which is the only bit that is touched if we hit the semaphore
170 * fast-path on locking.
171 */
172 struct rb_node b_rbnode; /* rbtree node */
173 xfs_off_t b_file_offset; /* offset in file */
174 size_t b_buffer_length;/* size of buffer in bytes */
175 atomic_t b_hold; /* reference count */
176 xfs_buf_flags_t b_flags; /* status flags */
165 struct semaphore b_sema; /* semaphore for lockables */ 177 struct semaphore b_sema; /* semaphore for lockables */
166 unsigned long b_queuetime; /* time buffer was queued */ 178
167 atomic_t b_pin_count; /* pin count */
168 wait_queue_head_t b_waiters; /* unpin waiters */ 179 wait_queue_head_t b_waiters; /* unpin waiters */
169 struct list_head b_list; 180 struct list_head b_list;
170 xfs_buf_flags_t b_flags; /* status flags */
171 struct rb_node b_rbnode; /* rbtree node */
172 struct xfs_perag *b_pag; /* contains rbtree root */ 181 struct xfs_perag *b_pag; /* contains rbtree root */
173 xfs_buftarg_t *b_target; /* buffer target (device) */ 182 xfs_buftarg_t *b_target; /* buffer target (device) */
174 atomic_t b_hold; /* reference count */
175 xfs_daddr_t b_bn; /* block number for I/O */ 183 xfs_daddr_t b_bn; /* block number for I/O */
176 xfs_off_t b_file_offset; /* offset in file */
177 size_t b_buffer_length;/* size of buffer in bytes */
178 size_t b_count_desired;/* desired transfer size */ 184 size_t b_count_desired;/* desired transfer size */
179 void *b_addr; /* virtual address of buffer */ 185 void *b_addr; /* virtual address of buffer */
180 struct work_struct b_iodone_work; 186 struct work_struct b_iodone_work;
181 atomic_t b_io_remaining; /* #outstanding I/O requests */
182 xfs_buf_iodone_t b_iodone; /* I/O completion function */ 187 xfs_buf_iodone_t b_iodone; /* I/O completion function */
183 xfs_buf_relse_t b_relse; /* releasing function */ 188 xfs_buf_relse_t b_relse; /* releasing function */
184 struct completion b_iowait; /* queue for I/O waiters */ 189 struct completion b_iowait; /* queue for I/O waiters */
185 void *b_fspriv; 190 void *b_fspriv;
186 void *b_fspriv2; 191 void *b_fspriv2;
187 unsigned short b_error; /* error code on I/O */
188 unsigned int b_page_count; /* size of page array */
189 unsigned int b_offset; /* page offset in first page */
190 struct page **b_pages; /* array of page pointers */ 192 struct page **b_pages; /* array of page pointers */
191 struct page *b_page_array[XB_PAGES]; /* inline pages */ 193 struct page *b_page_array[XB_PAGES]; /* inline pages */
194 unsigned long b_queuetime; /* time buffer was queued */
195 atomic_t b_pin_count; /* pin count */
196 atomic_t b_io_remaining; /* #outstanding I/O requests */
197 unsigned int b_page_count; /* size of page array */
198 unsigned int b_offset; /* page offset in first page */
199 unsigned short b_error; /* error code on I/O */
192#ifdef XFS_BUF_LOCK_TRACKING 200#ifdef XFS_BUF_LOCK_TRACKING
193 int b_last_holder; 201 int b_last_holder;
194#endif 202#endif