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

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  ?

 .. use O_DIRECT for files is BAD idea (and loop device is nothing
 other than a file on standard FS).

 I'm really not sure if we want to support this feature. I'm also not
 sure if kernel loop device code is ready for O_DIRECT. (BTW, O_DIRECT
 reads and writes must be aligned, ...)

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

    Karel

-- 
 Karel Zak  <kzak@redhat.com>

       reply	other threads:[~2008-08-13  8:16 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 ` Karel Zak [this message]
2008-08-13 14:08   ` [PATCH] losetup: add option for O_DIRECT Archie Cobbs

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=20080813081544.GA6070@nb.net.home \
    --to=kzak@redhat.com \
    --cc=archie@dellroad.org \
    --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