From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 02 Jul 2013 13:55:17 +0100 Subject: [Cluster-devel] gfs2-utils: master - mkfs.gfs2: Move the new rgrp creation code into libgfs2 In-Reply-To: <1983072178.106607948.1372768746625.JavaMail.root@redhat.com> References: <20130702092636.3ECC760DED@fedorahosted.org> <1983072178.106607948.1372768746625.JavaMail.root@redhat.com> Message-ID: <1372769717.2715.37.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.