Re: [PATCH] 2.5 ide 48-bit usage

Jens Axboe (axboe@suse.de)
Wed, 7 May 2003 19:33:41 +0200


On Wed, May 07 2003, Linus Torvalds wrote:
>
> On Wed, 7 May 2003, Jens Axboe wrote:
> >
> > I dunno what the purpose of that would be exactly, I guess to cater to
> > some hardware odditites?
>
> And testing. In particular, you might want to test whether a device
> properly supports 48-bit addressing, either from the kernel or from user
> programs.

For that, a forced 48-bit hwif->addressing inherited by drives will
suffice. And I agree, we should have that.

See, the logic in the kernel right now is just to check whether the
drive supports 48-bit commands. If it does, we use them like we would
28-bit commands. We eat the extra overhead, and do nothing to take
advantage of it (except using big drives, of course). What's the
logic in that?!

> Also, if you want to re-create some particular IO pattern for debugging,
> you may want to explicitly use 48-bit addressing.

Then you just recreate those commands, there's absolutely no need for
anything special in this case. And the current patch neither explicitly
allows or disallows anything that the stock kernel doesn't.

If you are doing that from userspace by sending in taskfiles with the
appropriate commands, then you just create the commands like you want
them. rq_lba48() just checks whether file system requests should be
executed with 28 or 48-bit commands. If you send in taskfiles (your
SG_IO example), you have complete control over this already.

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/