From: Ming Lei <ming.lei@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Jens Axboe <axboe@kernel.dk>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
Mike Snitzer <snitzer@kernel.org>,
dm-devel@lists.linux.dev, Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [PATCH v2 04/34] md: port block device access to file
Date: Mon, 15 Apr 2024 17:26:19 +0800 [thread overview]
Message-ID: <Zhzyu6pQYkSNgvuh@fedora> (raw)
In-Reply-To: <20240123-vfs-bdev-file-v2-4-adbd023e19cc@kernel.org>
Hello,
On Tue, Jan 23, 2024 at 02:26:21PM +0100, Christian Brauner wrote:
> Signed-off-by: Christian Brauner <brauner@kernel.org>
> ---
> drivers/md/dm.c | 23 +++++++++++++----------
> drivers/md/md.c | 12 ++++++------
> drivers/md/md.h | 2 +-
> include/linux/device-mapper.h | 2 +-
> 4 files changed, 21 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index 8dcabf84d866..87de5b5682ad 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
...
> @@ -775,7 +778,7 @@ static void close_table_device(struct table_device *td, struct mapped_device *md
> {
> if (md->disk->slave_dir)
> bd_unlink_disk_holder(td->dm_dev.bdev, md->disk);
> - bdev_release(td->dm_dev.bdev_handle);
> + fput(td->dm_dev.bdev_file);
The above change caused regression on 'dmsetup remove_all'.
blkdev_release() is delayed because of fput(), so dm_lock_for_deletion
returns -EBUSY, then this dm disk is skipped in remove_all().
Force to mark DMF_DEFERRED_REMOVE might solve it, but need our device
mapper guys to check if it is safe.
Or other better solution?
thanks,
Ming
next parent reply other threads:[~2024-04-15 9:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240123-vfs-bdev-file-v2-0-adbd023e19cc@kernel.org>
[not found] ` <20240123-vfs-bdev-file-v2-4-adbd023e19cc@kernel.org>
2024-04-15 9:26 ` Ming Lei [this message]
2024-04-15 12:35 ` [PATCH v2 04/34] md: port block device access to file Christian Brauner
2024-04-15 13:56 ` Mike Snitzer
2024-04-15 14:35 ` Ming Lei
2024-04-15 14:53 ` Christian Brauner
2024-04-15 15:11 ` Ming Lei
2024-04-15 15:53 ` Mike Snitzer
2024-04-15 16:22 ` Jan Kara
2024-04-16 0:27 ` Ming Lei
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=Zhzyu6pQYkSNgvuh@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@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 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 read-only IMAP folder(s) and NNTP newsgroup(s).