xfs
[Top] [All Lists]

Re: [PATCH 2/2] repair: fix messages from set_nlinks

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] repair: fix messages from set_nlinks
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 02 Mar 2012 16:09:51 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120228174251.GB6148@xxxxxxxxxxxxx>
References: <20120228174223.GA6148@xxxxxxxxxxxxx> <20120228174251.GB6148@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
On 2/28/12 11:42 AM, Christoph Hellwig wrote:
> Link counts are unsigned and need to be printed as such.  Also only
> print the varning about upgrading the inode version if the inode was
            warning

> version 1 before.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Well you got reviews for the hard part, 1/2 :)

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> 
> Index: xfsprogs-dev/repair/phase7.c
> ===================================================================
> --- xfsprogs-dev.orig/repair/phase7.c 2012-02-28 12:45:52.627849317 +0100
> +++ xfsprogs-dev/repair/phase7.c      2012-02-28 14:03:20.475986024 +0100
> @@ -40,19 +40,20 @@ set_nlinks(
>  
>       if (!no_modify) {
>               *dirty = 1;
> -             do_warn(_("resetting inode %" PRIu64 " nlinks from %d to %d\n"),
> +             do_warn(_("resetting inode %" PRIu64 " nlinks from %u to %u\n"),
>                       ino, dinoc->di_nlink, nrefs);
>  
> -             if (nrefs > XFS_MAXLINK_1)  {
> +             if (dinoc->di_version == 1 && nrefs > XFS_MAXLINK_1)  {
>                       ASSERT(fs_inode_nlink);
>                       do_warn(
> -_("nlinks %d will overflow v1 ino, ino %" PRIu64 " will be converted to 
> version 2\n"),
> +_("nlinks %u will overflow v1 ino, ino %" PRIu64 " will be converted to 
> version 2\n"),
>                               nrefs, ino);
>  
>               }
>               dinoc->di_nlink = nrefs;
>       } else  {
> -             do_warn(_("would have reset inode %" PRIu64 " nlinks from %d to 
> %d\n"),
> +             do_warn(
> +_("would have reset inode %" PRIu64 " nlinks from %u to %u\n"),
>                       ino, dinoc->di_nlink, nrefs);
>       }
>  }
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 2/2] repair: fix messages from set_nlinks, Eric Sandeen <=