All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 05/15] ocfs2: Pass raw u64 to filldir
@ 2007-09-19 13:12 Mark Fasheh
  2007-09-20 11:41 ` Joel Becker
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Fasheh @ 2007-09-19 13:12 UTC (permalink / raw)
  To: ocfs2-devel

filldir_t can take this, so don't turn de->inode into a 32 bit value. Right
now this doesn't make a difference since no ocfs2 inodes overflow that, but
it could be a nasty surprise later on if some kernel code is calling
ocfs2_dir_foreach_blk() and expecting real inode numbers back...

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
---
 fs/ocfs2/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index d1f92fd..dbfa6f6 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -512,7 +512,7 @@ revalidate:
 				error = filldir(priv, de->name,
 						de->name_len,
 						*f_pos,
-						ino_from_blkno(sb, le64_to_cpu(de->inode)),
+						le64_to_cpu(de->inode),
 						d_type);
 				if (error)
 					break;
-- 
1.5.0.6

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

* [Ocfs2-devel] [PATCH 05/15] ocfs2: Pass raw u64 to filldir
  2007-09-19 13:12 [Ocfs2-devel] [PATCH 05/15] ocfs2: Pass raw u64 to filldir Mark Fasheh
@ 2007-09-20 11:41 ` Joel Becker
  2007-09-20 12:05   ` Mark Fasheh
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Becker @ 2007-09-20 11:41 UTC (permalink / raw)
  To: ocfs2-devel

On Mon, Sep 10, 2007 at 05:30:26PM -0700, Mark Fasheh wrote:
> filldir_t can take this, so don't turn de->inode into a 32 bit value. Right
> now this doesn't make a difference since no ocfs2 inodes overflow that, but
> it could be a nasty surprise later on if some kernel code is calling
> ocfs2_dir_foreach_blk() and expecting real inode numbers back...

	How come we don't have inodes overflowing 32bits?  Is this a
limit imposed elsewhere?  Refresh my (swiss cheese) memory :-)
	I actually think that the -EOVERFLOW from filldir(7) is better
than our truncated ino, so I still say

Signed-off-by: Joel Becker <joel.becker@oracle.com>

-- 

Viro's Razor:
	Any race condition, no matter how unlikely, will occur just
	often enough to bite you.

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

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

* [Ocfs2-devel] [PATCH 05/15] ocfs2: Pass raw u64 to filldir
  2007-09-20 11:41 ` Joel Becker
@ 2007-09-20 12:05   ` Mark Fasheh
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2007-09-20 12:05 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Sep 20, 2007 at 11:40:47AM -0700, Joel Becker wrote:
> On Mon, Sep 10, 2007 at 05:30:26PM -0700, Mark Fasheh wrote:
> > filldir_t can take this, so don't turn de->inode into a 32 bit value. Right
> > now this doesn't make a difference since no ocfs2 inodes overflow that, but
> > it could be a nasty surprise later on if some kernel code is calling
> > ocfs2_dir_foreach_blk() and expecting real inode numbers back...
> 
> 	How come we don't have inodes overflowing 32bits?  Is this a
> limit imposed elsewhere?  Refresh my (swiss cheese) memory :-)

Sure - basically since JBD (version 1) doesn't allow for larger than 32 bits
worth of blocks, mkfs.ocfs2 prevents such a file system from being created
and hence there's no way that we can overflow 32 bits with i_ino today.

Last I checked, JBD2 has Zach's patches to understand 64 bit block numbers.

Once we move over to that, we're going to have to figure out what to do and
it's at that point where I figure we'll have to revisit this anyway. It
seems that we might have to just always restrict inode blocks to 32 bits
anyway because of abi issues beyond our control, but that's a conversation
for another day :)


> 	I actually think that the -EOVERFLOW from filldir(7) is better
> than our truncated ino, so I still say

Yeah, agreed. I'd rather get an obvious error and be force to fix it at the
source than silently return bad information.
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com

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

end of thread, other threads:[~2007-09-20 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 13:12 [Ocfs2-devel] [PATCH 05/15] ocfs2: Pass raw u64 to filldir Mark Fasheh
2007-09-20 11:41 ` Joel Becker
2007-09-20 12:05   ` Mark Fasheh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.