USB Media card - works at boot-up, removal works, re-insert doesn't

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Sep 21 11:02:17 PDT 2004


hello hello, well i can live with floopies appearing as two thingies
in KVM, however USB media cards not quite working i can't.  i'm
uploading a typescript and a lshal to http://hands.com/~lkcl

what's happening:

- boot up with a USB media card inserted, it gets mounted, it gets
  found fine, KVM is happy, everything is hunky-dory.

  it's one of those USB media readers with four partitions, one per
  each of the 5-in-1 usb card slots (err.. four... five... errr..)
  okay it's a 5-in-1 usb card reader, but there are only four
  partitions.  um.

- remove the media card, it disappears, everything is fine.

  i observe that hald, every 2 seconds, says it's trying to re-read
  the partition table for /dev/sdc.

- re-insert the media card: no observable events occur, no KVM
  response, no HAL log messages saying "mounted, off we go".

  i observe that hald stops saying it's trying to re-read the
  partition table.

- manually do a mount /media/usbdisk7 (corresponding to /dev/sdc1).
  HAL responds by going "oo, /etc/mtab changed" and off it goes
  notifying KVM which responds by plopping the volume icon on
  the devices list.


the bit that's obviously gone haywire is the
linux/block_class_device.c:457 rereading partition table thing /dev/sdc

reading more closely, the comments say "all this work [ioctl("/dev/sdc",
BLKRRPART)] should result in hotplug events to actually remove the
child devices".

clearly that ain't happening!!!


okay... i found out some more info.

i put in a strerror(errno) message and it says "Device busy" from
that ioctl.

re-running the process above, i notice a "running forced unmount" thing
happening...

the failure means that KDE still has file handles open on
/media/usbdisk7.

i'm going to change the umount to a umount -l -f and see what happens...

l.





-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl at lkcl.net"> lkcl at lkcl.net </a> <br />

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list