public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Archie Cobbs" <archie@dellroad.org>
To: "Karel Zak" <kzak@redhat.com>
Cc: linux-kernel@vger.kernel.org, util-linux-ng@vger.kernel.org
Subject: Re: [PATCH] losetup: add option for O_DIRECT
Date: Wed, 13 Aug 2008 09:08:25 -0500	[thread overview]
Message-ID: <3bc8237c0808130708w389123fet5f8d0bb6ff0429bb@mail.gmail.com> (raw)
In-Reply-To: <20080813081544.GA6070@nb.net.home>

On Wed, Aug 13, 2008 at 3:15 AM, Karel Zak <kzak@redhat.com> wrote:
> On Tue, Aug 12, 2008 at 04:26:10PM -0500, Archie Cobbs wrote:
> > On Thu, Aug 7, 2008 at 1:26 PM, Archie Cobbs <archie@dellroad.org> wrote:
> > > I have an application involving the loopback device where it would be
> > > valuable for the underlying file to be opened with the O_DIRECT flag.
> > >
> > > Any thoughts one way or the other about adding support to losetup(8)
> > > and mount(8) for a 'direct' option that would enable this?
> > >
> > > I will propose a patch if people think this would be a reasonable thing to do.
> >
> > Add support for opening loopback files with O_DIRECT.
> [...]
>
> >         mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR;
> > +       if (*options & SETLOOP_DIRECT)
> > +               mode |= O_DIRECT;
> >         if ((ffd = open(file, mode)) < 0) {
>
>
>  Do you remember  http://lkml.org/lkml/2007/1/10/233  ?

Yes... I understand there is a valid debate on the merits of O_DIRECT.
It is an interesting question and I don't claim to know the "right" answer.

For example, another way to achieve this same effect, though it would
require kernel changes, is to have some additional way(s) to configure
the loopback device using new LOOP_* ioctls.

In any case, that debate does not seem to be over yet. So my opinion:
if and when O_DIRECT is removed from Linux then we can revert this
patch too :-)

>  Sorry, but I have to see ACK/NACK from relevant kernel person.
>  Redirecting to lkml.

No problem. Please CC me on lkml responses if possible.

Thanks,
-Archie

--
Archie L. Cobbs

      reply	other threads:[~2008-08-13 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3bc8237c0808121426m6fada313r33ed4c419386a1@mail.gmail.com>
2008-08-13  8:15 ` [PATCH] losetup: add option for O_DIRECT Karel Zak
2008-08-13 14:08   ` Archie Cobbs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bc8237c0808130708w389123fet5f8d0bb6ff0429bb@mail.gmail.com \
    --to=archie@dellroad.org \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=util-linux-ng@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox