From: Chris Mason <chris.mason@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] Btrfs fixes and features
Date: Fri, 30 Mar 2012 16:01:12 -0400 [thread overview]
Message-ID: <20120330200112.GK755@shiny> (raw)
In-Reply-To: <CA+55aFwFkeR8pNo7dF1gr0VPD9hr+9zB8zoc_byvMxSzr2WEZw@mail.gmail.com>
On Fri, Mar 30, 2012 at 12:50:26PM -0700, Linus Torvalds wrote:
> On Fri, Mar 30, 2012 at 10:51 AM, Chris Mason <chris.mason@oracle.com=
> wrote:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git=
for-linus
>=20
> This causes a new warning for me:
>=20
> fs/btrfs/extent_io.c: In function =E2=80=98repair_eb_io_failure=E2=80=
=99:
> fs/btrfs/extent_io.c:1940:6: warning: =E2=80=98ret=E2=80=99 may be =
used
> uninitialized in this function
Interesting that my gcc doesn't warn here. Strictly speaking, gcc isn'=
t
wrong, but num_extent_pages() will always be at least 1. This function
is new in this pull, so it can't be a conflict.
Do you want a new pull with the ret =3D 0 patch?
int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer
*eb,
int mirror_num)
{
struct btrfs_mapping_tree *map_tree =3D &root->fs_info->mapping_tree;
u64 start =3D eb->start;
unsigned long i, num_pages =3D num_extent_pages(eb->start, eb->len);
int ret;
for (i =3D 0; i < num_pages; i++) {
struct page *p =3D extent_buffer_page(eb, i);
ret =3D repair_io_failure(map_tree, start, PAGE_CACHE_SIZE,
start, p, mirror_num);
if (ret)
break;
start +=3D PAGE_CACHE_SIZE;
}
return ret;
}
-chris
WARNING: multiple messages have this Message-ID (diff)
From: Chris Mason <chris.mason@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] Btrfs fixes and features
Date: Fri, 30 Mar 2012 16:01:12 -0400 [thread overview]
Message-ID: <20120330200112.GK755@shiny> (raw)
In-Reply-To: <CA+55aFwFkeR8pNo7dF1gr0VPD9hr+9zB8zoc_byvMxSzr2WEZw@mail.gmail.com>
On Fri, Mar 30, 2012 at 12:50:26PM -0700, Linus Torvalds wrote:
> On Fri, Mar 30, 2012 at 10:51 AM, Chris Mason <chris.mason@oracle.com> wrote:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
>
> This causes a new warning for me:
>
> fs/btrfs/extent_io.c: In function ‘repair_eb_io_failure’:
> fs/btrfs/extent_io.c:1940:6: warning: ‘ret’ may be used
> uninitialized in this function
Interesting that my gcc doesn't warn here. Strictly speaking, gcc isn't
wrong, but num_extent_pages() will always be at least 1. This function
is new in this pull, so it can't be a conflict.
Do you want a new pull with the ret = 0 patch?
int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer
*eb,
int mirror_num)
{
struct btrfs_mapping_tree *map_tree = &root->fs_info->mapping_tree;
u64 start = eb->start;
unsigned long i, num_pages = num_extent_pages(eb->start, eb->len);
int ret;
for (i = 0; i < num_pages; i++) {
struct page *p = extent_buffer_page(eb, i);
ret = repair_io_failure(map_tree, start, PAGE_CACHE_SIZE,
start, p, mirror_num);
if (ret)
break;
start += PAGE_CACHE_SIZE;
}
return ret;
}
-chris
next prev parent reply other threads:[~2012-03-30 20:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 17:51 [GIT PULL] Btrfs fixes and features Chris Mason
2012-03-30 19:50 ` Linus Torvalds
2012-03-30 19:50 ` Linus Torvalds
2012-03-30 19:54 ` Linus Torvalds
2012-03-30 19:54 ` Linus Torvalds
2012-03-30 20:04 ` Chris Mason
2012-03-30 20:04 ` Chris Mason
2012-03-30 20:01 ` Chris Mason [this message]
2012-03-30 20:01 ` Chris Mason
2012-03-30 20:27 ` Alex
2012-04-02 11:45 ` Liu Bo
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=20120330200112.GK755@shiny \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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.