mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sami Farin <7atbggg02@sneakemail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH - 2.6.10] generic_file_buffered_write handle partial DIO writes with multiple iovecs
Date: Wed, 19 Jan 2005 04:31:51 +0200	[thread overview]
Message-ID: <20050119023151.GK6725@m.safari.iki.fi> (raw)
In-Reply-To: <1106097764.3041.16.camel@ibm-c.pdx.osdl.net>

On Tue, Jan 18, 2005 at 05:22:44PM -0800, Daniel McNeil wrote:
> Andrew,
> 
> This is a patch to generic_file_buffered_write() to correctly
> handle partial O_DIRECT writes (because of unallocated blocks)
> when there is more than 1 iovec.  Without this patch, the code is
> writing the wrong iovec (it writes the first iovec a 2nd time).
> 
> Included is a test program dio_bug.c that shows the problem by:
> 	writing 4k to offset 4k
> 	writing 4k to offset 12k
> 	writing 8k to offset 4k
> The result is that 8k write writes the 1st 4k of the buffer twice.
> 
> $ rm f; ./dio_bug f
> wrong value offset 8k expected 0x33 got 0x11
> wrong value offset 10k expected 0x44 got 0x22
> 
> with patch
> $ rm f; ./dio_bug f

I have Linux 2.6.10-ac9 + bio clone memory corruption -patch,
and dio_bug does not give errors (without your patch).

-- 

  reply	other threads:[~2005-01-19  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19  1:22 Daniel McNeil
2005-01-19  2:31 ` Sami Farin [this message]
2005-01-19 16:55   ` Daniel McNeil
2005-01-19 17:28     ` Sami Farin
2005-01-19 21:06       ` Daniel McNeil

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=20050119023151.GK6725@m.safari.iki.fi \
    --to=7atbggg02@sneakemail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®