[Cluster-devel] gfs2-utils: master - mkfs.gfs2: Move the new rgrp creation code into libgfs2
Steven Whitehouse
swhiteho at redhat.com
Tue Jul 2 12:55:17 UTC 2013
On Tue, 2013-07-02 at 08:39 -0400, Bob Peterson wrote:
> | +/**
> | + * Write a resource group to a file descriptor.
> | + * Returns 0 on success or non-zero on failure with errno set
> | + */
> | +int lgfs2_rgrp_write(int fd, lgfs2_rgrp_t rg, unsigned bsize)
> | +{
> | + ssize_t ret = 0;
> | + size_t len = rg->ri.ri_length * bsize;
> | + unsigned int i;
> | + const struct gfs2_meta_header bmh = {
> | + .mh_magic = GFS2_MAGIC,
> | + .mh_type = GFS2_METATYPE_RB,
> | + .mh_format = GFS2_FORMAT_RB,
>
> Here again, maybe we should set __pad0 explicitly rather than leaving the
> value uninitialized.
>
With this form of initialisation the other fields will all be set to
zero anyway, so it doesn't need to be done explicitly here,
Steve.
More information about the Cluster-devel
mailing list