Messages in this thread | | | Subject | Re: [PATCH] change b_size to size_t | From | Badari Pulavarty <> | Date | Thu, 23 Feb 2006 09:28:58 -0800 |
| |
On Thu, 2006-02-23 at 11:32 -0500, Benjamin LaHaise wrote: > On Thu, Feb 23, 2006 at 08:28:12AM -0800, Badari Pulavarty wrote: > > Here is the updated version of the patch, which changes > > buffer_head.b_size to size_t to support mapping large > > amount of disk blocks (for large IOs). > > Your patch doesn't seem to be inline, so I can't quote it. Several > problems: on 64 bit platforms you introduced 4 bytes of padding into > buffer_head. atomic_t only takes up 4 byte, while size_t is 8 byte > aligned.
Ignore my previous mail.
How about doing this ? Change b_state to u32 and change b_size to "size_t". This way, we don't increase the overall size of the structure on 64-bit machines. Isn't it ?
Thanks, Badari
struct buffer_head { u32 b_state; /* buffer state bitmap (see above) */ atomic_t b_count; /* users using this buffer_head */ struct buffer_head *b_this_page;/* circular list of page's buffers */ struct page *b_page; /* the page this bh is mapped to */ size_t b_size; /* size of mapping */
sector_t b_blocknr; /* start block number */ char *b_data; /* pointer to data within the page */
struct block_device *b_bdev; bh_end_io_t *b_end_io; /* I/O completion */ void *b_private; /* reserved for b_end_io */ struct list_head b_assoc_buffers; /* associated with another mapping */ };
Thanks, Badari
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |