All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: Hans van Kranenburg <hans.van.kranenburg@mendix.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation
Date: Mon, 5 Jun 2017 21:00:40 +0200	[thread overview]
Message-ID: <6a978495-bbae-97d1-fb21-6b6015898c11@inwind.it> (raw)
In-Reply-To: <20170605152733.25441-1-hans.van.kranenburg@mendix.com>

On 2017-06-05 17:27, Hans van Kranenburg wrote:
> +	 * When doing a tree search, we're actually taking a slice from a linear
> +	 * search space of 136-bit keys:
> +	 *
> +	 * Key of the first possible item to be returned:
> +	 *   (min_objectid << 72) + (min_type << 64) + min_offset
> +	 * Key of the last possible item to be returned:
> +	 *   (max_objectid << 72) + (max_type << 64) + max_offset
> +	 *


As non English people, I prefer a less verbose and more programmatic form, like:

+	 * When doing a tree search, we're actually taking a slice from a linear
+	 * search space of 136-bit keys:
+        *
+	 * A key is returned if 
+	 *   ((min_objectid << 72) + (min_type << 64) + min_offset  <=
+        *        (objectid << 72) + (type << 64) + offset))  &&
+	 *   ((max_objectid << 72) + (max_type << 64) + max_offset >= 
+        *        (objectid << 72) + (type << 64) + offset))
+        *




> +	 * [...] In other
> +	 * words, they are not used to filter the type or offset of intermediate
> +	 * keys encountered.

Even this is correct, I still find a bit complicate to fully understand the meaning.

I would prefer to replace "not used" with "not usable"... But as stated above I am not a native English people :-)

BR
G.Baroncelli
-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  parent reply	other threads:[~2017-06-05 19:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 15:27 [PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation Hans van Kranenburg
2017-06-05 16:03 ` Hans van Kranenburg
2017-06-05 19:00 ` Goffredo Baroncelli [this message]
2017-06-05 22:16   ` Hans van Kranenburg
2017-06-05 22:20 ` [PATCH v2] Btrfs: " Hans van Kranenburg
2017-06-12 15:38   ` David Sterba
2017-06-12 16:03     ` Hans van Kranenburg
2017-06-12 16:31       ` David Sterba

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=6a978495-bbae-97d1-fb21-6b6015898c11@inwind.it \
    --to=kreijack@inwind.it \
    --cc=hans.van.kranenburg@mendix.com \
    --cc=linux-btrfs@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.