All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: David Howells <dhowells@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: Could we get an IOCB_NO_READ_HOLE?
Date: Fri, 17 Sep 2021 13:04:54 +0200	[thread overview]
Message-ID: <20210917110454.GA10535@lst.de> (raw)
In-Reply-To: <2349284.1631875439@warthog.procyon.org.uk>

On Fri, Sep 17, 2021 at 11:43:59AM +0100, David Howells wrote:
> David Howells <dhowells@redhat.com> wrote:
> 
> > Would it be possible to get an IOCB_NO_READ_HOLE flag that causes a read to
> > either fail entirely if there's a hole in the file or to stop at the hole,
> > possibly returning -ENODATA if the hole is at the front of the file?
> > 
> > Looking at iomap_dio_iter(), IOMAP_HOLE should be enabled in
> > iomap_iter::iomap.type for this?  Is it that simple?
> 
> Actually, that's not the right thing.  How about the attached - at least for
> direct I/O?

This looks pretty reasonable.  We'll just need to make sure to reject
the flag for the many file operations instances that do not support it.

      reply	other threads:[~2021-09-17 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 10:27 Could we get an IOCB_NO_READ_HOLE? David Howells
2021-09-17 10:43 ` David Howells
2021-09-17 11:04   ` Christoph Hellwig [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=20210917110454.GA10535@lst.de \
    --to=hch@lst.de \
    --cc=dhowells@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.