[Drbd-dev] [PATCH] drbdmeta: also show negotiated size in sectors
Iustin Pop
iustin at google.com
Sun Jul 26 16:36:00 CEST 2009
Currently drbdmeta shows the last agreed size in "nice" units, e.g.
100GB. But this is imprecise, as the shifting of cfg->md.la_sect loses
the low-order bits.
This small patch adds a new line to the output of drbdmeta that shows
the exact negotiated size in sectors (for both new and initialized
devices), such that the output of drbdmeta can be parsed.
---
This is against drbd 8.3 but should apply (and I would be grateful if this is
applied) to 8.0 too.
thanks,
iustin
user/drbdmeta.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/user/drbdmeta.c b/user/drbdmeta.c
index 00b269d..ca72c96 100644
--- a/user/drbdmeta.c
+++ b/user/drbdmeta.c
@@ -1481,6 +1481,8 @@ int meta_show_gi(struct format *cfg, char **argv __attribute((unused)), int argc
} else {
printf("zero size device -- never seen peer yet?\n");
}
+ printf("last agreed size in sectors: %zd\n",
+ cfg->md.la_sect);
return cfg->ops->close(cfg);
}
--
1.6.3.3
More information about the drbd-dev
mailing list