[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add concurrent I/O support to gnu dd

From: Jim Meyering
Subject: Re: Add concurrent I/O support to gnu dd
Date: Sat, 20 Dec 2008 09:55:55 +0100

"Matt Harden" <address@hidden> wrote:
> I'd like to suggest adding the ability to dd(1) to open the file in
> concurrent I/O mode.  This applies only to AIX systems and the JFS2
> filesystem.  I had a need to do this and was able to do it easily thanks
> to the design of coreutils.  As a sysadmin sometimes you have to open a
> file in CIO mode because if any other program has the file open already
> in CIO mode, the OS will not allow it to be opened in "normal" mode.
> Also when using CIO mode, I/O that is not block-aligned is very slow.
> This makes dd a good utility for copying data to/from files in CIO mode.
> Anyway, here are some simple patches to coreutils and gnulib that give this
> capability to dd.

Thanks for the contribution.
This is small enough, and your first, so you don't need
a copyright assignment.  However, if you don't mind doing
a little more work, it would accelerate the acceptance of this

    write an entry in NEWS, under "New features" (note that they're
    alphabetized on tool name)

    don't say that O_CIO is AIX/JFS2-specific:
    a quick search suggests HP-UX also honors it, and it can be
    useful on VxFS, e.g.,

    also, see the contribution guidelines in HACKING for the recommended
    use of "git format-patch" to prepare a change set.  i.e., write a
    commit log entry that mentions each affected file, using the same
    format as other log entries.

> diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
> index fd7520e..dea7449 100644
> --- a/lib/fcntl.in.h
> +++ b/lib/fcntl.in.h
> @@ -70,6 +70,10 @@ extern void _gl_register_fd (int fd, const char *filename);
>  /* Fix up the O_* macros.  */
> +#ifndef O_CIO
> +# define O_CIO 0
> +#endif

I'd rather not make this change to gnulib's fcntl.in.h
right now, since it would make code that tests for the existence
of O_CIO using "#ifndef O_CIO" mistakenly determine that
it's supported.

So please move that change into dd.c.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]