mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Tejun Heo <htejun@gmail.com>
Cc: axboe@suse.de, jgarzik@pobox.com, James.Bottomley@steeleye.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6-block:post-2.6.15 08/10] blk: update IDE to use new blk_ordered
Date: Wed, 23 Nov 2005 09:40:17 +0100	[thread overview]
Message-ID: <58cb370e0511230040k6bc53862xac35979eaf1f0634@mail.gmail.com> (raw)
In-Reply-To: <20051123072332.GA6653@htj.dyndns.org>

On 11/23/05, Tejun Heo <htejun@gmail.com> wrote:
> On Tue, Nov 22, 2005 at 09:36:09AM +0100, Bartlomiej Zolnierkiewicz wrote:
> [--snip--]
> > >
> > > Ordered requests are processed in the following order.
> > >
> > > 1. barrier bio reaches blk queue
> > >
> > > 2. barrier req queued in order
> > >
> > > 3. when barrier req reaches the head of the request queue, it gets
> > >    interpreted into preflush-barrier-postflush requests sequence
> > >    and queued.  ->prepare_flush_fn is called in this step.
> > >
> > > 4. When all three requests complete, the ordered sequence ends.
> > >
> > > Adding !drive->wcache test to idedisk_prepare_flush, which in turn
> > > requires adding ->prepare_flush_fn error handling to blk ordered
> > > handling, prevents flushes for barrier requests between step#1 and
> >
> > Why for !drive->wcache flush can't be consider as successful
> > like it was before these changes...
> >
> > > step#3.  We can still have flush reqeuests between #3 and #4 after
> > > wcache is turned off.
> >
> > ditto
> >
>
> I think we have two alternatives here - both have some problems.
>
> 1. make ->prepare_flush_fn return some code to tell blk layer skip
>    the flush as the original code did.
>
> This is what you're proposing, I guess.  The reason why I'm reluctant
> to take this approach is that there still remains window of error
> between #3 and #4.  The flush requests could already be prepared and
> in the queue when ->wcache is turned off.  AFAICS, the original code
> had the same problem, although the window was narrower.
>
> 2. complete flush commands successfully in execute_drive_cmd() if wcache
>    is not enabled.
>
> This approach fixes all cases but the implementation would be a bit
> hackish.  execute_drive_cmd() will have to look at the command and
> ide_disk->wcache to determine if a special command should be completed
> successfully without actually executing it.  Maybe we can add a
> per-HL-driver callback for that.
>
> Bartlomiej, I'm not really sure about both of above approaches.  My
> humble opinion is that benefits brought by both of above aren't worth
> the added complexity.  The worst can happen is a few IDE command
> failures caused by executing flush command on a wcache disabled drive.
> And that would happen only when the user turns off wcache while
> barrier sequence is *in progress*.
>
> Hmmm... What do you think?  It's your call.  I'll do what you choose.

Hmm... both solutions sucks.  After second thought I agree with you
w.r.t to original changes (just remember to document them in the patch
description).

Bartlomiej

  reply	other threads:[~2005-11-23  8:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 15:36 [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 01/10] blk: add @uptodate to end_that_request_last() and @error to rq_end_io_fn() Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 02/10] blk: separate out bio init part from __make_request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 03/10] blk: reimplement handling of barrier request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 04/10] blk: update SCSI to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 05/10] blk: add FUA support to SCSI disk Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 06/10] blk: update libata to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 07/10] blk: add FUA support to libata Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 08/10] blk: update IDE to use new blk_ordered Tejun Heo
2005-11-17 20:11   ` Bartlomiej Zolnierkiewicz
2005-11-18 15:07     ` Tejun Heo
2005-11-18 15:59       ` Bartlomiej Zolnierkiewicz
2005-11-22  2:44         ` Tejun Heo
2005-11-22  8:36           ` Bartlomiej Zolnierkiewicz
2005-11-22  8:39             ` Bartlomiej Zolnierkiewicz
2005-11-23  7:23             ` Tejun Heo
2005-11-23  8:40               ` Bartlomiej Zolnierkiewicz [this message]
2005-11-23  8:46                 ` Jens Axboe
2005-11-23  9:00                   ` Tejun
2005-11-23  9:05                     ` Bartlomiej Zolnierkiewicz
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 09/10] blk: add FUA support to IDE Tejun Heo
2005-11-17 20:39   ` Bartlomiej Zolnierkiewicz
2005-11-18 15:25     ` Tejun Heo
2005-11-18 16:17       ` Bartlomiej Zolnierkiewicz
2005-11-18 17:02         ` Alan Cox
2005-11-18 16:38           ` Bartlomiej Zolnierkiewicz
2005-11-18 17:41             ` Alan Cox
2005-11-24 11:58         ` Tejun Heo
2005-11-24 12:21           ` Tejun Heo
2005-11-24 14:21             ` Bartlomiej Zolnierkiewicz
2005-11-17 15:37 ` [PATCH linux-2.6-block:post-2.6.15 10/10] blk: I/O barrier documentation Tejun Heo
2005-11-17 16:20 ` [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Jeff Garzik

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=58cb370e0511230040k6bc53862xac35979eaf1f0634@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=axboe@suse.de \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.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®