From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12147 invoked by alias); 29 Dec 2003 16:01:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12140 invoked from network); 29 Dec 2003 16:01:42 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 29 Dec 2003 16:01:42 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Aazpu-0003fY-2C; Mon, 29 Dec 2003 11:01:42 -0500 Date: Mon, 29 Dec 2003 16:01:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Fix compilation failure of remote-fileio.c Message-ID: <20031229160141.GA14016@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sources.redhat.com References: <20031228233800.GA815@nevyn.them.org> <9003-Mon29Dec2003085843+0200-eliz@elta.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9003-Mon29Dec2003085843+0200-eliz@elta.co.il> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-12/txt/msg00506.txt.bz2 On Mon, Dec 29, 2003 at 08:58:43AM +0200, Eli Zaretskii wrote: > > Date: Sun, 28 Dec 2003 18:38:00 -0500 > > From: Daniel Jacobowitz > > > > The value st_blocks gives the size of the file in 512-byte > > blocks. (This may be smaller than st_size/512 e.g. when the > > file has holes.) The value st_blksize gives the "preferred" > > blocksize for efficient file system I/O. (Writing to a file in > > smaller chunks may cause an inefficient read-modify-rewrite.) > > Ah, right, I forgot about that. > > (Is this optimal size for I/O still relevant for modern systems?) Not as much as it used to be, but I believe so. > > So you probably want st->st_size / 512 instead. > > So, if I keep the conditional and use the divide-by-512 way for > systems that don't have st_blocks, is the patch approved? Or do I > need to wait for someone else? > > (Thanks for the other suggestions, I will use them.) Hmm... since it doesn't compile as-is, I think this is OK. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer