[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dd PATCH: add conv=direct
From: |
Andy Isaacson |
Subject: |
Re: dd PATCH: add conv=direct |
Date: |
Wed, 7 Apr 2004 16:09:50 -0500 |
User-agent: |
Mutt/1.4.1i |
On Wed, Apr 07, 2004 at 01:46:31PM -0700, Paul Eggert wrote:
> Andrew Morton <address@hidden> writes:
> > In 2.6 we do the check at open() and fcntl() time. In 2.4 we don't
> > fail until the actual I/O attempt.
>
> This raises the issue of what "dd conv=direct" should do in 2.4
> kernels. I propose that it should report an error and exit, when the
> write fails, since conv=direct can't be implemented. The basic idea
> is that on systems that lack direct I/O, conv=direct should fail.
I agree, this is the appropriate behavior. When "dd conv=direct" is
used on a fd that cannot support direct I/O, and the kernel doesn't tell
us until it's too late, erroring on the I/O is the only sane action.
Fortuitously, that's what happens with the patches I posted.
(Note that it's a function of the kernel and the underlying FS whether
direct I/O is going to work. So some kind of heuristic on kernel
version is a bad idea.)
> Another issue with this patch: in Solaris, direct I/O is done by
> invoking directio(DIRECTIO_ON); see
> <http://docs.sun.com/db/doc/816-0213/6m6ne37so?q=directio&a=view>.
> Is Solaris direct I/O a direct analog to Linux direct I/O, or are
> there subtle differences in semantics that should be made visible to
> the users of GNU "dd"?
The Solaris semantics are more sane than the Linux ones, to be sure --
it always does the I/O, falling back to buffered I/O if conditions are
not right for direct.
I don't believe I have a test system for the Solaris case (when was
directio(3C) added?) so someone else will have to add that support.
-andy
- coreutils patch to align buffers better, (continued)
- Message not available
- Message not available
- Message not available
- Re: dd PATCH: add conv=direct, Paul Eggert, 2004/04/13
- Re: dd PATCH: add conv=direct, Bryce, 2004/04/14
- Re: dd PATCH: add conv=direct, Paul Eggert, 2004/04/14
- Re: dd PATCH: add conv=direct, Jim Meyering, 2004/04/14
- Re: dd PATCH: add conv=direct, Bryce, 2004/04/15
- Re: dd PATCH: add conv=direct, Bryce, 2004/04/15
- Re: dd PATCH: add conv=direct, Paul Eggert, 2004/04/07
- Re: dd PATCH: add conv=direct, Andrew Morton, 2004/04/08
- Re: dd PATCH: add conv=direct,
Andy Isaacson <=
Re: dd PATCH: add conv=direct, Nathan Straz, 2004/04/08
Re: Re: dd PATCH: add conv=direct, Paul Eggert, 2004/04/08