mkfs.gfs2: Zero blocks in alignment gaps
PATCH 1/1 mkfs.gfs2: Zero blocks in alignment gaps
Stripe and bitmap alignment can leave small gaps between resource group spans, and between the superblock and the first resource group. Zero out those blocks so that we don't leave stale data in unused space.
Signed-off-by Andrew Price <[email protected]>
--- gfs2/libgfs2/libgfs2.h | 1 + gfs2/libgfs2/rgrp.c | 5 +++++ gfs2/mkfs/main_mkfs.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-)
gfs2/libgfs2/libgfs2.h +1 -0
@@ -211,6 +211,7 @@ extern const struct gfs2_rgrp *lgfs2_rgrp_rgrp(lgfs2_rgrp_t rg);extern lgfs2_rgrp_t lgfs2_rgrp_first (lgfs2_rgrps_t rgs);extern lgfs2_rgrp_t lgfs2_rgrp_last (lgfs2_rgrps_t rgs);extern lgfs2_rgrp_t lgfs2_rgrp_next (lgfs2_rgrp_t rg); +extern lgfs2_rgrp_t lgfs2_rgrp_prev (lgfs2_rgrp_t rg);// Temporary function to aid API migration extern struct osi_node *lgfs2_rgrps_root (lgfs2_rgrps_t rgs) __attribute__((deprecated));
gfs2/libgfs2/rgrp.c +5 -0
@@ -719,6 +719,11 @@ lgfs2_rgrp_t lgfs2_rgrp_next(lgfs2_rgrp_t rg)return (lgfs2_rgrp_t )osi_next (&rg->node); } +lgfs2_rgrp_t lgfs2_rgrp_prev (lgfs2_rgrp_t rg) +{ +return (lgfs2_rgrp_t )osi_prev (&rg->node); +} +lgfs2_rgrp_t lgfs2_rgrp_last (lgfs2_rgrps_t rgs) {return (lgfs2_rgrp_t )osi_last (&rgs->root);
gfs2/mkfs/main_mkfs.c +46 -1
61 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 1/1 mkfs.gfs2: Zero blocks in alignment gaps
----- Original Message -----
Quoted 6 lines
Stripe and bitmap alignment can leave small gaps between resource group spans, and between the superblock and the first resource group. Zero out those blocks so that we don't leave stale data in unused space.
Signed-off-by Andrew Price <[email protected]>---
Looks good to me. ACK.
Regards,
Bob Peterson