From: Anand Jain <anand.jain@oracle.com>
To: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Global hotspare functionality
Date: Tue, 12 Apr 2016 22:16:25 +0800 [thread overview]
Message-ID: <570D0339.2010506@oracle.com> (raw)
In-Reply-To: <CAKWEGV7BOq-_AFaDyAaLd1hs=HVxSf+wka7++U+QG7R=diYT=w@mail.gmail.com>
On 04/05/2016 03:32 AM, Yauhen Kharuzhy wrote:
> 2016-04-01 18:15 GMT-07:00 Anand Jain <anand.jain@oracle.com>:
>>>>> Issue 2.
>>>>> At start of autoreplacig drive by hotspare, kernel craches in
>>>>> transaction
>>>>> handling code (inside of btrfs_commit_transaction() called by
>>>>> autoreplace initiating
>>>>> routines). I 'fixed' this by removing of closing of bdev in
>>>>> btrfs_close_one_device_dont_free(), see
>>>>>
>>>>> https://bitbucket.org/jekhor/linux-btrfs/commits/dfa441c9ec7b3833f6a5e4d0b6f8c678faea29bb?at=master
>>>>> (oops text is attached also). Bdev is closed after replacing by
>>>>> btrfs_dev_replace_finishing(), so this is safe but doesn't seem
>>>>> to be right way.
>>>>
>>>>
>>>> I have sent out V2. I don't see that issue with this,
>>>> could you pls try ?
>>>
>>>
>>> Yes, it reproduced on v4.4.5 kernel. I will try with current
>>> 'for-linus-4.6' Chris' tree soon.
>>>
>>> To emulate a drive failure, I disconnect the drive in VirtualBox, so bdev
>>> can be freed by kernel after releasing of all references to it.
>>
>>
>> So far the raid group profile would adapt to lower suitable
>> group profile when device is missing/failed. This appears to
>> be not happening with RAID56 OR there are stale IO which wasn't
>> flushed out. Anyway to have this fixed I am moving the patch
>> btrfs: introduce device dynamic state transition to offline or failed
>> to the top in v3 for any potential changes.
>> But firstly we need a reliable test case, or a very carefully
>> crafted test case which can create this situation
>>
>> Here below is the dm-error that I am using for testing, which
>> apparently doesn't report this issue. Could you please try on V3. ?
>> (pls note the device names are hard coded in the test script
>> sorry about that) This would eventually be fstests script.
>
> Hi,
>
> I have reproduced this oops with attached script. I don't use any dm
> layer, but just detach drive at scsi layer as xfstests do (device
> management functions were copy-pasted from it).
Nice. I was able reproduce this (also found lock dep issue when running
this, since it was in the original code a separate patch was sent
ou). The issue was due to that bdev wasn't null, to fix this the
btrfs_device_enforce_state() is changed quite a bit. V4 is out.
Thanks, Anand
prev parent reply other threads:[~2016-04-12 14:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 19:39 Global hotspare functionality Yauhen Kharuzhy
2016-03-19 1:17 ` Yauhen Kharuzhy
2016-03-29 14:43 ` Anand Jain
2016-03-29 14:41 ` Anand Jain
2016-03-29 19:24 ` Yauhen Kharuzhy
2016-03-29 19:59 ` Austin S. Hemmelgarn
2016-03-29 20:26 ` Chris Murphy
2016-03-30 11:26 ` Austin S. Hemmelgarn
2016-03-29 19:40 ` Yauhen Kharuzhy
2016-03-30 22:17 ` Yauhen Kharuzhy
2016-04-02 1:17 ` Anand Jain
2016-03-29 19:47 ` Yauhen Kharuzhy
2016-03-29 23:18 ` Yauhen Kharuzhy
2016-04-02 1:15 ` Anand Jain
2016-04-02 1:33 ` Yauhen Kharuzhy
2016-04-02 1:38 ` Anand Jain
2016-04-04 19:32 ` Yauhen Kharuzhy
2016-04-12 14:16 ` Anand Jain [this message]
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=570D0339.2010506@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=yauhen.kharuzhy@zavadatar.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).