lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 3 Sep 2017 01:41:02 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        xfs <linux-xfs@...r.kernel.org>, linux-api@...r.kernel.org,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] fsmap: fix documentation of FMR_OF_LAST

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@....de>

Powered by blists - more mailing lists