All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [fsck.gfs2 PATCH] fsck.gfs2: Fix journal sequence number reporting problem
Date: Mon, 26 Jan 2015 10:54:33 +0000	[thread overview]
Message-ID: <54C61CE9.7090506@redhat.com> (raw)
In-Reply-To: <1372005015.14338417.1422040201258.JavaMail.zimbra@redhat.com>

On 23/01/15 19:10, Bob Peterson wrote:
> Hi,
>
> This bug was spotted by coverity. The fsck.gfs2 should include a line
> to report the number of journal sequence errors fixed. It was coded
> improperly so that it was never displayed. This patch fixes the code
> so that the message will be printed properly.

ACK - thanks for dealing with coverity complaints.

Cheers,
Andy

>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> diff --git a/gfs2/fsck/fs_recovery.c b/gfs2/fsck/fs_recovery.c
> index abb8187..9be5a95 100644
> --- a/gfs2/fsck/fs_recovery.c
> +++ b/gfs2/fsck/fs_recovery.c
> @@ -436,10 +436,9 @@ static int check_journal_seq_no(struct gfs2_inode *ip, int fix)
>   			  (unsigned long long)lowest_seq,
>   			  (unsigned long long)highest_seq,
>   			  (unsigned long long)prev_seq);
> -		if (!fix) {
> -			seq_errors++;
> +		seq_errors++;
> +		if (!fix)
>   			continue;
> -		}
>   		highest_seq++;
>   		lh.lh_sequence = highest_seq;
>   		prev_seq = lh.lh_sequence;
> @@ -449,8 +448,10 @@ static int check_journal_seq_no(struct gfs2_inode *ip, int fix)
>   		gfs2_log_header_out(&lh, bh);
>   		brelse(bh);
>   	}
> -	if (seq_errors && fix)
> +	if (seq_errors && fix) {
>   		log_err(_("%d sequence errors fixed.\n"), seq_errors);
> +		seq_errors = 0;
> +	}
>   	return seq_errors;
>   }
>
>



      reply	other threads:[~2015-01-26 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1279756722.14337905.1422040128887.JavaMail.zimbra@redhat.com>
2015-01-23 19:10 ` [Cluster-devel] [fsck.gfs2 PATCH] fsck.gfs2: Fix journal sequence number reporting problem Bob Peterson
2015-01-26 10:54   ` Andrew Price [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C61CE9.7090506@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.