aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-01-30 13:34:10 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-01-30 13:34:10 -0500
commitf42faf4fa4eaf7e108dd60f3f2ca5c6e9b45352c (patch)
tree23bf95db3b941a4b14f8b90f98a8aaa663ed6c81 /fs/gfs2/super.c
parentfd2ee6bb1ef02dfe1f1e1f5b44322e0854596e9a (diff)
[GFS2] Add gfs2_internal_read()
Add the new external read function. Its temporarily in jdata.c even though the protoype is in ops_file.h - this will change shortly. The current implementation will change to a page cache one when that happens. In order to effect the above changes, the various internal inodes now have Linux inodes attached to them. We keep the references to the Linux inodes, rather than the gfs2_inodes in the super block. In order to get everything to work correctly I've had to reorder the init sequence on mount (which I should probably have done earlier when .gfs2_admin was made visible). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index cab7ab5fb506..bae32ba0c481 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -271,7 +271,7 @@ int gfs2_do_upgrade(struct gfs2_sbd *sdp, struct gfs2_glock *sb_gl)
271 271
272int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) 272int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
273{ 273{
274 struct gfs2_inode *dip = sdp->sd_jindex; 274 struct gfs2_inode *dip = get_v2ip(sdp->sd_jindex);
275 struct qstr name; 275 struct qstr name;
276 char buf[20]; 276 char buf[20];
277 struct gfs2_jdesc *jd; 277 struct gfs2_jdesc *jd;
@@ -289,7 +289,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
289 289
290 name.len = sprintf(buf, "journal%u", sdp->sd_journals); 290 name.len = sprintf(buf, "journal%u", sdp->sd_journals);
291 291
292 error = gfs2_dir_search(sdp->sd_jindex, &name, NULL, NULL); 292 error = gfs2_dir_search(get_v2ip(sdp->sd_jindex), &name, NULL, NULL);
293 if (error == -ENOENT) { 293 if (error == -ENOENT) {
294 error = 0; 294 error = 0;
295 break; 295 break;
@@ -437,6 +437,7 @@ int gfs2_jdesc_check(struct gfs2_jdesc *jd)
437 437
438int gfs2_lookup_master_dir(struct gfs2_sbd *sdp) 438int gfs2_lookup_master_dir(struct gfs2_sbd *sdp)
439{ 439{
440 struct inode *inode = NULL;
440 struct gfs2_glock *gl; 441 struct gfs2_glock *gl;
441 int error; 442 int error;
442 443
@@ -444,8 +445,8 @@ int gfs2_lookup_master_dir(struct gfs2_sbd *sdp)
444 sdp->sd_sb.sb_master_dir.no_addr, 445 sdp->sd_sb.sb_master_dir.no_addr,
445 &gfs2_inode_glops, CREATE, &gl); 446 &gfs2_inode_glops, CREATE, &gl);
446 if (!error) { 447 if (!error) {
447 error = gfs2_inode_get(gl, &sdp->sd_sb.sb_master_dir, CREATE, 448 error = gfs2_lookup_simple(sdp->sd_root_dir, ".gfs2_admin", &inode);
448 &sdp->sd_master_dir); 449 sdp->sd_master_dir = inode;
449 gfs2_glock_put(gl); 450 gfs2_glock_put(gl);
450 } 451 }
451 452
@@ -549,9 +550,9 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp)
549 550
550int gfs2_statfs_init(struct gfs2_sbd *sdp) 551int gfs2_statfs_init(struct gfs2_sbd *sdp)
551{ 552{
552 struct gfs2_inode *m_ip = sdp->sd_statfs_inode; 553 struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode);
553 struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; 554 struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master;
554 struct gfs2_inode *l_ip = sdp->sd_sc_inode; 555 struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode);
555 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; 556 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local;
556 struct buffer_head *m_bh, *l_bh; 557 struct buffer_head *m_bh, *l_bh;
557 struct gfs2_holder gh; 558 struct gfs2_holder gh;
@@ -598,7 +599,7 @@ int gfs2_statfs_init(struct gfs2_sbd *sdp)
598void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, 599void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free,
599 int64_t dinodes) 600 int64_t dinodes)
600{ 601{
601 struct gfs2_inode *l_ip = sdp->sd_sc_inode; 602 struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode);
602 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; 603 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local;
603 struct buffer_head *l_bh; 604 struct buffer_head *l_bh;
604 int error; 605 int error;
@@ -624,8 +625,8 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free,
624 625
625int gfs2_statfs_sync(struct gfs2_sbd *sdp) 626int gfs2_statfs_sync(struct gfs2_sbd *sdp)
626{ 627{
627 struct gfs2_inode *m_ip = sdp->sd_statfs_inode; 628 struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode);
628 struct gfs2_inode *l_ip = sdp->sd_sc_inode; 629 struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode);
629 struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; 630 struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master;
630 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; 631 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local;
631 struct gfs2_holder gh; 632 struct gfs2_holder gh;