From: Chris Mason <clm@fb.com>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: <jbacik@fb.com>, <dsterba@suse.com>,
<linux-btrfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND 2/2] btrfs:Fix error handling in the function btrfs_dev_replace_kthread
Date: Wed, 30 Dec 2015 16:08:32 -0500 [thread overview]
Message-ID: <20151230210832.vzhwzngdaicadtpu@ret.masoncoding.com> (raw)
In-Reply-To: <1451437807-23173-2-git-send-email-xerofoify@gmail.com>
On Tue, Dec 29, 2015 at 08:10:07PM -0500, Nicholas Krause wrote:
> This fixes error handling in the function btrfs_dev_replace_kthread
> by checking if the call to the function btrfs_dev_replace_continue_on_mount
> has failed and if so return the error code to this function's caller in
> order to signal a failure has occurred when calling this particular
> function.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> fs/btrfs/dev-replace.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
> index 38ffd73..b26f68c 100644
> --- a/fs/btrfs/dev-replace.c
> +++ b/fs/btrfs/dev-replace.c
> @@ -803,6 +803,7 @@ static int btrfs_dev_replace_kthread(void *data)
> struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
> struct btrfs_ioctl_dev_replace_args *status_args;
> u64 progress;
> + int ret;
>
> status_args = kzalloc(sizeof(*status_args), GFP_NOFS);
> if (status_args) {
> @@ -820,7 +821,9 @@ static int btrfs_dev_replace_kthread(void *data)
> "<missing target disk>",
> (unsigned int)progress);
> }
> - btrfs_dev_replace_continue_on_mount(fs_info);
> + ret = btrfs_dev_replace_continue_on_mount(fs_info);
> + if (ret)
> + return ret;
> atomic_set(&fs_info->mutually_exclusive_operation_running, 0);
This atomic_set that you're skipping is really important.
-chris
parent reply other threads:[~2015-12-30 21:08 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1451437807-23173-2-git-send-email-xerofoify@gmail.com>]
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=20151230210832.vzhwzngdaicadtpu@ret.masoncoding.com \
--to=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xerofoify@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).