Dear All,
I developed a simple ram disk driver. It is working fine.
Please find the sources at the following link.
http://pastebin.com/669338
But I am facing a new problem (console crash) when I try to run the "ls"
command on a mount point after removing the disk with out unmounting
(see the below - How I am removing the ram disk after mount without
unmounting).
I understand that removing a mounted device will lead to inconsistent
data. But, in case of a removable media this may happen. Right?
I am trying to simulate a REMOVABLE MEDIA (FLASH MEDIA) driver
environment. This is an attempt to understand what to handle on surprise
removal of a mounted Flash Media disk.
Please find the attached source. I am using the following configuration.
--> x86 UNI Processor system with Fedora Core 3 installed
--> Running 2.6.x kernels like 2.6.10, 2.6.12 and 2.6.14 on the same
system.
To reproduce the "console crash error" you just have to follow exactly
the next steps:
1) Copy the attached files to your system
2) Build the sbd.ko file using the attached Makefile (make)
3) Load (insert) the module into the kernel space (insmod sbd.ko)
4) wait a few milli seconds to create the device node and format the
device (mke2fs /dev/sbd0)
5) mount the device (mount /dev/sbd0 /mnt)
6) copy some files into the mount point (cp *.c /mnt)
7) un mount the device (umount /mnt OR umount /dev/sbd0)
8) then again, mount the device (mount /dev/sbd0 /mnt)
9) remove the mounted device (compile the app.c file [cc app.c] then run
the ./a.out which will remove the mounted device)
10) cd /mnt
11) run ls (which shows the errors messages - see attachment mes_log
file)
12) run again ls - console crash
SEE THE BELOW TWO CONDITIONS WHERE I AM NOT ABLE TO SEE THE CONSOLE
CRASH.
1) After mounting the FDD, I removed the floppy with out un
mounting (The floppy disk has already some files in it).
2) If I perform the above procedure WITH OUT STEPS 6, 7 and 8.
Could any one explain why the problem occurs?
If I am wrong please correct me.
Thanks in very advance.
Thanks and Regards,
Srinivas G
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]