linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Shouldn't iget_locked be using u64 rather than unsigned long ino?
       [not found] <501706658.15613331.1465307227820.JavaMail.zimbra@redhat.com>
@ 2016-06-07 13:59 ` Bob Peterson
  2016-06-16 18:00   ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2016-06-07 13:59 UTC (permalink / raw)
  To: linux-fsdevel, Alexander Viro

Hi,

For a while now, I've been annoyed by the fact that function iget_locked
and friends (test_inode_iunique, find_inode_fast, ilookup, etc.) use
"unsigned long ino" rather than u64 for inode number. File systems need to be
consistent across multiple architectures, and 32-bits is hardly adequate for
modern storage. This can only result in problems and/or unnecessary restrictions
for file systems with block-number based inode numbers like gfs2, and/or force
them to kludge around it to prevent problems in mixed architectures.
(Not that anyone is likely to use GFS2 on a 32-bit arch, but still.) Opinions?

Regards,

Bob Peterson
Red Hat File Systems

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Shouldn't iget_locked be using u64 rather than unsigned long ino?
  2016-06-07 13:59 ` Shouldn't iget_locked be using u64 rather than unsigned long ino? Bob Peterson
@ 2016-06-16 18:00   ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2016-06-16 18:00 UTC (permalink / raw)
  To: Bob Peterson; +Cc: linux-fsdevel, Alexander Viro

Hi!

On Tue 07-06-16 09:59:58, Bob Peterson wrote:
> For a while now, I've been annoyed by the fact that function iget_locked
> and friends (test_inode_iunique, find_inode_fast, ilookup, etc.) use
> "unsigned long ino" rather than u64 for inode number. File systems need to be
> consistent across multiple architectures, and 32-bits is hardly adequate for
> modern storage. This can only result in problems and/or unnecessary restrictions
> for file systems with block-number based inode numbers like gfs2, and/or force
> them to kludge around it to prevent problems in mixed architectures.
> (Not that anyone is likely to use GFS2 on a 32-bit arch, but still.) Opinions?

Well, if you look at struct inode, you'll see that i_ino is unsigned long
there as well. So changing the inode number to u64 would have to be a wider
reaching change than iget_locked() and friends. Frankly, if you want to do
anything about the type of i_ino, I'd be for declaring a type for it (like
ino_t). Then we could treat it similarly as sector_t and define it as u64
if special config option is set (for sector_t it is called CONFIG_LBDAF)
and otherwise keep it as unsigned long.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-16 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <501706658.15613331.1465307227820.JavaMail.zimbra@redhat.com>
2016-06-07 13:59 ` Shouldn't iget_locked be using u64 rather than unsigned long ino? Bob Peterson
2016-06-16 18:00   ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).