mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Tuttle" <ttuttle@google.com>
To: "Matt Mackall" <mpm@selenic.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] pagemap: Make pagemap_read enforce reading in multiples of 8
Date: Thu, 5 Jun 2008 12:14:43 -0400	[thread overview]
Message-ID: <4ca0a85e0806050914v5dc78fbcv373b08f09e37a337@mail.gmail.com> (raw)
In-Reply-To: <1212682175.3953.169.camel@calx>

On Thu, Jun 5, 2008 at 12:09 PM, Matt Mackall <mpm@selenic.com> wrote:
> Yes, I got that, I'm just mathematically impaired this morning. Read
> that as "when someone tries to do a *20* byte read, do a 16-byte read.."
> In other words, round down to the nearest multiple of 8.

Oh.  I would seriously question doing that, because it would allow
reads that are improperly split up to fail silently.  What happens if
someone tries to read 40 bytes, and (for some reason) it gets split
into two 20-byte reads?  Instead of "12345" they'll get "12.34."
(where . is 4 zero or garbage bytes).  I'd rather they get an error.

--ttuttle

  reply	other threads:[~2008-06-05 16:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 15:06 Thomas Tuttle
2008-06-05 16:03 ` Matt Mackall
2008-06-05 16:05   ` Thomas Tuttle
2008-06-05 16:09     ` Matt Mackall
2008-06-05 16:14       ` Thomas Tuttle [this message]
2008-06-05 16:21         ` Matt Mackall

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=4ca0a85e0806050914v5dc78fbcv373b08f09e37a337@mail.gmail.com \
    --to=ttuttle@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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

all inboxes | Powered by JetHome®