mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Badari Pulavarty'" <pbadari@us.ibm.com>
Cc: <akpm@osdl.org>, <suparna@in.ibm.com>,
	"Zach Brown" <zach.brown@oracle.com>,
	"lkml" <linux-kernel@vger.kernel.org>
Subject: RE: [patch] direct-io: bug fix in dio handling write error
Date: Tue, 21 Mar 2006 11:03:10 -0800	[thread overview]
Message-ID: <200603211903.k2LJ30g29071@unix-os.sc.intel.com> (raw)
In-Reply-To: <1142960203.6086.4.camel@dyn9047017100.beaverton.ibm.com>

Badari Pulavarty wrote on Tuesday, March 21, 2006 8:57 AM
> I hate to do this you - but your patch breaks error handling on
> synchronous DIO requests.
> 
> Since you are using "dio->io_error" instead of "dio->result" to
> represent an error - you need to make sure to check that (also ?)
> instead of dio->result in direct_io_worker() before calling 
> dio_complete().
> 
> Isn't it ? Am I missing something ?


That's the other part of the maze.  AFAICS, in the synchronous path,
dio_bio_complete already implicitly checks -EIO error:

static int dio_bio_complete(struct dio *dio, struct bio *bio)
{ ...
    return uptodate ? 0 : -EIO;
}

And such error code bubbles up to direct_io_worker's sync path:

direct_io_worker {
    ...
    if (dio->is_async) {
    ...
    } else {
        ret2 = dio_await_completion(dio);
        if (ret == 0)
            ret = ret2;

I've also explicitly ran test case for synchronous write and found no
regression there.  I admit my test coverage may not be very comprehensive.
But I've done the best I can.

It's entirely possible there are more corner cases.  But let's get some
coverage here with -mm and then add fixes as we go.

- Ken


  reply	other threads:[~2006-03-21 19:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-21  8:51 Chen, Kenneth W
2006-03-21 16:56 ` Badari Pulavarty
2006-03-21 19:03   ` Chen, Kenneth W [this message]
2006-03-21 20:57     ` Badari Pulavarty
2006-03-21 23:13       ` Andrew Morton

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=200603211903.k2LJ30g29071@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=suparna@in.ibm.com \
    --cc=zach.brown@oracle.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®