From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 27 12:57:59 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C031116A4E6 for ; Sun, 27 Feb 2005 12:57:59 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5368143D49 for ; Sun, 27 Feb 2005 12:57:59 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1QH2KoH093866; Sat, 26 Feb 2005 09:02:21 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1QH2Emp093865; Sat, 26 Feb 2005 09:02:14 -0800 (PST) (envelope-from www) Date: Sat, 26 Feb 2005 09:02:14 -0800 (PST) Message-Id: <200502261702.j1QH2Emp093865@marlena.vvi.at> To: sirmoo@cowbert.2y.net From: "ALeine" cc: freebsd-hackers@freebsd.org Subject: Re: sandisk cruzer mini quirks [failure] on RELENG_4 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 12:57:59 -0000 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