[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.02.2006130845530.27500@file01.intranet.prod.int.rdu2.redhat.com>
Date: Sat, 13 Jun 2020 08:46:13 -0400 (EDT)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Huaisheng Ye <yehs2007@...o.com>
cc: snitzer@...hat.com, agk@...hat.com, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, Huaisheng Ye <yehs1@...ovo.com>
Subject: Re: [PATCH] dm writecache: skip writecache_wait when using pmem
mode
On Fri, 12 Jun 2020, Huaisheng Ye wrote:
> From: Huaisheng Ye <yehs1@...ovo.com>
>
> The array bio_in_progress is only used with ssd mode. So skip
> writecache_wait_for_ios in writecache_discard when pmem mode.
>
> Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
Acked-by: Mikulas Patocka <mpatocka@...hat.com>
> ---
> drivers/md/dm-writecache.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
> index 66f3a3b..4367cc7 100644
> --- a/drivers/md/dm-writecache.c
> +++ b/drivers/md/dm-writecache.c
> @@ -849,8 +849,10 @@ static void writecache_discard(struct dm_writecache *wc, sector_t start, sector_
>
> if (likely(!e->write_in_progress)) {
> if (!discarded_something) {
> - writecache_wait_for_ios(wc, READ);
> - writecache_wait_for_ios(wc, WRITE);
> + if (!WC_MODE_PMEM(wc)) {
> + writecache_wait_for_ios(wc, READ);
> + writecache_wait_for_ios(wc, WRITE);
> + }
> discarded_something = true;
> }
> writecache_free_entry(wc, e);
> --
> 1.8.3.1
>
Powered by blists - more mailing lists