public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Song Liu <songliubraving@fb.com>
Cc: linux-raid@vger.kernel.org, shli@fb.com, neilb@suse.com,
	kernel-team@fb.com, dan.j.williams@intel.com, hch@infradead.org,
	jes.sorensen@gmail.com, "4.4+" <stable@vger.kernel.org>
Subject: Re: [PATCH] md/raid5: release/flush io in raid5_do_work()
Date: Thu, 24 Aug 2017 10:02:12 -0700	[thread overview]
Message-ID: <20170824170212.bfuydnvs3dq4nvfk@kernel.org> (raw)
In-Reply-To: <20170824165359.4065174-1-songliubraving@fb.com>

On Thu, Aug 24, 2017 at 09:53:59AM -0700, Song Liu wrote:
> In raid5, there are scenarios where some ios are deferred to a later
> time, and some IO need a flush to complete. To make sure we make
> progress with these IOs, we need to call the following functions:
> 
>     flush_deferred_bios(conf);
>     r5l_flush_stripe_to_raid(conf->log);
> 
> Both of these functions are called in raid5d(), but missing in
> raid5_do_work(). As a result, these functions are not called
> when multi-threading (group_thread_cnt > 0) is enabled. This patch
> adds calls to these function to raid5_do_work().
> 
> Note for stable branches:
> 
>   r5l_flush_stripe_to_raid(conf->log) is need for 4.4+
>   flush_deferred_bios(conf) is only needed for 4.11+
> 
> Cc: stable@vger.kernel.org (4.4+)
> Signed-off-by: Song Liu <songliubraving@fb.com>

Applied, thanks!
> ---
>  drivers/md/raid5.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index f64ff32..6af57c6 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -6226,6 +6226,10 @@ static void raid5_do_work(struct work_struct *work)
>  
>  	spin_unlock_irq(&conf->device_lock);
>  
> +	flush_deferred_bios(conf);
> +
> +	r5l_flush_stripe_to_raid(conf->log);
> +
>  	async_tx_issue_pending_all();
>  	blk_finish_plug(&plug);
>  
> -- 
> 2.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2017-08-24 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 16:53 [PATCH] md/raid5: release/flush io in raid5_do_work() Song Liu
2017-08-24 17:02 ` Shaohua Li [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=20170824170212.bfuydnvs3dq4nvfk@kernel.org \
    --to=shli@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=hch@infradead.org \
    --cc=jes.sorensen@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=shli@fb.com \
    --cc=songliubraving@fb.com \
    --cc=stable@vger.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