On Tue, Aug 04, 2020 at 07:33:05AM -0500, John Donnelly wrote:
From: Mike Snitzer snitzer@redhat.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@redhat.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@vger.kernel.org for 4.14.y
Signed-off-by: John Donnelly john.p.donnelly@oracle.com Reviewed-by: Somasundaram Krishnasamy somasundaram.krishnasamy@oracle.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.
What is this "conflicts nonsense"? You don't see that in any other kernel patch changelog, do you?
drivers/md/dm-cache-target.c | 92 ++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 55 deletions(-)
Please fix your email client up, it's totally broken and this does not work at all and is getting frustrating from my side here.
Try sending emails to yourself and see if you can apply the patches, as the one you sent here does not work, again:
------------ ~/linux/stable/linux-4.14.y $ b4 am https://lore.kernel.org/r/8CFF8DA9-C105-461C-8F5A-DA2BF448A135@oracle.com Looking up https://lore.kernel.org/r/8CFF8DA9-C105-461C-8F5A-DA2BF448A135%40oracle.com Grabbing thread from lore.kernel.org/lkml Analyzing 1 messages in the thread --- Writing ./20200804_john_p_donnelly_dm_cache_submit_writethrough_writes_in_parallel_to_origin_and_cache.mbx [(resend) PATCH v3: {linux-4.14.y} ] dm cache: submit writethrough writes in parallel to origin and cache --- Total patches: 1 --- Link: https://lore.kernel.org/r/8CFF8DA9-C105-461C-8F5A-DA2BF448A135@oracle.com Base: not found (applies clean to current tree) git am ./20200804_john_p_donnelly_dm_cache_submit_writethrough_writes_in_parallel_to_origin_and_cache.mbx ~/linux/stable/linux-4.14.y $ patch -p1 < 20200804_john_p_donnelly_dm_cache_submit_writethrough_writes_in_parallel_to_origin_and_cache.mbx checking file drivers/md/dm-cache-target.c patch: **** malformed patch at line 70: }
------------
{sigh}
You can do better.
greg k-h