All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: David Howells <dhowells@redhat.com>, Chris Mason <clm@fb.com>,
	Al Viro <viro@ZenIV.linux.org.uk>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.cz>,
	Dave Chinner <david@fromorbit.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag.
Date: Mon, 27 Apr 2015 06:43:49 -0700	[thread overview]
Message-ID: <20150427134349.GA11928@infradead.org> (raw)
In-Reply-To: <20150427154133.65f58366@notabene.brown>

On Mon, Apr 27, 2015 at 03:41:33PM +1000, NeilBrown wrote:
> Are you sure about NFSv4.2?
> 
> I see that it *can* report holes, but is there any guarantee that if you
> create a new file and write only the 5th block, then READ_PLUS will reliably
> report that the first 4 block are holes??

FYI, I'm talking about SEEK here, not READ_PLUS but the issue is the
same.

> Because if it doesn't guarantee that, then NFSv4.2 doesn't fit the with the
> others where SEEK_HOLE reliable reports holes.
> On the other hand if NFSv4.2 *does* guarantee that then the current READ_PLUS
> server patches are broken because they just use vfs_llseek and assume that
> trust what it says.

There is no quality of implementation guarantee in NFS, just like there
isn't any in Linux.  It's very hard to have any hard guarantees without
leaking specific implementation details like a block size.

> It would be really nice if SEEK_{DATA,HOLE} either reported holes reliably or
> returned ENXIO, but I guess there was a goo reason not to do that.

It would hav been useful, but we went with the Solaris way of reporting
a giant hole.  Solaris at least has a pathconf value telling you if
real SEEK_{DATA,HOLE} are supported, but with Linus' hatred of that
syscall we only have a bad emulation in glibc that isn't of much help
here.

  reply	other threads:[~2015-04-27 13:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  5:27 [PATCH 0/3] Allow fscache to work on BTRFS NeilBrown
2015-04-20  5:27 ` [PATCH 1/3] cachefiles: perform test on s_blocksize when opening cache file NeilBrown
2015-04-20  5:27 ` [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of ->bmap NeilBrown
2015-04-20  6:08   ` Christoph Hellwig
2015-04-20  6:27     ` NeilBrown
2015-04-20  9:45       ` Christoph Hellwig
2015-04-21 23:06         ` NeilBrown
2015-04-20  5:27 ` [PATCH 3/3] btrfs: set FS_SUPPORTS_SEEK_HOLE flag NeilBrown
2015-04-20 19:48   ` Chris Mason
2015-04-20  8:47 ` David Howells
2015-04-20  9:33   ` NeilBrown
2015-04-20  9:46   ` David Howells
2015-04-20  9:48     ` Christoph Hellwig
2015-04-20 12:58       ` Al Viro
2015-04-21  8:43         ` Christoph Hellwig
2015-04-21 10:23           ` Hugh Dickins
2015-04-27  5:41       ` NeilBrown
2015-04-27 13:43         ` Christoph Hellwig [this message]
2015-04-20 11:21 ` [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of ->bmap David Howells
2015-04-20 15:59 ` [RFC][PATCH] cachefiles: Make better use of SEEK_DATA/SEEK_HOLE David Howells

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=20150427134349.GA11928@infradead.org \
    --to=hch@infradead.org \
    --cc=clm@fb.com \
    --cc=david@fromorbit.com \
    --cc=dhowells@redhat.com \
    --cc=dsterba@suse.cz \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=viro@ZenIV.linux.org.uk \
    /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.