[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH 3/4] mkfs.gfs2: Create new resource groups on-demand



Hi,

| +static unsigned rgsize_for_data(uint64_t blksreq, unsigned bsize)
| +{
| +        const uint32_t blks_rgrp = GFS2_NBBY * (bsize - sizeof(struct
| gfs2_rgrp));
| +        const uint32_t blks_meta = GFS2_NBBY * (bsize - sizeof(struct
| gfs2_meta_header));
| +	unsigned bitblocks = 1;
| +	if (blksreq > blks_rgrp)
| +		bitblocks += ((blksreq - blks_rgrp) + blks_meta) / blks_meta;

It looks like this may be rounding up to blks_meta, so shouldn't this be:
  +		bitblocks += ((blksreq - blks_rgrp) + blks_meta - 1) / blks_meta;

Regards,

Bob Peterson
Red Hat File Systems


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]