From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/3] btrfs: keep sysfs target add in the last
Date: Mon, 2 May 2016 04:57:51 +0800 [thread overview]
Message-ID: <57266DCF.3050205@oracle.com> (raw)
In-Reply-To: <20160425162358.GD29353@twin.jikos.cz>
On 04/26/2016 12:23 AM, David Sterba wrote:
> On Thu, Mar 24, 2016 at 06:48:13PM +0800, Anand Jain wrote:
>> Sysfs create context should come in the last, so that we
>> don't have to undo sysfs operation for the reason that any
>> other operation has failed.
>
> Moving the sysfs call will make a visible change: in the old code, the
> sysfs node exists during the whole replace process, while in the new
> code it appears only after it finishes.
> While this is not necessarily a
> problem, I'd like to check that his is an intended change, as it's not
> mentioned in the changelog.
Ah. I missed this point.
> Besides, the sysfs node seems to be added unconditionally, so if the
> scrub is running in parallel (checked a few lines above the new code),
> we'll happily add the target device although no replace happened.
Replace may take a long time, We definitely need devid 0 shown at
sysfs. Apparently we don't have the undo-sysfs part in the original
code, which this patch tried to mitigate, but it needs a deeper fix.
I have to pull this patch out and leave the original bug as is for now.
Further we need to handle fail return of btrfs_dev_replace_finishing()
which seeks sysfs and rest of the stuff un-done as well.
Thanks, Anand
next prev parent reply other threads:[~2016-05-01 20:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 10:48 [PATCH 1/3] btrfs: use fs_info directly Anand Jain
2016-03-24 10:48 ` [PATCH 2/3] btrfs: keep sysfs target add in the last Anand Jain
2016-04-25 16:23 ` David Sterba
2016-05-01 20:57 ` Anand Jain [this message]
2016-03-24 10:48 ` [PATCH 3/3] btrfs: refactor btrfs_dev_replace_start for reuse Anand Jain
2016-04-25 16:32 ` David Sterba
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=57266DCF.3050205@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.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.