On Tue, 2006-11-07 at 14:20 -0700, Matthew Wilcox wrote: > On Tue, Nov 07, 2006 at 04:13:00PM -0500, Jeff Layton wrote: > > + /* ino must not collide with any ino assigned in the loop below. Set > > + it to the highest possible inode number */ > > + inode->i_ino = (1 << (sizeof(s->s_lastino) * 8)) - 1; > > This really isn't a good idiom to be using; GCC now takes this to mean > "I can reformat your hard drive because you did something outside the > spec". > > Try instead: > + inode->i_ino = -1; > The problem there is that on platforms with a 64-bit ino_t, this will be too large to fit in a 32-bit field and we'll end up with the same EOVERFLOW problem. Is there a more correct way to make it size appropriately given the different possible sizes of s_lastino? I suppose we could just set it to 0xffffffff and hope that that is "big enough" for most cases. -- Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Eric Sandeen <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Eric Sandeen <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jörn Engel <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Jeff Layton <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- From: Matthew Wilcox <[email protected]>
- Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Prev by Date: [PATCH 009 of 9] md: Enable bypassing cache for reads.
- Next by Date: [PATCH 004 of 9] md: Tidy up device-change notification when an md array is stopped
- Previous by thread: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Next by thread: Re: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
- Index(es):