From: Christoph Hellwig <hch@infradead.org>
To: Zheng Bin <zhengbin13@huawei.com>
Cc: axboe@kernel.dk, bvanassche@acm.org, jaegeuk@kernel.org,
linux-block@vger.kernel.org, houtao1@huawei.com,
yi.zhang@huawei.com
Subject: Re: [PATCH] loop: replace kill_bdev with invalidate_bdev
Date: Sat, 30 May 2020 02:07:46 -0700 [thread overview]
Message-ID: <20200530090746.GA32505@infradead.org> (raw)
In-Reply-To: <20200530034809.33610-1-zhengbin13@huawei.com>
On Sat, May 30, 2020 at 11:48:09AM +0800, Zheng Bin wrote:
> When a filesystem is mounting on a loop device and on a loop ioctl
s/mounting/mounted/ ?
> LOOP_SET_STATUS64, because of kill_bdev, buffer_head mappings are getting
> destroyed.
> kill_bdev
> truncate_inode_pages
> truncate_inode_pages_range
> do_invalidatepage
> block_invalidatepage
> discard_buffer -->clear BH_Mapped flag
>
> sb_bread
> __bread_gfp
> bh = __getblk_gfp
> -->discard_buffer clear BH_Mapped flag
> __bread_slow
> submit_bh
> submit_bh_wbc
> BUG_ON(!buffer_mapped(bh)) --> hit this BUG_ON
>
> Fixes: 5db470e229e2 ("loop: drop caches if offset or block_size are changed")
> Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Otherwise this looks reasonable:
Reviewed-by: Christoph Hellwig <hch@lst.de>
Can you also add a patch to now mark kill_bdev static in block_dev.c,
as this removed the last external users?
prev parent reply other threads:[~2020-05-30 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 3:48 [PATCH] loop: replace kill_bdev with invalidate_bdev Zheng Bin
2020-05-30 9:07 ` Christoph Hellwig [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=20200530090746.GA32505@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=houtao1@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=yi.zhang@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 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).