Re: removable media revalidation - udev vs. devfs or static /dev

From: Gene Heskett (gene.heskett_at_verizon.net)
Date: 01/08/04

  • Next message: Carlos Azevedo: "Kernel hang with MSI KT3-UltraARU and kernel > 2.4.19-rc3"
    To: Linus Torvalds <torvalds@osdl.org>, Olaf Hering <olh@suse.de>
    Date:	Wed, 7 Jan 2004 23:16:18 -0500
    
    

    On Wednesday 07 January 2004 21:03, Linus Torvalds wrote:
    >On Wed, 7 Jan 2004, Olaf Hering wrote:
    >> > Then, user space can just access "/dev/sda1" or whatever, and
    >> > the act of accessing it will force the re-scan.
    >>
    >> How would that work? I mean, what will a tool that cares about a
    >> block event do? It will run a fdisk/parted -l /udev/sda to figure
    >> out what partitions are there (just to skip an extended partition
    >> sda5, as example) and finds no media. That tool will never run
    >> again on sda, unless a new block add event comes in. So some sort
    >> of polling is required for that class of devices.
    >
    >What is your problem?
    >
    >I'll use a very common and simple case that I do myself: use any USB
    > media reader to read a camera card. It will be a FAT filesystem on
    > the first partition, so your fstab might look like this:
    >
    > /dev/sda1 /mnt/smartmedia vfat
    > noauto,user,ro 0 0
    >
    >and then you just do "mount /mnt/smartmedia", and you're done.
    >
    >This works. I do it all the time. You just stick in your card, and
    > mount it, and off it foes. No "fdisk" or "parted" _anywhere_.

    I do too, except the card is still in my camera when I do it. But, I
    do have to ask, why the ro? I regularly do housekeeping in the
    camera once I've downloaded the images I want. The only problem I've
    had is related to deleting the first images all in a row. Apparently
    fat thinks an empty sector is the end of the directory. So one must
    delete on LIFO basis.

    > Linus
    >-
    >To unsubscribe from this list: send the line "unsubscribe
    > linux-kernel" in the body of a message to majordomo@vger.kernel.org
    >More majordomo info at http://vger.kernel.org/majordomo-info.html
    >Please read the FAQ at http://www.tux.org/lkml/

    -- 
    Cheers, Gene
    AMD K6-III@500mhz 320M
    Athlon1600XP@1400mhz  512M
    99.22% setiathome rank, not too shabby for a WV hillbilly
    Yahoo.com attornies please note, additions to this message
    by Gene Heskett are:
    Copyright 2003 by Maurice Eugene Heskett, all rights reserved.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Carlos Azevedo: "Kernel hang with MSI KT3-UltraARU and kernel > 2.4.19-rc3"

    Relevant Pages

    • Re: How to Image a Flash card?
      ... > table is wrong and do I want to start with an empty partition table. ... I've never tried any sort of partitioning tool on a card. ... The ones I've used I just pulled out of my camera and stuck them in the ... get the whole drive image, ...
      (Debian-User)
    • Re: Formatted SD card in camera, now only 1gb instead of 2gb! Need to repartition it!
      ... used it in my camera as a spare, and I formatted it using the camera ... Manager, whilst it can see the partition, it won't touch it, delete ... my system hangs on a card reader with a CF card installed until I remove. ... If bootitng recognizes your card, you can partition and format. ...
      (rec.photo.digital)
    • Re: Secure Digital (SD) Card reports too low a memory
      ... Thanks for ths info. Can you point me as to how to remove the partition. ... I'm having difficulty removing the partition on the Memory card: ... > 2GB, but don't format it. ... Let the camera try formatting that. ...
      (microsoft.public.windowsxp.hardware)
    • Re: Formatted SD card in camera, now only 1gb instead of 2gb! Need to repartition it!
      ... I have a 2gb SD card which I use for general things. ... used it in my camera as a spare, and I formatted it using the camera ... The problem is, Windows Disk ... Manager, whilst it can see the partition, it won't touch it, delete ...
      (rec.photo.digital)
    • Re: Patricks Test9 suspend code.
      ... How is kernel expected to find out partition which it ... or the pcmcia wireless card had just decided it had found its ... These kinds of asynchronous module loads and unloads do happen. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)

    Loading