[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200803173407.GB1186998@kroah.com>
Date: Mon, 3 Aug 2020 19:34:07 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: John Donnelly <John.P.donnelly@...cle.com>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Mike Snitzer <snitzer@...hat.com>
Subject: Re: [PATCH v3: {linux-4.14.y} ] dm cache: submit writethrough writes
in parallel to origin and cache
On Mon, Aug 03, 2020 at 12:27:31PM -0500, John Donnelly wrote:
> From: Mike Snitzer <snitzer@...hat.com>
>
> Discontinue issuing writethrough write IO in series to the origin and
> then cache.
>
> Use bio_clone_fast() to create a new origin clone bio that will be
> mapped to the origin device and then bio_chain() it to the bio that gets
> remapped to the cache device. The origin clone bio does _not_ have a
> copy of the per_bio_data -- as such check_if_tick_bio_needed() will not
> be called.
>
> The cache bio (parent bio) will not complete until the origin bio has
> completed -- this fulfills bio_clone_fast()'s requirements as well as
> the requirement to not complete the original IO until the write IO has
> completed to both the origin and cache device.
>
> Signed-off-by: Mike Snitzer <snitzer@...hat.com>
>
> (cherry picked from commit 2df3bae9a6543e90042291707b8db0cbfbae9ee9)
>
> Fixes: 4ec34f2196d125ff781170ddc6c3058c08ec5e73 (dm bio record:
> save/restore bi_end_io and bi_integrity )
>
> 4ec34f21 introduced a mkfs.ext4 hang on a LVM device that has been
> modified with lvconvert --cachemode=writethrough.
>
> CC:stable@...r.kernel.org for 4.14.y
>
> Signed-off-by: John Donnelly <john.p.donnelly@...cle.com>
> Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@...cle.com>
>
> conflicts:
> drivers/md/dm-cache-target.c. - Corrected usage of
> writethrough_mode(&cache->feature) that was caught by
> compiler, and removed unused static functions : writethrough_endio(),
> defer_writethrough_bio(), wake_deferred_writethrough_worker()
> that generated warnings.
> ---
> drivers/md/dm-cache-target.c | 92
> ++++++++++++++++++--------------------------
> 1 file changed, 37 insertions(+), 55 deletions(-)
>
> diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
> index 69cdb29ef6be..2732d1df05fa 100644
> --- a/drivers/md/dm-cache-target.c
> +++ b/drivers/md/dm-cache-target.c
> @@ -450,6 +450,7 @@ struct cache {
> struct work_struct migration_worker;
> struct delayed_work waker;
> struct dm_bio_prison_v2 *prison;
> + struct bio_set *bs;
> mempool_t *migration_pool;
> @@ -537,11 +538,6 @@ static void wake_deferred_bio_worker(struct cache
> *cache)
Line-wrapped and unable to apply :(
Powered by blists - more mailing lists