linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	xfs <linux-xfs@vger.kernel.org>,
	linux-api@vger.kernel.org,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] fsmap: fix documentation of FMR_OF_LAST
Date: Sun, 3 Sep 2017 01:41:02 -0700	[thread overview]
Message-ID: <20170903084102.GC32385@infradead.org> (raw)
In-Reply-To: <20170901150716.GW3775@magnolia>

On Fri, Sep 01, 2017 at 08:07:16AM -0700, Darrick J. Wong wrote:
> fmh_entries is the number of records returned, not the number of records
> in the dataset.  If, for example, you allocate space for 100 records and
> perform a query for a block that has been reflinked 1000 times, the
> dataset size is 1000 but fmh_entries is set to 100.  The lack of a LAST
> flag on the 100th record tells you that there's more records to return.
> 
> If however you allocate space for 100 records and the block is reflinked
> exactly 100 times, there's no way (without the flag) for userspace to
> know that record 100 is the end of the dataset, so the only thing it can
> do is to fsmap_advance() and try the query again, only to receive zero
> results.  Granted I don't think fsmap queries are all /that/ expensive,
> but it's trivial for the kernel to set the flag.

Oh, ok - it had to look up this defintion of dataset first.  With
that the explanation makes total sense:

Reviewed-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2017-09-03  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 20:49 [PATCH] fsmap: fix documentation of FMR_OF_LAST Darrick J. Wong
2017-09-01  0:30 ` Dave Chinner
2017-09-01  8:09 ` Christoph Hellwig
     [not found]   ` <20170901080904.GA32746-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-09-01 15:07     ` Darrick J. Wong
2017-09-03  8:41       ` 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=20170903084102.GC32385@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-api@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).