|
|
| version 1.12, 2004/03/01 06:33:20 | version 1.13, 2004/04/08 20:57:52 |
|---|---|
| Line 126 static int ext2_mountroot (void); | Line 126 static int ext2_mountroot (void); |
| #define ROOTNAME "root_device" | #define ROOTNAME "root_device" |
| static int | static int |
| ext2_mountroot() | ext2_mountroot(void) |
| { | { |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| struct mount *mp; | struct mount *mp; |
| Line 179 ext2_mountroot() | Line 179 ext2_mountroot() |
| * mount system call | * mount system call |
| */ | */ |
| static int | static int |
| ext2_mount(mp, path, data, ndp, td) | ext2_mount(struct mount *mp, char *path, |
| struct mount *mp; | caddr_t data, /* this is actually a (struct ufs_args *) */ |
| char *path; | struct nameidata *ndp, struct thread *td) |
| caddr_t data; /* this is actually a (struct ufs_args *) */ | |
| struct nameidata *ndp; | |
| struct thread *td; | |
| { | { |
| struct vnode *devvp; | struct vnode *devvp; |
| struct ufs_args args; | struct ufs_args args; |
| Line 328 ext2_mount(mp, path, data, ndp, td) | Line 325 ext2_mount(mp, path, data, ndp, td) |
| * checks that the data in the descriptor blocks make sense | * checks that the data in the descriptor blocks make sense |
| * this is taken from ext2/super.c | * this is taken from ext2/super.c |
| */ | */ |
| static int ext2_check_descriptors (struct ext2_sb_info * sb) | static int ext2_check_descriptors(struct ext2_sb_info *sb) |
| { | { |
| int i; | int i; |
| int desc_block = 0; | int desc_block = 0; |
| Line 378 static int ext2_check_descriptors (struc | Line 375 static int ext2_check_descriptors (struc |
| } | } |
| static int | static int |
| ext2_check_sb_compat(es, dev, ronly) | ext2_check_sb_compat(struct ext2_super_block *es, dev_t dev, int ronly) |
| struct ext2_super_block *es; | |
| dev_t dev; | |
| int ronly; | |
| { | { |
| if (es->s_magic != EXT2_SUPER_MAGIC) { | if (es->s_magic != EXT2_SUPER_MAGIC) { |
| printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", | printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", |
| devtoname(dev), es->s_magic, EXT2_SUPER_MAGIC); | devtoname(dev), es->s_magic, EXT2_SUPER_MAGIC); |
| Line 411 ext2_check_sb_compat(es, dev, ronly) | Line 404 ext2_check_sb_compat(es, dev, ronly) |
| * this computes the fields of the ext2_sb_info structure from the | * this computes the fields of the ext2_sb_info structure from the |
| * data in the ext2_super_block structure read in | * data in the ext2_super_block structure read in |
| */ | */ |
| static int compute_sb_data(devvp, es, fs) | static int |
| struct vnode * devvp; | compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, |
| struct ext2_super_block * es; | struct ext2_sb_info *fs) |
| struct ext2_sb_info * fs; | |
| { | { |
| int db_count, error; | int db_count, error; |
| int i, j; | int i, j; |
| Line 534 struct scaninfo { | Line 526 struct scaninfo { |
| }; | }; |
| static int | static int |
| ext2_reload(mountp, cred, td) | ext2_reload(struct mount *mountp, struct ucred *cred, struct thread *td) |
| struct mount *mountp; | |
| struct ucred *cred; | |
| struct thread *td; | |
| { | { |
| struct vnode *devvp; | struct vnode *devvp; |
| struct buf *bp; | struct buf *bp; |
| Line 644 ext2_reload_scan2(struct mount *mp, stru | Line 633 ext2_reload_scan2(struct mount *mp, stru |
| * Common code for mount and mountroot | * Common code for mount and mountroot |
| */ | */ |
| static int | static int |
| ext2_mountfs(devvp, mp, td) | ext2_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) |
| struct vnode *devvp; | |
| struct mount *mp; | |
| struct thread *td; | |
| { | { |
| struct ufsmount *ump; | struct ufsmount *ump; |
| struct buf *bp; | struct buf *bp; |
| Line 786 out: | Line 772 out: |
| * unmount system call | * unmount system call |
| */ | */ |
| static int | static int |
| ext2_unmount(mp, mntflags, td) | ext2_unmount(struct mount *mp, int mntflags, struct thread *td) |
| struct mount *mp; | |
| int mntflags; | |
| struct thread *td; | |
| { | { |
| struct ufsmount *ump; | struct ufsmount *ump; |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| Line 841 ext2_unmount(mp, mntflags, td) | Line 824 ext2_unmount(mp, mntflags, td) |
| * Flush out all the files in a filesystem. | * Flush out all the files in a filesystem. |
| */ | */ |
| static int | static int |
| ext2_flushfiles(mp, flags, td) | ext2_flushfiles(struct mount *mp, int flags, struct thread *td) |
| struct mount *mp; | |
| int flags; | |
| struct thread *td; | |
| { | { |
| struct ufsmount *ump; | struct ufsmount *ump; |
| int error; | int error; |
| Line 877 ext2_flushfiles(mp, flags, td) | Line 857 ext2_flushfiles(mp, flags, td) |
| * taken from ext2/super.c ext2_statfs | * taken from ext2/super.c ext2_statfs |
| */ | */ |
| static int | static int |
| ext2_statfs(mp, sbp, td) | ext2_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) |
| struct mount *mp; | |
| struct statfs *sbp; | |
| struct thread *td; | |
| { | { |
| unsigned long overhead; | unsigned long overhead; |
| struct ufsmount *ump; | struct ufsmount *ump; |
| Line 940 static int ext2_sync_scan(struct mount * | Line 917 static int ext2_sync_scan(struct mount * |
| lwkt_tokref_t vlock, void *data); | lwkt_tokref_t vlock, void *data); |
| static int | static int |
| ext2_sync(mp, waitfor, td) | ext2_sync(struct mount *mp, int waitfor, struct thread *td) |
| struct mount *mp; | |
| int waitfor; | |
| struct thread *td; | |
| { | { |
| struct ufsmount *ump = VFSTOUFS(mp); | struct ufsmount *ump = VFSTOUFS(mp); |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| Line 994 ext2_sync(mp, waitfor, td) | Line 968 ext2_sync(mp, waitfor, td) |
| static int | static int |
| ext2_sync_scan(struct mount *mp, struct vnode *vp, | ext2_sync_scan(struct mount *mp, struct vnode *vp, |
| lwkt_tokref_t vlock, void *data) | lwkt_tokref_t vlock, void *data) |
| { | { |
| struct scaninfo *info = data; | struct scaninfo *info = data; |
| struct inode *ip; | struct inode *ip; |
| Line 1028 ext2_sync_scan(struct mount *mp, struct | Line 1002 ext2_sync_scan(struct mount *mp, struct |
| * done by the calling routine. | * done by the calling routine. |
| */ | */ |
| static int | static int |
| ext2_vget(mp, ino, vpp) | ext2_vget(struct mount *mp, ino_t ino, struct vnode **vpp) |
| struct mount *mp; | |
| ino_t ino; | |
| struct vnode **vpp; | |
| { | { |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| struct inode *ip; | struct inode *ip; |
| Line 1180 printf("ext2_vget(%d) dbn= %d ", ino, fs | Line 1151 printf("ext2_vget(%d) dbn= %d ", ino, fs |
| * those rights via. exflagsp and credanonp | * those rights via. exflagsp and credanonp |
| */ | */ |
| static int | static int |
| ext2_fhtovp(mp, fhp, vpp) | ext2_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) |
| struct mount *mp; | |
| struct fid *fhp; | |
| struct vnode **vpp; | |
| { | { |
| struct ufid *ufhp; | struct ufid *ufhp; |
| struct ext2_sb_info *fs; | struct ext2_sb_info *fs; |
| Line 1201 ext2_fhtovp(mp, fhp, vpp) | Line 1169 ext2_fhtovp(mp, fhp, vpp) |
| */ | */ |
| /* ARGSUSED */ | /* ARGSUSED */ |
| static int | static int |
| ext2_vptofh(vp, fhp) | ext2_vptofh(struct vnode *vp, struct fid *fhp) |
| struct vnode *vp; | |
| struct fid *fhp; | |
| { | { |
| struct inode *ip; | struct inode *ip; |
| struct ufid *ufhp; | struct ufid *ufhp; |
| Line 1220 ext2_vptofh(vp, fhp) | Line 1186 ext2_vptofh(vp, fhp) |
| * Write a superblock and associated information back to disk. | * Write a superblock and associated information back to disk. |
| */ | */ |
| static int | static int |
| ext2_sbupdate(mp, waitfor) | ext2_sbupdate(struct ufsmount *mp, int waitfor) |
| struct ufsmount *mp; | |
| int waitfor; | |
| { | { |
| struct ext2_sb_info *fs = mp->um_e2fs; | struct ext2_sb_info *fs = mp->um_e2fs; |
| struct ext2_super_block *es = fs->s_es; | struct ext2_super_block *es = fs->s_es; |
| Line 1242 printf("\nupdating superblock, waitfor=% | Line 1206 printf("\nupdating superblock, waitfor=% |
| * The buffers for group descriptors, inode bitmaps and block bitmaps | * The buffers for group descriptors, inode bitmaps and block bitmaps |
| * are not busy at this point and are (hopefully) written by the | * are not busy at this point and are (hopefully) written by the |
| * usual sync mechanism. No need to write them here | * usual sync mechanism. No need to write them here |
| */ | */ |
| return (error); | return (error); |
| } | } |