Re: [RFC 4/5] support >32 bit ext3: sector_t convert in JBD
"Stephen C. Tweedie" <[email protected]>
| Newsgroups | gmane.comp.file-systems.ext2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On Thu, 2006-06-08 at 13:56 -0700, Mingming Cao wrote:
> Here is the updated sector_t-jbd patch.
Do you have an incremental diff against the last one?
> /* Borrowed from buffer.c: this is a tried and tested block hash function */
> -static inline int hash(journal_t *journal, unsigned long block)
> +static inline int hash(journal_t *journal, sector_t block)
> {
> struct jbd_revoke_table_s *table = journal->j_revoke;
> int hash_shift = table->hash_shift;
> + int hash = (int)block ^ (int)(block >> 32);
This is undefined in C if sector_t is 32-bits long. You need to use
((block >> 31) >> 1) or something similar.
--Stephen