fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Su Yanjun <suyj.fnst@cn.fujitsu.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/442: add sync before dmsetup remove
Date: Fri, 27 Sep 2019 09:40:43 +0800	[thread overview]
Message-ID: <19be84d6-25a4-bfa9-ed60-1b9105bca1ec@cn.fujitsu.com> (raw)
In-Reply-To: <20190926055119.GV2622@desktop>


在 2019/9/26 13:51, Eryu Guan 写道:
> On Thu, Sep 26, 2019 at 11:05:13AM +0800, Su Yanjun wrote:
>> 在 2019/9/25 21:08, Eryu Guan 写道:
>>> On Wed, Sep 25, 2019 at 04:29:18PM +0800, Su Yanjun wrote:
>>>> This test case sometime fails. Because "dmsetup remove error-test" may
>>>> fail when some writeback is going on.
>>>>
>>>> This patch adds sync before dmsetup remove operation.
>>>>
>>>> Signed-off-by: Su Yanjun<suyj.fnst@cn.fujitsu.com>
>>>> ---
>>>>    tests/generic/442 | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/tests/generic/442 b/tests/generic/442
>>>> index fe6d460..d48ca36 100755
>>>> --- a/tests/generic/442
>>>> +++ b/tests/generic/442
>>>> @@ -43,6 +43,7 @@ $here/src/fsync-err -d $here/src/dmerror $DMERROR_DEV
>>> fsync-err should have flipped $DMERROR_DEV to working mode and fsync
>>> each open fd before exit if fsync-err didn't report any failure. So
>>> there should be no on-going writeback.
>>>>    # success, all done
>>>>    _dmerror_load_working_table
>>>> +sync
>>>>    _dmerror_cleanup
>>> And _dmerror_cleanup umount $DMERROR_DEV first, then tear down the dm
>>> device. Could you check if fsync-err returns successfully and umount
>>> succeeds as well?
>> I cant find any mount info for $DMERROR_DEV in this test. fsync-err  just
>> does write or sync test with the raw logical dm device.
>>
>> Am i missing something?
> Ah, sorry, I missed that the test uses raw block device..
>
>> mkfs.xfs: cannot open /dev/sda11: Device or resource busy
>> device-mapper: remove ioctl on error-test  failed: Device or resource busy
>> Command failed.
>> _check_xfs_filesystem: filesystem on /dev/sda11 has dirty log
>> *** xfs_logprint -t output ***
>> xfs_logprint: logprint.c:230: main: Assertion `x.logBBsize <= 0x7fffffff'
>> failed.
>> *** end xfs_logprint output
>>
>>  From above log, dmsetup remove failed with "Device or resource busy".
> I can't reproduce above failure with v5.3 kernel, neither xfs nor ext4.
> Does ext4 pass in your setup? I suspect it's a kernel bug that still
> holds the block device.

Yes, ext4 can pass. Only in RHEL release it tests failed.

Maybe "sync" is only a workaround for the the case, the root cause is 
unknown.

It may need more time to analysis.

Thanks

> Thanks,
> Eryu
>
>

WARNING: multiple messages have this Message-ID (diff)
From: Su Yanjun <suyj.fnst@cn.fujitsu.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: <fstests@vger.kernel.org>
Subject: Re: [PATCH] generic/442: add sync before dmsetup remove
Date: Fri, 27 Sep 2019 09:40:43 +0800	[thread overview]
Message-ID: <19be84d6-25a4-bfa9-ed60-1b9105bca1ec@cn.fujitsu.com> (raw)
Message-ID: <20190927014043.-JPI8T7XglCrA1jK0ItYZrqRDYwP6yqC2YyCgz-89EI@z> (raw)
In-Reply-To: <20190926055119.GV2622@desktop>


在 2019/9/26 13:51, Eryu Guan 写道:
> On Thu, Sep 26, 2019 at 11:05:13AM +0800, Su Yanjun wrote:
>> 在 2019/9/25 21:08, Eryu Guan 写道:
>>> On Wed, Sep 25, 2019 at 04:29:18PM +0800, Su Yanjun wrote:
>>>> This test case sometime fails. Because "dmsetup remove error-test" may
>>>> fail when some writeback is going on.
>>>>
>>>> This patch adds sync before dmsetup remove operation.
>>>>
>>>> Signed-off-by: Su Yanjun<suyj.fnst@cn.fujitsu.com>
>>>> ---
>>>>    tests/generic/442 | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/tests/generic/442 b/tests/generic/442
>>>> index fe6d460..d48ca36 100755
>>>> --- a/tests/generic/442
>>>> +++ b/tests/generic/442
>>>> @@ -43,6 +43,7 @@ $here/src/fsync-err -d $here/src/dmerror $DMERROR_DEV
>>> fsync-err should have flipped $DMERROR_DEV to working mode and fsync
>>> each open fd before exit if fsync-err didn't report any failure. So
>>> there should be no on-going writeback.
>>>>    # success, all done
>>>>    _dmerror_load_working_table
>>>> +sync
>>>>    _dmerror_cleanup
>>> And _dmerror_cleanup umount $DMERROR_DEV first, then tear down the dm
>>> device. Could you check if fsync-err returns successfully and umount
>>> succeeds as well?
>> I cant find any mount info for $DMERROR_DEV in this test. fsync-err  just
>> does write or sync test with the raw logical dm device.
>>
>> Am i missing something?
> Ah, sorry, I missed that the test uses raw block device..
>
>> mkfs.xfs: cannot open /dev/sda11: Device or resource busy
>> device-mapper: remove ioctl on error-test  failed: Device or resource busy
>> Command failed.
>> _check_xfs_filesystem: filesystem on /dev/sda11 has dirty log
>> *** xfs_logprint -t output ***
>> xfs_logprint: logprint.c:230: main: Assertion `x.logBBsize <= 0x7fffffff'
>> failed.
>> *** end xfs_logprint output
>>
>>  From above log, dmsetup remove failed with "Device or resource busy".
> I can't reproduce above failure with v5.3 kernel, neither xfs nor ext4.
> Does ext4 pass in your setup? I suspect it's a kernel bug that still
> holds the block device.

Yes, ext4 can pass. Only in RHEL release it tests failed.

Maybe "sync" is only a workaround for the the case, the root cause is 
unknown.

It may need more time to analysis.

Thanks

> Thanks,
> Eryu
>
>



  reply	other threads:[~2019-09-27  1:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25  8:29 [PATCH] generic/442: add sync before dmsetup remove Su Yanjun
2019-09-25 13:08 ` Eryu Guan
2019-09-26  3:05   ` Su Yanjun
2019-09-26  5:51     ` Eryu Guan
2019-09-27  1:40       ` Su Yanjun [this message]
2019-09-27  1:40         ` Su Yanjun

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=19be84d6-25a4-bfa9-ed60-1b9105bca1ec@cn.fujitsu.com \
    --to=suyj.fnst@cn.fujitsu.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@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).