diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-05-15 10:37:50 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-07-09 03:22:24 -0400 |
commit | dbb7cae2a36170cd17ffbe286ec0c91a998740ff (patch) | |
tree | 1f4da65b07ac31648fe9b72f2742075486a86008 /include | |
parent | 41d7db0ab437bc84f8a6e77cccc626ce937605ac (diff) |
[GFS2] Clean up inode number handling
This patch cleans up the inode number handling code. The main difference
is that instead of looking up the inodes using a struct gfs2_inum_host
we now use just the no_addr member of this structure. The tests relating
to no_formal_ino can then be done by the calling code. This has
advantages in that we want to do different things in different code
paths if the no_formal_ino doesn't match. In the NFS patch we want to
return -ESTALE, but in the ->lookup() path, its a bug in the fs if the
no_formal_ino doesn't match and thus we can withdraw in this case.
In order to later fix bz #201012, we need to be able to look up an inode
without knowing no_formal_ino, as the only information that is known to
us is the on-disk location of the inode in question.
This patch will also help us to fix bz #236099 at a later date by
cleaning up a lot of the code in that area.
There are no user visible changes as a result of this patch and there
are no changes to the on-disk format either.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gfs2_ondisk.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 8b7e4c1e32ae..a82ec8c62eff 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -59,13 +59,6 @@ struct gfs2_inum_host { | |||
59 | __u64 no_addr; | 59 | __u64 no_addr; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static inline int gfs2_inum_equal(const struct gfs2_inum_host *ino1, | ||
63 | const struct gfs2_inum_host *ino2) | ||
64 | { | ||
65 | return ino1->no_formal_ino == ino2->no_formal_ino && | ||
66 | ino1->no_addr == ino2->no_addr; | ||
67 | } | ||
68 | |||
69 | /* | 62 | /* |
70 | * Generic metadata head structure | 63 | * Generic metadata head structure |
71 | * Every inplace buffer logged in the journal must start with this. | 64 | * Every inplace buffer logged in the journal must start with this. |
@@ -509,9 +502,9 @@ struct gfs2_quota_change_host { | |||
509 | 502 | ||
510 | #ifdef __KERNEL__ | 503 | #ifdef __KERNEL__ |
511 | /* Translation functions */ | 504 | /* Translation functions */ |
505 | struct gfs2_inode; | ||
512 | 506 | ||
513 | extern void gfs2_inum_in(struct gfs2_inum_host *no, const void *buf); | 507 | extern void gfs2_inum_out(const struct gfs2_inode *ip, struct gfs2_dirent *dent); |
514 | extern void gfs2_inum_out(const struct gfs2_inum_host *no, void *buf); | ||
515 | extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); | 508 | extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); |
516 | extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); | 509 | extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf); |
517 | extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); | 510 | extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf); |