aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-08-27 10:51:07 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2009-08-27 10:51:07 -0400
commit8d8291ae93ecb4a246e87e452d55cca412373300 (patch)
treeccf67c703fb9f9b2e4ee945f3221b8b20c1804db /fs/gfs2/super.c
parent307cf6e63cfa5025589ea1a06db44439a43819ff (diff)
GFS2: Remove no_formal_ino generating code
The inum structure used throughout GFS2 has two fields. One no_addr is the disk block number of the inode in question and is used everywhere as the inode number. The other, no_formal_ino, is used only as the generation number for NFS. Historically the no_formal_ino field was set using a complicated system of one global and one per-node file containing inode numbers in order to ensure that each no_formal_ino was unique. Also this code made no provision for what would happen when eventually the (64 bit) numbers ran out. Now I know that is pretty unlikely to happen given the large space of numbers, but it is possible nevertheless. The only guarantee required for no_formal_ino is that, for any single inode, the same number doesn't get reused too quickly. We already have a generation number which is kept in the inode and initialised from a counter in the resource group (almost no overhead, since we have to touch the resource group anyway in order to allocate an inode in the first place). Aside from ensuring that we never use the value 0 in the no_formal_ino field, we can use that counter directly. As a result of that change, we lose about 200 lines of code and also gain about 10 creates/sec on the postmark benchmark (on my test machine). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 2e78a3f68a76..d95cf777d244 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -788,7 +788,6 @@ restart:
788 /* Release stuff */ 788 /* Release stuff */
789 789
790 iput(sdp->sd_jindex); 790 iput(sdp->sd_jindex);
791 iput(sdp->sd_inum_inode);
792 iput(sdp->sd_statfs_inode); 791 iput(sdp->sd_statfs_inode);
793 iput(sdp->sd_rindex); 792 iput(sdp->sd_rindex);
794 iput(sdp->sd_quota_inode); 793 iput(sdp->sd_quota_inode);
@@ -799,10 +798,8 @@ restart:
799 if (!sdp->sd_args.ar_spectator) { 798 if (!sdp->sd_args.ar_spectator) {
800 gfs2_glock_dq_uninit(&sdp->sd_journal_gh); 799 gfs2_glock_dq_uninit(&sdp->sd_journal_gh);
801 gfs2_glock_dq_uninit(&sdp->sd_jinode_gh); 800 gfs2_glock_dq_uninit(&sdp->sd_jinode_gh);
802 gfs2_glock_dq_uninit(&sdp->sd_ir_gh);
803 gfs2_glock_dq_uninit(&sdp->sd_sc_gh); 801 gfs2_glock_dq_uninit(&sdp->sd_sc_gh);
804 gfs2_glock_dq_uninit(&sdp->sd_qc_gh); 802 gfs2_glock_dq_uninit(&sdp->sd_qc_gh);
805 iput(sdp->sd_ir_inode);
806 iput(sdp->sd_sc_inode); 803 iput(sdp->sd_sc_inode);
807 iput(sdp->sd_qc_inode); 804 iput(sdp->sd_qc_inode);
808 } 805 }