Subject: Re: bug#15578: Parameter -d or --direct to open files with flag O_DIRECT?

From: Eric Blake <[email-masked]>
Date: Wed, 09 Oct 2013 21:11:48 -0600

tag 15578 notabug
thanks

On 10/09/2013 05:18 PM, Kyle Sallee wrote:
> Please consider the attached gzipped patch file.

Thanks for the patch.

Unless the patch is huger than 100k, it's best to post it inline rather
than forcing readers to go through extra hoops to unpack it.

> It provides additional parameters for cat.
> The additional parameter allows cat to open files and read content
> without storing the content in the kernel's block cache.

However, adding an option to 'cat' is probably not the best option.  We
already have 'dd' that can request O_DIRECT on operating systems where
that is defined, so you are probably better off converting your scripts
to use dd than to try and retrofit cat and wait for the patches to
percolate into your distro.  Look for 'dd iflag=direct'.

I'm closing this bug as we probably aren't going to change cat, but do
feel free to add additional comments on this thread as appropriate.  Who
knows - maybe it's worth reopening and repurposing this bug report into
a documentation patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org