Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 16 Jul 2002 08:28:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 16 Jul 2002 08:28:29 -0400 Received: from krusty.dt.E-Technik.Uni-Dortmund.DE ([129.217.163.1]:44294 "EHLO mail.dt.e-technik.uni-dortmund.de") by vger.kernel.org with ESMTP id ; Tue, 16 Jul 2002 08:28:28 -0400 Date: Tue, 16 Jul 2002 14:31:22 +0200 From: Matthias Andree To: linux-kernel@vger.kernel.org Subject: Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks Message-ID: <20020716123122.GE4576@merlin.emma.line.org> Mail-Followup-To: linux-kernel@vger.kernel.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1086 Lines: 32 On Mon, 15 Jul 2002, Thunder from the hill wrote: > Hi, > > On 15 Jul 2002, Patrick J. LoPresti wrote: > > Note that this means writing a truly reliable shell or Perl script is > > tricky. I suppose you can "use POSIX qw(fsync);" in Perl. But what do > > you do for a shell script? /bin/sync :-) ? > > Write a binary (/usr/bin/fsync) which opens a fd, fsync it, close it, be > done with it. Or steal one from FreeBSD (written by Paul Saab), fix the err() function and be done with it. .../usr.bin/fsync/fsync.{1,c} Interesting side note -- mind the O_RDONLY: for (i = 1; i < argc; ++i) { if ((fd = open(argv[i], O_RDONLY)) < 0) err(1, "open %s", argv[i]); if (fsync(fd) != 0) err(1, "fsync %s", argv[1]); close(fd); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/