Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@elta.co.il>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Fix compilation failure of remote-fileio.c
Date: Mon, 29 Dec 2003 07:01:00 -0000	[thread overview]
Message-ID: <9003-Mon29Dec2003085843+0200-eliz@elta.co.il> (raw)
In-Reply-To: <20031228233800.GA815@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 28 Dec 2003 18:38:00 -0500)

> Date: Sun, 28 Dec 2003 18:38:00 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> 
>        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.)


  reply	other threads:[~2003-12-29  7:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-28 13:50 Eli Zaretskii
2003-12-28 23:38 ` Daniel Jacobowitz
2003-12-29  7:01   ` Eli Zaretskii [this message]
2003-12-29 16:01     ` Daniel Jacobowitz
2003-12-30  7:20       ` Eli Zaretskii
2003-12-30  8:26 Michael Elizabeth Chastain
2003-12-30  9:12 ` Eli Zaretskii
2003-12-30 10:34 ` Eli Zaretskii
2003-12-30 19:20 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9003-Mon29Dec2003085843+0200-eliz@elta.co.il \
    --to=eliz@elta.co.il \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox