Messages in this thread | | | Date | Wed, 16 Sep 1998 03:49:32 -0700 | From | Gordon Chaffee <> | Subject | Re: debugging patch for ide-cd/isofs |
| |
After a bit more thought, I was missing something. It seems it is hanging somewhere after it returns from the ide-cd and cdrom routines and in fs/devices:check_disk_change(). OK, I think I know what is going on. If either an error occurs when trying to detect a disk change or a disk is actually changed, it falls through to the next operation instead of returning. The next operation happens to be a get_super(), but the superblock is already locked in isofs_read_super(), so we hang.
Bill, this makes perfect sense when looking at your changes. Previously, the superblock was unlocked before calling check_disk_change(). Now, it is unlocked after calling check_disk_change(). With all the reordering you've done with error conditions, I'm not sure how you want to handle this one. As a test to make sure this is indeed the case, apply this pseudo patch to your fs/isofs/inode.c:
+unlock_super(s); printk("isofs_read_super: checking disk change\n"); if(!check_disk_change(dev)) { printk("isofs_read_super: calling unlock_super\n"); /* turn off ide-cd debugging */ ide_cd_debug = 0; - unlock_super(s); printk("isofs_read_super: unlock_super done\n"); return s; } +lock_super(s); printk("isofs_read_super: disk change failed!\n");
It should fix the problem. It would seem to me there is something a bit wrong in check_disk_change(). If it gets an error as it appears to in this case, it assumes the disk has been changed. Should the check be instead:
if (fops->check_media_change(dev) <= 0) return 0;
?
Erik, the ide-cd code is completely clear of any blame.
- Gordon
- 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/
| |