sandisk cruzer mini quirks [failure] on RELENG_4

ALeine aleine at austrosearch.net
Sun Feb 27 12:57:59 GMT 2005


sirmoo at cowbert.2y.net wrote: 

> I did this as the first hack. It made the problem worse. I'll try
> patching both umass.c and scsi_da.c maybe they will have some sort of
> synergistic effect.

You said the problem occurs only when you copy files to the device using
cp(1) and not dd(1). The main difference between how cp(1) and dd(1) copy
files (other than cp(1) mmap(2)-ing files which are <= 8 Mb in size)
is that cp(1) copies files in 64kb (MAXBSIZE) chunks while dd(1) copies
files in 512 byte chunks by default. They both use read(2) and write(2),
so I would suggest using dd with bs=64k and then applying the bisection
method to find the largest transfer block size for writing the device
can handle.

Does this problem occur with cpdup (ports/sysutils/cpdup) as well?
It currently copies files in 32kb chunks, which could easily be changed
since the transfer block size is set in a single place. You may want to
patch cpdup to use the maximum transfer block size the device can handle
as a temporary workaround and then use cpdup for copying files to the
device.

> maybe i should just bite the bullet and upgrade the box to 5.3.

Let's hope you won't have to. :-) Can you verify that this problem does
not occur on 5.x without upgrading (by using a FreeSBIE LiveCD)?

ALeine
___________________________________________________________________
WebMail FREE http://mail.austrosearch.net 


More information about the freebsd-hackers mailing list