Messages in this thread Patch in this message | | | Date | Sun, 25 Oct 98 20:37 MET | From | (Matija Nalis) | Subject | Re: .126 umsdos oopzen |
| |
On Sat, 24 Oct 1998 08:44:54 -0400 (EDT), Rick Hohensee <humbubba@raptor.cqi.com> wrote: >I got a fresh whole 2.1.126, got awk so I could menuconfig, >pointed gcc 2.7.2.3 at it, and it wouldn't link. umsdos >stuff unfound. I looked in fs/umsdos/dir.c, and that static >thing Sulmicki took out in his patch, or something similar, >still seemed to be there. Anyway, I deleted one occurence
Yes. Both this compile_umsdos_in_kernel, and root_partition_is_umsdos are fixed (mostly); unfortunately, I didn't managed to get Linus to include it in standard kernel yet (Yes, I keep trying :). Diffs for umsdosfs against 2.1.126 are attached, please try them and see if they fix the problem.
Booting off umsdos partition won't work in plain 2.1.126 without this patch.
>are telling me is sdc sdb and sda. This is on >an MCA PS2.
This is not (should not be) umsdos related, so I wouldn't know (no more MCA machines around for some time. Waiting for Thinkpad 720 to get back)
>I hope there's some info there for somebody. I could use some.
Hope this diff helps.
diff -ur linux-2.1.126pre2/fs/umsdos/README-WIP.txt linux-my/fs/umsdos/README-WIP.txt --- linux-2.1.126pre2/fs/umsdos/README-WIP.txt Mon Oct 19 02:36:15 1998 +++ linux-my/fs/umsdos/README-WIP.txt Sun Oct 18 22:51:10 1998 @@ -1,6 +1,6 @@ Changes by Matija Nalis (mnalis@jagor.srce.hr) on umsdos dentry fixing (started by Peter T. Waltenberg <peterw@karaka.chch.cri.nz>) -Final conversion to dentries Bill Hawes <whawes@star.net> +(Final conversion to dentries Bill Hawes <whawes@star.net>) ---------- WARNING --------- WARNING --------- WARNING ----------- There is no warning any more. @@ -16,7 +16,7 @@ Legend: those lines marked with '+' on the beggining of line indicates it passed all of my tests, and performed perfect in all of them. -Current status (980915) - UMSDOS dentry-Beta 0.83: +Current status (981018) - UMSDOS dentry-Beta 0.83: (1) pure MSDOS (no --linux-.--- EMD file): @@ -47,18 +47,18 @@ + read file - works + switching MSDOS/UMSDOS - works + switching UMSDOS/MSDOS - works -- pseudo root things - DOES NOT WORK. COMMENTED OUT. See Notes below. +- pseudo root things - works mostly. See notes below. + resolve symlink - works + dereference symlink - works + dangling symlink - works -- hard links - DOES NOT WORK CORRECTLY ALWAYS. +- hard links - seems to work mostly + special files (block/char devices, FIFOs, sockets...) - works - various umsdos ioctls - works WRITE: -- create symlink - sometimes works, but see WARNING below -- create hardlink - works +- create symlink - works mostly, but see WARNING below +- create hardlink - works, but see portability WARNING below + create file - works + create special file - works + write to file - works @@ -88,7 +88,8 @@ Note: creating and using pseudo-hardlinks is always non-perfect, especially in filesystems that might be externally modified like umsdos. There is -example is specs file about it. +example is specs file about it. Specifically, moving directory which +contains hardlinks will break them. Warning: moving symlinks around may break them until umount/remount. @@ -97,17 +98,22 @@ file instead of symlink until next umount/mount pair. Tracking this one down... -Wanted: I am currently looking for volunteers that already have UMSDOS -filesystems in pseudo-root, or are able to get them, to test PSEUDO-ROOT -stuff (and get new patches from me), which I currently can't do. Anyone know -of URL of nice UMSDOS pseudo-root ready image ? As always, any patches or -pointer to things done in wrong way (or ideas of better ways) are greatly -appreciated ! - -Note: If you are currently trying to use UMSDOS as root partition (with -linux installed in c:\linux) it will not work. Pseudo-root is currently -commented out. See 'wanted' above and contact me if you are interested in -testing it. +Note: (about pseudoroot) If you are currently trying to use UMSDOS as root +partition (with linux installed in c:\linux) it will boot, but there are +some problems. Volunteers ready to test pseudoroot are needed (preferably +ones with working backups or unimportant data). There are problems with +different interpretation of hard links in normal in pseudo-root modes, +resulting is 'silent delete' of them sometimes. Also, '/DOS' pseudo +directory is only partially re-implemented and buggy. It works most of the +time, though. + +Warning: (about creating hardlinks in pseudoroot mode) - hardlinks created in +pseudoroot mode are not compatibile with 'normal' hardlinks, and vice versa. +That is because harlink which is /foo in pseudoroot mode, becomes +/linux/foo in normal mode. I'm thinking about this one. However, since most +people either always use pseudoroot, or always use normal umsdos filesystem, +this is no showstopper. + ------------------------------------------------------------------------------ diff -ur linux-2.1.126pre2/fs/umsdos/check.c linux-my/fs/umsdos/check.c --- linux-2.1.126pre2/fs/umsdos/check.c Mon Oct 19 02:36:02 1998 +++ linux-my/fs/umsdos/check.c Mon Oct 19 02:46:56 1998 @@ -13,6 +13,7 @@ #include <linux/ptrace.h> #include <linux/mman.h> #include <linux/mm.h> +#include <linux/umsdos_fs.h> #include <asm/system.h> @@ -75,6 +76,7 @@ /* * check an inode */ +extern struct inode_operations umsdos_rdir_inode_operations; void check_inode (struct inode *inode) { diff -ur linux-2.1.126pre2/fs/umsdos/dir.c linux-my/fs/umsdos/dir.c --- linux-2.1.126pre2/fs/umsdos/dir.c Mon Oct 19 02:36:21 1998 +++ linux-my/fs/umsdos/dir.c Mon Oct 19 01:05:41 1998 @@ -44,7 +44,7 @@ } } -static struct dentry_operations umsdos_dentry_operations = +struct dentry_operations umsdos_dentry_operations = { umsdos_dentry_validate, /* d_validate(struct dentry *) */ NULL, /* d_hash */ @@ -123,7 +123,6 @@ if (filp->f_pos == UMSDOS_SPECIAL_DIRFPOS && dir == pseudo_root && !internal_read) { -Printk (("umsdos_readdir_x: what UMSDOS_SPECIAL_DIRFPOS /mn/?\n")); /* * We don't need to simulate this pseudo directory * when umsdos_readdir_x is called for internal operation @@ -134,6 +133,8 @@ * linux root), it simulate a directory /DOS which points to * the real root of the file system. */ + + Printk ((KERN_WARNING "umsdos_readdir_x: pseudo_root thing UMSDOS_SPECIAL_DIRFPOS\n")); if (filldir (dirbuf, "DOS", 3, UMSDOS_SPECIAL_DIRFPOS, UMSDOS_ROOT_INO) == 0) { filp->f_pos++; @@ -477,6 +478,7 @@ * A lookup of DOS in the pseudo root will always succeed * and return the inode of the real root. */ + Printk ((KERN_DEBUG "umsdos_lookup_x: following /DOS\n")); inode = saved_root->d_inode; goto out_add; } @@ -542,7 +544,7 @@ * which are recorded independently of the pseudo-root * mode. */ -printk(KERN_WARNING "umsdos_lookup_x: untested, inode == Pseudo_root\n"); +printk("umsdos_lookup_x: skipping DOS/linux\n"); ret = -ENOENT; goto out_dput; } @@ -557,7 +559,7 @@ ret = 0; out_dput: - if (dret != dentry) + if (dret && dret != dentry) d_drop(dret); dput(dret); out: diff -ur linux-2.1.126pre2/fs/umsdos/inode.c linux-my/fs/umsdos/inode.c --- linux-2.1.126pre2/fs/umsdos/inode.c Mon Oct 19 02:36:21 1998 +++ linux-my/fs/umsdos/inode.c Mon Oct 19 02:49:25 1998 @@ -148,13 +148,13 @@ { struct inode *inode = dentry->d_inode; -Printk (("umsdos_patch_dentry_inode: inode=%lu\n", inode->i_ino)); +PRINTK (("umsdos_patch_dentry_inode: inode=%lu\n", inode->i_ino)); /* * Classify the inode based on EMD/non-EMD status. */ -Printk (("umsdos_patch_inode: call x_set_dirinfo(%p,%p,%lu)\n", -inode, dir, f_pos)); +PRINTK (("umsdos_patch_inode: call umsdos_set_dirinfo_new(%p,%lu)\n", +dentry, f_pos)); umsdos_set_dirinfo_new(dentry, f_pos); inode->u.umsdos_i.i_emd_dir = 0; @@ -275,8 +275,8 @@ fill_new_filp (&filp, demd); filp.f_pos = inode->u.umsdos_i.pos; -Printk(("UMSDOS_notify_change: %s/%s reading at %u\n", -dentry->d_parent->d_name.name, dentry->d_name.name, filp.f_pos)); +Printk(("UMSDOS_notify_change: %s/%s reading at %d\n", +dentry->d_parent->d_name.name, dentry->d_name.name, (int) filp.f_pos)); /* Read only the start of the entry since we don't touch the name */ ret = umsdos_emd_dir_read (&filp, (char *) &entry, UMSDOS_REC_SIZE); @@ -398,11 +398,14 @@ /* Check whether to change to the /linux root */ new_root = check_pseudo_root(sb); + if (new_root) { - pseudo_root = new_root->d_inode; /* sanity check */ if (new_root->d_op != &umsdos_dentry_operations) printk("umsdos_read_super: pseudo-root wrong ops!\n"); + + pseudo_root = new_root->d_inode; + saved_root = sb->s_root; sb->s_root = new_root; printk(KERN_INFO "UMSDOS: changed to alternate root\n"); @@ -411,6 +414,9 @@ /* if d_count is not 1, mount will fail with -EBUSY! */ if (sb->s_root->d_count > 1) { shrink_dcache_sb(sb); + if (sb->s_root->d_count > 1) { + printk(KERN_ERR "UMSDOS: root count %d > 1 !", sb->s_root->d_count); + } } return sb; diff -ur linux-2.1.126pre2/fs/umsdos/namei.c linux-my/fs/umsdos/namei.c --- linux-2.1.126pre2/fs/umsdos/namei.c Mon Oct 19 02:36:21 1998 +++ linux-my/fs/umsdos/namei.c Sat Oct 10 15:06:30 1998 @@ -1033,12 +1033,12 @@ if (empty == 1) { struct dentry *demd; -Printk (("UMSDOS_rmdir: unlinking empty EMD err=%d", err)); demd = umsdos_get_emd_dentry(dentry); if (!IS_ERR(demd)) { err = -ENOENT; if (demd->d_inode) err = msdos_unlink (dentry->d_inode, demd); +Printk (("UMSDOS_rmdir: unlinking empty EMD err=%d", err)); #ifdef UMSDOS_PARANOIA if (err) printk("umsdos_rmdir: EMD %s/%s unlink failed, err=%d\n", diff -ur linux-2.1.126pre2/fs/umsdos/rdir.c linux-my/fs/umsdos/rdir.c --- linux-2.1.126pre2/fs/umsdos/rdir.c Mon Oct 19 02:36:21 1998 +++ linux-my/fs/umsdos/rdir.c Mon Oct 19 02:50:12 1998 @@ -107,8 +107,8 @@ * depending on whether this is an MS-DOS or * a UMSDOS directory */ -Printk ((KERN_DEBUG "umsdos_rlookup_x: setting up setup_dir_inode %lu...\n", -inode->i_ino)); +Printk ((KERN_DEBUG "umsdos_rlookup_x: patch_dentry_inode %s/%s\n", +dentry->d_parent->d_name.name, dentry->d_name.name)); umsdos_patch_dentry_inode(dentry, 0); /* N.B. Won't work -- /linux dentry will already have --- linux-2.1.126pre2/init/main.c Mon Oct 19 02:39:29 1998 +++ linux-my/init/main.c Sat Oct 17 15:19:07 1998 @@ -1292,8 +1295,8 @@ */ extern struct inode *pseudo_root; if (pseudo_root != NULL){ - current->fs->root = pseudo_root; - current->fs->pwd = pseudo_root; + current->fs->root = pseudo_root->i_sb->s_root; + current->fs->pwd = pseudo_root->i_sb->s_root; } } #endif
-- Opinions above are GNU-copylefted.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |