summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_interval.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-02-04 14:11:05 +0300
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-09-28 12:26:36 +0400
commit70b1987663851f4431a2f43d8ccefb7b6ac73331 (patch)
tree7c175e2eb67b701da3ee5f8bb67dc77e003fbe9d /drivers/block/drbd/drbd_interval.c
parent43ae077d0a1e98dd13112646fe967565febf4fe7 (diff)
downloadlinux-70b1987663851f4431a2f43d8ccefb7b6ac73331.tar.xz
drbd: Improve the drbd_find_overlap() documentation
Describe how to reach any further overlapping intervals from the first overlap found. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_interval.c')
-rw-r--r--drivers/block/drbd/drbd_interval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c
index 0d17eaa89a69..14dbe2dd2d33 100644
--- a/drivers/block/drbd/drbd_interval.c
+++ b/drivers/block/drbd/drbd_interval.c
@@ -122,9 +122,11 @@ drbd_remove_interval(struct rb_root *root, struct drbd_interval *this)
* @sector: start sector
* @size: size, aligned to 512 bytes
*
- * Returns the interval overlapping with [sector, sector + size), or NULL.
- * When there is more than one overlapping interval in the tree, the interval
- * with the lowest start sector is returned.
+ * Returns an interval overlapping with [sector, sector + size), or NULL if
+ * there is none. When there is more than one overlapping interval in the
+ * tree, the interval with the lowest start sector is returned, and all other
+ * overlapping intervals will be on the right side of the tree, reachable with
+ * rb_next().
*/
struct drbd_interval *
drbd_find_overlap(struct rb_root *root, sector_t sector, unsigned int size)