linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [Fwd: [RFT] major libata update]
Date: Wed, 17 May 2006 09:37:02 +0200	[thread overview]
Message-ID: <20060517073701.GE4197@suse.de> (raw)
In-Reply-To: <446A048B.6040703@garzik.org>

On Tue, May 16 2006, Jeff Garzik wrote:
> James Bottomley wrote:
> >On Tue, 2006-05-16 at 12:12 -0400, Jeff Garzik wrote:
> >>Its an API-which-only-libata-uses that we're discussing.  And because 
> >>its moving to the block layer, its also a 
> >>temporary-API-which-only-libata-uses.
> >
> >OK ... this may be the root of the problem.  I really would like libata
> >to migrate to being block only ... especially as PATA looks to be trying
> >to follow you into the SCSI subsystem.  However, this has been the
> >statement for the past two years (at least), and really, few
> >enhancements have been made to block that you need to make good on this.
> >I think one of the things we'll try to find time to do at the storage
> >summit is to take a hard look at block to see exactly what has to be
> >added to make libata solely dependent upon it.
> 
> 100% agreed...

Ditto! I'd be more than willing to implement some of these features (and
already started to, the per command timeout for instance), but I was
starting to write off libata moving to block as a silly pipe dream in
all honesty... But if momentum is picking up behind this move, then I'll
all for it.

> The general list, off the top of my head:
> 
> * objects: storage message, storage device, storage host, and the 
> requisite interconnections

Storage message -> request. The rq-cmd-type branch of the block repo has
most/some of that done. For an explicit storage device + host, I have no
plans to expland on what we have.

> * queuecommand-style API

That's a style issue, rather than a required item. You can roll that on
top of the current api by just doing a:

int queuecommand_helper(request_queue_t *q, struct request *rq)
{
        /* issue request */
        ...
        return OK/DEFER/REJECT/WHATEVER
}

blk_queuecommand_helper(request_queue_t *q, queue_command_fn *fn)
{
        struct request *rq;
        int ret;

        do {
                rq = elv_next_request(q);
                if (!rq)
                        break;

                ret = fn(q, rq);
                if (ret == OK)
                        continue;

                /* handle replugging/killing/whatever */
        } while (1);
}

if you really wanted.

> * EH thread(s)
> * timers, for command timeouts

Agree, we can abstract out the grunt handling of timeouts and the
context required in the block layer.

> * SCSI-style MLqueue and state stuff, i.e. ability to return "device 
> busy", "host busy", "retry this command", ...

Comes with the blk_queuecommand_helper() type setup from above.

> And once libata is happy at the block layer, move SCSI to using this 
> stuff too :)

Definitely.

-- 
Jens Axboe


  reply	other threads:[~2006-05-17  7:36 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4468B596.9090508@garzik.org>
     [not found] ` <1147789098.3505.19.camel@mulgrave.il.steeleye.com>
2006-05-16 15:41   ` [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 15:51     ` James Bottomley
2006-05-16 16:06       ` Jeff Garzik
2006-05-16 16:30         ` James Bottomley
2006-05-16 16:39           ` Jeff Garzik
2006-05-16 21:55             ` Luben Tuikov
2006-05-16 21:32           ` Luben Tuikov
2006-05-16 16:08       ` Tejun Heo
2006-05-16 16:13         ` Tejun Heo
2006-05-16 16:29         ` James Bottomley
2006-05-16 16:37           ` Jeff Garzik
2006-05-16 16:39           ` Tejun Heo
2006-05-16 16:50             ` James Bottomley
2006-05-16 17:07               ` Tejun Heo
2006-05-16 17:09                 ` Jeff Garzik
2006-05-16 19:58                 ` Christoph Hellwig
2006-05-16 20:02                   ` Jeff Garzik
2006-05-16 21:28                   ` James Bottomley
2006-05-18  3:27                     ` Tejun Heo
2006-05-19 12:07                       ` [PATCH] SCSI: make scsi_implement_eh() generic API for SCSI transports Tejun Heo
2006-05-16 16:12       ` [Fwd: [RFT] major libata update] Jeff Garzik
2006-05-16 16:38         ` James Bottomley
2006-05-16 16:57           ` Jeff Garzik
2006-05-17  7:37             ` Jens Axboe [this message]
2006-05-17 15:06               ` Jeff Garzik
2006-05-17 15:50                 ` James Bottomley
2006-05-17 15:58                   ` James Smart
2006-05-17 16:17                   ` Jeff Garzik
2006-05-17 17:53                     ` James Bottomley
2006-05-17 22:08                       ` Jeff Garzik
2006-05-17 22:15                         ` Jeff Garzik
2006-05-17 17:47                   ` Linus Torvalds
2006-05-17 17:55                     ` Jens Axboe
2006-05-17 22:04                       ` Linus Torvalds
2006-05-17 22:12                         ` Jeff Garzik
2006-05-17 21:41                     ` Jeff Garzik
2006-05-17 21:52                     ` Douglas Gilbert
2006-05-17 22:20                       ` Linus Torvalds
2006-05-18  3:04                     ` Luben Tuikov
2006-05-17 16:05                 ` Douglas Gilbert
2006-05-17 17:37                 ` Jens Axboe
2006-05-17 21:58                   ` Jeff Garzik
2006-05-18  7:21                     ` Jens Axboe
2006-05-16 18:28       ` Luben Tuikov
2006-05-16 18:15     ` Luben Tuikov

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=20060517073701.GE4197@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).