From: Changcheng Liu Date: Wed, 18 Mar 2020 02:57:59 +0000 (+0800) Subject: librbd: overload operator to output BlockExtent X-Git-Tag: v16.1.0~2739^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=15fefde7a108f5159ba365e981542558a4e79471;p=ceph.git librbd: overload operator to output BlockExtent Signed-off-by: Changcheng Liu --- diff --git a/src/librbd/BlockGuard.h b/src/librbd/BlockGuard.h index a9c2fd8b3950..de1c0fcecc37 100644 --- a/src/librbd/BlockGuard.h +++ b/src/librbd/BlockGuard.h @@ -30,6 +30,12 @@ struct BlockExtent { BlockExtent(uint64_t block_start, uint64_t block_end) : block_start(block_start), block_end(block_end) { } + + friend ostream& operator<< (ostream& os, const BlockExtent& block_extent) { + os << "[block_start = " << block_extent.block_start << ", " + << "block_end = " << block_extent.block_end << ")"; + return os; + } }; struct BlockGuardCell {