From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28954 invoked by alias); 29 Dec 2003 07:01:35 -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 28945 invoked from network); 29 Dec 2003 07:01:34 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sources.redhat.com with SMTP; 29 Dec 2003 07:01:34 -0000 Received: from zaretski (pns03-195-8.inter.net.il [80.230.195.8]) by legolas.inter.net.il (Mirapoint Messaging Server MOS 3.3.8-GR) with ESMTP id BAE55784; Mon, 29 Dec 2003 09:00:58 +0200 (IST) Date: Mon, 29 Dec 2003 07:01:00 -0000 From: "Eli Zaretskii" To: Daniel Jacobowitz Message-Id: <9003-Mon29Dec2003085843+0200-eliz@elta.co.il> CC: gdb-patches@sources.redhat.com In-reply-to: <20031228233800.GA815@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 28 Dec 2003 18:38:00 -0500) Subject: Re: [RFC] Fix compilation failure of remote-fileio.c Reply-to: Eli Zaretskii References: <20031228233800.GA815@nevyn.them.org> X-SW-Source: 2003-12/txt/msg00501.txt.bz2 > 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?) > 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.)