Re: [Jfs4bsd-devel] Draft version of jfs_mount for review and addition
Status: Alpha
Brought to you by:
h_pandya
|
From: Hiten P. <hit...@ya...> - 2002-06-24 08:32:47
|
--- Sergey Lyubka <de...@as...> wrote: > Hi Hiten, Hi! :) > few comments about the patch. > > line 187: you're calling chkSuper, > but superblock has not being read into memory yet, > and mout structure has not being alloc-ed. I apologise, but if you have a look at the code for chkSuper() which is in the JFS4BSD repository, (sorry, I didn't include it in the patch because it is not ported yet) then you will notice that it is chkSuper() which does the reading of the superblock into memory; or am I missing a point? > i suggest to move lines starting from 253 (device checking > and allocating mount struct) to the beginning of the function. > > then, you have to alloc the space for the superblock. > I've done that when allocing mount struct : > > line 286, > MALLOC(jmp, struct jfsmount *, sizeof(struct jfsmount) + > sizeof(struct jfs_superblock), M_JFSMNT, M_WAITOK | M_ZERO); > > jmp->sbp = (struct jfs_superblock *) > ((char *) jmp + sizeof(struct jfsmount)) > > then, before suberblock sanity checking, > when devvp is open, read the superblock into memory, > something like > > struct buf *bp = NULL; > bread(devvp, SUPER1_B, DEV_BSIZE, NOCRED, &bp); > bcopy(jmp->sbp, bp->b_data, sizeof(struct jfs_superblock)); I believe this is done by the readSuper() method, which is also in the JFS4BSD CVS repo. It should read the first superblock, and the alternate superblock if the first one is not present. I have renamed readSuper() to jfs_readSuper() in the patch; we need to expand the rawRead() functions used by jfs_readSuper() to the respective bread()/bwrite(); I am in the process of doing that. :) > we allocate 3 inodes during mount: > aggregate 'self' inode (jmp->ipaimap), > filesystem 'self' inode (jmp->ipimap), > and block allocation map inode (jmp->ipbmap). > i think the comment in jfsmoun.h about ipimap inode, should be > changed. it is the 'filesystem' imap inode, not an aggregate one. According to JFS terms, this is what it should be; Greg, what do you say about this, shall we change the comment to say: "fileset inode"? Apart from that, is there anything "missing" in the jfs_mountfs() code, which I should have know about, or any tips or suggestions? Regards. -- Hiten -- <hi...@uk...> __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |