[Ocfs2-tools-devel] [PATCH 10/22] tunefs rework: Add op_set_journal_size.c

Joel Becker Joel.Becker at oracle.com
Fri Jul 25 20:44:02 PDT 2008


On Fri, Jul 25, 2008 at 07:07:48PM -0700, Joel Becker wrote:

And I have a bug!

> +static int set_journal_size_parse_option(struct tunefs_operation *op,
> +					 char *arg)
> +{
> +	int rc = 1;
> +	errcode_t err;
> +	uint64_t *new_size;
> +
> +
> +	if (!arg) {
> +		errorf("No size specified\n");
> +		goto out;
> +	}
> +
> +	err = ocfs2_malloc0(sizeof(uint64_t), &new_size);
> +	if (err) {
> +		tcom_err(err, "while processing journal options");
> +		goto out;
> +	}
> +
> +	err = tunefs_get_number(arg, new_size);
> +	if (!err)
  +		op->to_private = new_size;
> +		rc = 0;
> +	else
> +		tcom_err(err, "- journal size is invalid\n");
> +
> +out:
> +	return rc;
> +}

-- 

"All alone at the end of the evening
 When the bright lights have faded to blue.
 I was thinking about a woman who had loved me
 And I never knew"

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list