From: Omar Sandoval <osandov@osandov.com>
To: zhengbin <zhengbin13@huawei.com>
Cc: linux-block@vger.kernel.org, osandov@fb.com,
yangerkun@huawei.com, houtao1@huawei.com, yanaijie@huawei.com
Subject: Re: [PATCH blktests] loop/004: Need to wait for drop caches if block_size is changed
Date: Wed, 20 Feb 2019 11:36:52 -0800 [thread overview]
Message-ID: <20190220193652.GF8325@vader> (raw)
In-Reply-To: <1550655486-132008-1-git-send-email-zhengbin13@huawei.com>
On Wed, Feb 20, 2019 at 05:38:06PM +0800, zhengbin wrote:
> When i test blktests, loop/004 will be fail. The Key test steps
> are as follows:
> 1. losetup -f --show /dev/sda
> 2. src/loblksize /dev/loop0 4096
>
> step 1 will create /dev/loop0. after that, daemon systemd-udevd
> will visit and close /dev/loop0 who will add and delete
> i_mapping->nrpages.
> PS: the operation of systemd-udevd is in the background.
>
> step 2 will set /dev/loop0 block size, linux kernel function
> loop_set_block_size has been changed since commit 5db470e229e2
> ("loop: drop caches if offset or block_size are changed")
> + if (lo->lo_queue->limits.logical_block_size != arg &&
> + lo->lo_device->bd_inode->i_mapping->nrpages) {
> + err = -EAGAIN;
> + pr_warn("%s: loop%d (%s) has still dirty pages\n",
> + __func__, lo->lo_number, lo->lo_file_name,
> + lo->lo_device->bd_inode->i_mapping->nrpages);
> + goto out_unfreeze;
> + }
> --->maybe systemd-udevd just visited /dev/loop0, this leads to failure
>
> Add a step between 1 and 2.
>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> ---
> tests/loop/004 | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks!
prev parent reply other threads:[~2019-02-20 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 9:38 [PATCH blktests] loop/004: Need to wait for drop caches if block_size is changed zhengbin
2019-02-20 19:36 ` Omar Sandoval [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=20190220193652.GF8325@vader \
--to=osandov@osandov.com \
--cc=houtao1@huawei.com \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.com \
--cc=yanaijie@huawei.com \
--cc=yangerkun@huawei.com \
--cc=zhengbin13@huawei.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 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.