From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 1 Jan 2001 20:19:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 1 Jan 2001 20:19:11 -0500 Received: from va-ext.webmethods.com ([208.234.160.252]:6181 "EHLO localhost.neuron.com") by vger.kernel.org with ESMTP id ; Mon, 1 Jan 2001 20:19:04 -0500 Date: Mon, 1 Jan 2001 19:50:31 -0500 (EST) From: stewart@neuron.com To: linux-kernel@vger.kernel.org Subject: sync() broken for raw devices in 2.4.x?? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I have a sync()/fdatasync() intensive application that is designed to work on both raw files and raw partitions. Today I upgraded my kernel to the new pre-release and found that my benchmark program would no longer finish when handed a raw partition. I've written a small Java program (my app is in Java) which demonstrates the bug. Make foo.dat a raw scsi partition to re-produce. In my case it's "mknod foo.dat b 8 18". // ----------------------------------------------------- import java.io.*; public class sync { public static void main(String args[]) throws Exception { long ops = Long.parseLong(args[0]); byte dat[] = new byte[Integer.parseInt(args[1])]; RandomAccessFile rf = new RandomAccessFile("foo.dat", "rw"); long time = System.currentTimeMillis(); long t2 = time; for (int i=0; i