The write buffer data structure stores various characteristics of the
write buffer, such as I/O alignment requirements, etc., but does not
include the required data buffer alignment.
Data buffer alignment is a required buffer initialization parameter and
the v5 log format support code would like to initialize an independent
log buffer based on the predetermined alignment constraints encoded into
the global write buffer. Update the write buffer data structure to store
the provided data alignment value such that it can be accessed
throughout the codebase. This patch does not change existing behavior.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
return NULL;
}
ASSERT(min_io_size % BBSIZE == 0);
+ buf->data_align = data_align;
buf->min_io_size = min_io_size;
buf->size = data_size;
buf->id = id;
int id; /* buffer ID */
size_t size; /* size of buffer -- fixed */
size_t min_io_size; /* for direct I/O */
+ int data_align; /* data buffer alignment */
xfs_off_t position; /* requested position (bytes) */
size_t length; /* requested length (bytes) */
char *data; /* pointer to data buffer */