Date: Sat, 26 Feb 2005 09:02:14 -0800 (PST) From: "ALeine" <aleine@austrosearch.net> To: sirmoo@cowbert.2y.net Cc: freebsd-hackers@freebsd.org Subject: Re: sandisk cruzer mini quirks [failure] on RELENG_4 Message-ID: <200502261702.j1QH2Emp093865@marlena.vvi.at>
next in thread | raw e-mail | index | archive | help
sirmoo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502261702.j1QH2Emp093865>