/* Initialize the server, then go to work. */
init_server();
- printf("\nMFS(%d): STARTED: Logging in to VFS\n", SELF_E);
fs_m_in.m_type = FS_READY;
if (sendrec(FS_PROC_NR, &fs_m_in) != OK) {
reply(FS_PROC_NR, &fs_m_out);
if (fs_m_out.m_type != OK) return -1;
}
- printf("MFS(%d): Login + Readsuper OK\n", SELF_E);
for (;;) {
fs_m_out.RES_MAXSIZE = sp->s_max_size;
fs_m_out.RES_BLOCKSIZE = sp->s_block_size;
-if (r == OK)
- printf("MFS(%d)readsuper DEV: %d driver_e: %d BOOTT: %d\n",
- SELF_E, fs_dev, fs_m_in.REQ_DRIVER_E, boottime);
return r;
}
PUBLIC int fs_stime()
{
boottime = fs_m_in.REQ_BOOTTIME;
-printf("MFS(%d) boottime: %d\n", SELF_E, boottime);
return OK;
}
/* Issue request */
if ((r = req_access(&access_req)) != OK) {
- printf("VFSexec: access failed\n");
+ printf("VFSexec: access failed for %s\n", progname);
return r;
}
}
/* Wait FS login message */
if (last_login_fs_e != ROOT_FS_E) {
- printf("VFS: Waiting for login from FS_e %d\n", ROOT_FS_E);
/* Wait FS login message */
if (receive(ROOT_FS_E, &m) != OK) {
printf("VFS: Error receiving login request from FS_e %d\n",
ROOT_FS_E);
panic(__FILE__, "Error receiving login request from root filesystem\n", ROOT_FS_E);
}
- printf("VFS: FS_e %d logged in\n", ROOT_FS_E);
}
last_login_fs_e = 0;
/* Login before mount request */
if ((unsigned long)mount_m_in.m1_p3 != who_e) {
last_login_fs_e = who_e;
-printf("VFS: FS_e %d logged in\n", last_login_fs_e);
return SUSPEND;
}
/* Login after a suspended mount */
super_user = (fp->fp_effuid == SU_UID ? TRUE : FALSE); /* su? */
-printf("VFS: FS_e %d logged in. Mount WAKEN UP\n", (unsigned int)m_in.m1_p3);
return do_mount();
}
}
/* If FS not yet logged in, save message and suspend mount */
if (last_login_fs_e != fs_e) {
mount_m_in = m_in;
- printf("VFS: FS_e %d not yet logged in. Mount SUSPENDED\n", fs_e);
return SUSPEND;
}
for (bspec = &vnode[0]; bspec < &vnode[NR_VNODES]; ++bspec) {
if (bspec->v_count > 0 && bspec->v_sdev == dev) {
/* Found, sync the buffer cache */
-printf("VFSmount: minor is opened as a block spec file, sync cache...\n");
req_sync(bspec->v_fs_e);
break;
/* Note: there are probably some blocks in the FS process' buffer
return(EINVAL);
}
-printf("VFSmount: FS_e: %d mp: %s D_e: %d\n", fs_e, user_fullpath,
- dp->dmap_driver);
-
/* Request for reading superblock and root inode */
sreq.fs_e = fs_e;
sreq.readonly = m_in.rd_only;
/* Issue request */
if ((r = req_readsuper(&sreq, &sres)) != OK) {
-printf("VFSmount: reading superb error dev: %d\n", dev);
+ printf("VFSmount: reading superblock error dev: %d\n", dev);
dev_close(dev);
return r;
}
return -1;
}
-printf("VFSfs_exit: Bringing down FS endp: %d (pid: %d)\n", fs_e, fs_pid);
-
/* Ask RS to stop process */
m.RS_PID = fs_pid;
if (OK != (r = _taskcall(RS_PROC_NR, RS_DOWN, &m))) {
/* Check whether the device is mounted or not */
found = 0;
if (r == OK) {
-printf("VFS: opening block spec %d, handled by ", vp->v_sdev);
for (vmp = &vmnt[0]; vmp < &vmnt[NR_MNTS]; ++vmp) {
if (vmp->m_dev == vp->v_sdev) {
found = 1;
/* Who is going to be responsible for this device? */
if (found) {
-printf("the FS of the mounted partition...\n");
vp->v_bfs_e = vmp->m_fs_e;
vp->v_blocksize - vmp->m_block_size;
}
else { /* To be handled in the root FS proc if not mounted */
-printf("the root FS...\n");
vp->v_bfs_e = ROOT_FS_E;
vp->v_blocksize = _MIN_BLOCK_SIZE;
}
if (mode_word == I_CHAR_SPECIAL || mode_word == I_BLOCK_SPECIAL) {
dev = (dev_t) vp->v_sdev;
if (mode_word == I_BLOCK_SPECIAL) {
-printf("VFSclose: closing block spec 0x%x\n", dev);
if (vp->v_bfs_e == ROOT_FS_E)
{
/* Invalidate the cache unless the special is
* mounted. Assume that the root filesystem's
* is open only for fsck.
*/
-printf("VFSclose: flushing block spec 0x%x\n", dev);
req_flush(vp->v_bfs_e, dev);
}
}