All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 12/14] xfs_repair: address never-true tests in repair/bmap.c on 64 bit
Date: Wed, 09 Apr 2014 08:55:47 -0500	[thread overview]
Message-ID: <53455163.4070906@sgi.com> (raw)
In-Reply-To: <1396999504-13769-13-git-send-email-sandeen@redhat.com>

On 04/08/14 18:25, Eric Sandeen wrote:
> The test "if (new_naexts > BLKMAP_NEXTS_MAX)" is never true
> on a 64-bit platform; new_naexts is an int, and BLKMAP_NEXTS_MAX
> is INT_MAX.  So just wrap the whole thing in the #ifdef.
>
> Signed-off-by: Eric Sandeen<sandeen@redhat.com>
> ---
>   repair/bmap.c |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/repair/bmap.c b/repair/bmap.c
> index 85d66dc..b81efb9 100644
> --- a/repair/bmap.c
> +++ b/repair/bmap.c
> @@ -47,16 +47,16 @@ blkmap_alloc(
>   	if (nex < 1)
>   		nex = 1;
>
> +#if (BITS_PER_LONG == 32)	/* on 64-bit platformsethis is never true */
                                              platforms this ..,
>   	if (nex > BLKMAP_NEXTS_MAX) {
> -#if (BITS_PER_LONG == 32)
>   		do_warn(
>   	_("Number of extents requested in blkmap_alloc (%d) overflows 32 bits.\n"
>   	  "If this is not a corruption, then you will need a 64 bit system\n"
>   	  "to repair this filesystem.\n"),
>   			nex);
> -#endif
>   		return NULL;
>   	}
> +#endif

Looks good. The other patches look good too.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-04-09 13:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 23:24 [PATCH 00/14] xfsprogs: varius & sundry fixes for coverity defects Eric Sandeen
2014-04-08 23:24 ` [PATCH 01/14] xfsprogs: fix various fd leaks Eric Sandeen
2014-04-08 23:24 ` [PATCH 02/14] xfsprogs: refactor fsrall_cleanup in xfs_fsr Eric Sandeen
2014-04-08 23:24 ` [PATCH 03/14] xfsprogs: trivial buffer frees on error paths Eric Sandeen
2014-04-11 19:03   ` Brian Foster
2014-04-11 22:25   ` [PATCH 03/14 V2] " Eric Sandeen
2014-04-08 23:24 ` [PATCH 04/14] xfsprogs: fix memory leak in xlog_recover_add_to_trans Eric Sandeen
2014-04-08 23:24 ` [PATCH 05/14] libxfs: fix memory leak in xfs_dir2_node_removename Eric Sandeen
2014-04-08 23:24 ` [PATCH 06/14] xfs_quota: fix memory leak in quota_group_type() error path Eric Sandeen
2014-04-08 23:24 ` [PATCH 07/14] xfs_logprint: fix leak in error path of xlog_print_record() Eric Sandeen
2014-04-08 23:24 ` [PATCH 08/14] xfsprogs: free resources in libxfs_alloc_file_space error paths Eric Sandeen
2014-04-11 19:03   ` Brian Foster
2014-04-11 22:49   ` [PATCH 08/14 V2] " Eric Sandeen
2014-04-08 23:24 ` [PATCH 09/14] xfsprogs: annotate a case fallthrough in libxfs_ialloc Eric Sandeen
2014-04-08 23:25 ` [PATCH 10/14] xfsprogs: fix too-large memset value in xfs_db's attr code Eric Sandeen
2014-04-08 23:25 ` [PATCH 11/14] xfs_quota: remove impossible tests in printpath Eric Sandeen
2014-04-08 23:25 ` [PATCH 12/14] xfs_repair: address never-true tests in repair/bmap.c on 64 bit Eric Sandeen
2014-04-09 13:55   ` Mark Tinguely [this message]
2014-04-09 14:36   ` [PATCH 12/14 V2] " Eric Sandeen
2014-04-08 23:25 ` [PATCH 13/14] mkfs: catch unknown format in protofile parsing Eric Sandeen
2014-04-08 23:25 ` [PATCH 14/14] xfs_db: don't use invalid index in ring_f Eric Sandeen
2014-04-09 22:18 ` [PATCH 15/14] xfs_io: free memory on error path exit from bmap_f() Eric Sandeen
2014-04-10 13:38   ` Mark Tinguely
2014-04-10 14:15     ` Eric Sandeen
2014-04-11 19:02 ` [PATCH 00/14] xfsprogs: varius & sundry fixes for coverity defects Brian Foster

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=53455163.4070906@sgi.com \
    --to=tinguely@sgi.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.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.