USB flash drive oddity

Steve O'Hara-Smith steve at sohara.org
Thu Apr 5 01:26:03 PDT 2007


On Wed, 4 Apr 2007 11:36:20 -0700 (PDT)
Matthew Dillon <dillon at apollo.backplane.com> wrote:

> :	One thing surprised me - it mounts on /mnt automatically on
> :insertion but I cannot find where this is being controlled from (I didn't
> :put anything in usbd.conf for it). It's neat but I sort of wonder what
> :happens in /mnt is in use.

	What is causing this automatic mounting ????

> :	I'm also having some problems - unmounting it produces error
> :messages (below) and files written to it are sometimes corrupt (I suspect
> :that data is not always flushed).
. ..
>     The simple addition of a quirk table entry to disable the use of the
>     cache synchronization command should solve the problem.  You need the
>     usb vendor and device id's to enter the information into the quirk
>     table in /usr/src/sys/dev/usbmisc/umass/umass.c (see around lines
>     257 and the quirk table is declared around line 314). 

	Ah thanks for the hint - it turns out the quirk for no cache sync
is elsewhere in /usr/src/sys/bus/cam/scsi/scsi_da.c - the attached patch
shuts up the complaints nicely and makes mount and unmount work.
Unfortunately it's not enough to make the device work properly I still get
corrupted files (only some of them) and directories turn into empty files
after an unmount/mount cycle.

-- 
C:>WIN                                      |   Directable Mirror Arrays
The computer obeys and wins.                | A better way to focus the sun
You lose and Bill collects.                 |    licences available see
                                            |    http://www.sohara.org/
Attachment:
quirk.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 690 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20070405/17183887/attachment-0021.bin>


More information about the Users mailing list