[PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-05 Thread Jim Meyering
works with O_DIRECT and the destination file system. Here's the patch I expect to push soon: >From 2f4004be6131e049a1452ee68377ae1756673bd4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Aug 2009 19:54:58 +0200 Subject: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIREC

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-06 Thread Jim Meyering
; From: Jim Meyering > Date: Tue, 4 Aug 2009 19:54:58 +0200 > Subject: [PATCH] dd: work around buffer length restrictions with oflag=direct > (O_DIRECT) In case anyone actually reviews this, I've fixed a few nits: - mention the fix in NEWS - s/oflags=/oflag=/ >From 5929322

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-06 Thread Eric Sandeen
or something I think. > Here's the patch I expect to push soon: > > From 2f4004be6131e049a1452ee68377ae1756673bd4 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 4 Aug 2009 19:54:58 +0200 > Subject: [PATCH] dd: work around buffer length restrictions with oflag=direc

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-06 Thread Eric Sandeen
Eric Sandeen wrote: > Jim Meyering wrote: ... >> diff --git a/doc/coreutils.texi b/doc/coreutils.texi >> index acec76e..6fa2602 100644 >> --- a/doc/coreutils.texi >> +++ b/doc/coreutils.texi >> @@ -7861,6 +7861,10 @@ dd invocation >> @opindex direct >> @cindex direct I/O >> Use direct I/O for

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-07 Thread Jim Meyering
Eric Sandeen wrote: > Jim Meyering wrote: >> Eric Sandeen mentioned that dd's O_DIRECT-exposing code >> didn't always work. The problem is that the kernel imposes >> draconian restrictions on the size of buffer that one may >> write to an FD opened with O_DIRECT. Currently, at least on >> ext4 an

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-07 Thread Eric Sandeen
Jim Meyering wrote: > Eric Sandeen wrote: > ... >> I suppose it would be nice to at least make that last buffered IO >> synchronous if possible, or sync the file afterwards. >> POSIX_FADV_DONTNEED for extra credit? :) > > Good idea. > What do you think of this? > It feels slightly excessive to

Re: [PATCH] dd: work around buffer length restrictions with oflag=direct (O_DIRECT)

2009-08-10 Thread Pádraig Brady
Jim Meyering wrote: > +#ifdef POSIX_FADV_DONTNEED > + off_t off = lseek (STDOUT_FILENO, 0, SEEK_CUR); > + if (0 <= off) > +ignore_value (posix_fadvise (STDOUT_FILENO, > + off, 0, POSIX_FADV_DONTNEED)); > +#endif That reminds me that it would be