RE: FW: Simulating the REMOVABLE media - Could any one please suggest me.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fawad Wrote: 
> Hello Srinivas,
> 
> I think you are __not__ doing stuff in a right way. Please take a look
> at the sample-code (sbull) of LDD3 book which simulates media_changed
> (removal_disk) after specific timeout and that example will really
> help you (as I think you can do the stuff which it does in timer
> callback function in your ioctl)
> 
> Now as your question in your previous post on linux-kernel and
> kernelnewbies (subject: Simple Block Driver (RAM DISK) - Console Crash
> (specific case)) which is:
> 
> Case 1) Have you checked by opening the data/files in the floppy disk
> (I pretty sure, it will be in currupted state, b/c the data first goes
> into the cache and mostly at umount time or eject time floppy disk
> driver perform flushing/synching them to disk). And floppy disk driver
> assigns block_device_operations -> media_changed and revalidate_disk
> which I think called if filesystem found some changes in the media or
> might be called from some other place in the kernel.
> 
> Case 2) If you won't do steps 6,7 and 8, then it means that your disk
> don't have any data to be syncronized, so it won't give any problem
> and filesystem performs ls well, else ls will perform reading on the
> device and you already removed that (just try to figure-out the
> stack/function_call trace from your log that from bottom of stack to
> up which last function (top-most function) is called and created
> problem).
> 
> I think it helps, else you can ask more questions (I will try to reply
> if got time, as I already thinking of replying for your previous mail
> but havn't got time for that) and someone will definitely reply.


Thanks a lot for your kind suggestion. 
We resolved the issue. If I get any problem further I will let you know.

Thanks once again for your help.

Regards,
Srinivas G


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux