From: Mikulas Patocka <mpatocka@redhat.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>, Xiao Ni <xni@redhat.com>,
Yu Kuai <yukuai3@huawei.com>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
Konstantin Khorenko <khorenko@virtuozzo.com>,
Denis Lunev <den@virtuozzo.com>
Subject: Re: [PATCH] dm-raid: do not include dm-core.h
Date: Mon, 21 Jul 2025 11:15:16 +0200 (CEST) [thread overview]
Message-ID: <d524e3d7-69e2-0267-b9ef-b4dc576e6c55@redhat.com> (raw)
In-Reply-To: <20250721034929.374552-1-ptikhomirov@virtuozzo.com>
On Mon, 21 Jul 2025, Pavel Tikhomirov wrote:
> In commit 4cc96131afce ("dm: move request-based code out to dm-rq.[hc]")
> we have a note: "DM targets should _never_ include dm-core.h!". And it
> is not used in any DM targets except dm-raid now, so let's remove it
> from dm-raid for consistency, also use special helpers instead of
> accessing dm_table and mapper_device fields directly. This change is
> merely a cleanup and should not affect functionality.
>
> Fixes: 7168be3c8a6b ("md: record dm-raid gendisk in mddev")
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> ---
> drivers/md/dm-raid.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
> index e8c0a8c6fb51..4fb5ddf50560 100644
> --- a/drivers/md/dm-raid.c
> +++ b/drivers/md/dm-raid.c
> @@ -14,7 +14,6 @@
> #include "raid5.h"
> #include "raid10.h"
> #include "md-bitmap.h"
> -#include "dm-core.h"
>
> #include <linux/device-mapper.h>
>
> @@ -3305,7 +3304,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
>
> /* Disable/enable discard support on raid set. */
> configure_discard_support(rs);
> - rs->md.dm_gendisk = ti->table->md->disk;
> + rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table));
>
> mddev_unlock(&rs->md);
> return 0;
> --
> 2.50.0
>
Applied, thanks.
(I deleted the Fixes line, because it is not really a bugfix and it
doesn't have to be backported to the stable kernel branches)
Mikulas
prev parent reply other threads:[~2025-07-21 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 3:49 Pavel Tikhomirov
2025-07-21 3:56 ` [PATCH v2] arch: fix resource leak in jbusmc_probe() jackysliu
2025-07-21 6:05 ` [PATCH] dm-raid: do not include dm-core.h Yu Kuai
2025-07-21 9:15 ` Mikulas Patocka [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=d524e3d7-69e2-0267-b9ef-b4dc576e6c55@redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=den@virtuozzo.com \
--cc=dm-devel@lists.linux.dev \
--cc=khorenko@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ptikhomirov@virtuozzo.com \
--cc=snitzer@kernel.org \
--cc=xni@redhat.com \
--cc=yukuai3@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
all inboxes | Powered by JetHome®