Manipulation of block driver queue



Hi All

Device : Embedded device with SD card
Kernel : 2.6.14
Problem : while copying data take SD card out , put it back ,the
system crashes

Description:

udev is used for destruction and creation of device nodes and each
time it inserted it gets new inode number.

Driver accepts read/write to/from SD card from request queues . When
card is taken out it freezes the request queue from interrupt
handler.User process waits in blocking mode (process like cp,mv into
card) till the queue gets active. when the card is put back it
reactivates the request queue.

But due to changed inode number of device(from using udev) the waiting
userprocess continue to write to same inode old number and hence leads
to crashing the system.

I dont know how to solve this problem. I wanted to kill the process by
using kill command in some scripts which gets executed from udev
scripts, but processes like cp,mv waits in uninterruptible mode ,
which ignores all the signals.

So how to terminate such processes from kernel? I tried to use
send_sig() from kernel , which tries to kill process once it gets come
out of uninterruptible mode to get new data from userprocess.

But problem is how to know which process is writing into the block
queue?

I tried to dig into request structre ,but it doesnt store any
information about who has written the data :(.

{
I also understands that , sometimes the process which has written data
might not have exists}

Thanks for any help

Regards
.



Relevant Pages

  • Debian etch, udev and net interface renaming errors
    ... When I had Debian etch RC1 which came with 2.6.17 kernel and older version ... of udev I had no network interfaces renaming errors. ... right after that I started to notice interface renaming errors. ... 1x 3Com 3c905 PCI card. ...
    (Debian-User)
  • Re: dapper upgrade no sound
    ... recognize your card at some time (when udev runs) in the boot process". ... that is /not/ Dapper's kernel. ... udev does not have anything to do with restoring mixer levels. ...
    (Ubuntu)
  • Manipulation of block driver queue
    ... while copying data take SD card out, put it back,the ... card is taken out it freezes the request queue from interrupt ... But due to changed inode number of device(from using udev) the waiting ... So how to terminate such processes from kernel? ...
    (comp.os.linux.embedded)
  • Manipulation of block driver queue
    ... while copying data take SD card out, put it back,the ... card is taken out it freezes the request queue from interrupt ... But due to changed inode number of device(from using udev) the waiting ... So how to terminate such processes from kernel? ...
    (comp.os.linux.development.system)
  • Re: Manipulation of block driver queue
    ... Driver accepts read/write to/from SD card from request queues. ... card is taken out it freezes the request queue from interrupt ... But due to changed inode number of device(from using udev) the waiting ...
    (comp.os.linux.development.system)