Re: [PATCH 1/1] raid5-cache: rename r5l_flush_stripe_to_raid to r5l_flush_stripe_to_journal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On May 10, 2019, at 12:45 AM, Xiao Ni <xni@xxxxxxxxxx> wrote:
> 
> When journal device supports volatile write cache, it needs to flush to make sure data is settled
> down in journal device. It's the usage of function r5l_flush_stripe_to_raid. The data is flushed
> from stripe cache to journal device. Rename the function name to make it more proper.

I think current name is more accurate. It is actually the beginning of writing data to raid
disks. While it does flush the journal device, it also calls r5l_log_flush_endio(), which 
kicks off the write to raid disks. 

Does this make sense?

Thanks,
Song 

> 
> Signed-off-by: Xiao Ni <xni@xxxxxxxxxx>
> ---
> drivers/md/raid5-cache.c | 2 +-
> drivers/md/raid5.c       | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
> index cbbe6b6..689a59e 100644
> --- a/drivers/md/raid5-cache.c
> +++ b/drivers/md/raid5-cache.c
> @@ -1294,7 +1294,7 @@ static void r5l_log_flush_endio(struct bio *bio)
>  * only write stripes of an io_unit to raid disks till the io_unit is the first
>  * one whose data/parity is in log.
>  */
> -void r5l_flush_stripe_to_raid(struct r5l_log *log)
> +void r5l_flush_stripe_to_journal(struct r5l_log *log)
> {
> 	bool do_flush;
> 
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 7fde645..56d9e6e 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -6206,7 +6206,7 @@ static int handle_active_stripes(struct r5conf *conf, int group,
> 	release_inactive_stripe_list(conf, temp_inactive_list,
> 				     NR_STRIPE_HASH_LOCKS);
> 
> -	r5l_flush_stripe_to_raid(conf->log);
> +	r5l_flush_stripe_to_journal(conf->log);
> 	if (release_inactive) {
> 		spin_lock_irq(&conf->device_lock);
> 		return 0;
> @@ -6262,7 +6262,7 @@ static void raid5_do_work(struct work_struct *work)
> 
> 	flush_deferred_bios(conf);
> 
> -	r5l_flush_stripe_to_raid(conf->log);
> +	r5l_flush_stripe_to_journal(conf->log);
> 
> 	async_tx_issue_pending_all();
> 	blk_finish_plug(&plug);
> @@ -6349,7 +6349,7 @@ static void raid5d(struct md_thread *thread)
> 
> 	flush_deferred_bios(conf);
> 
> -	r5l_flush_stripe_to_raid(conf->log);
> +	r5l_flush_stripe_to_journal(conf->log);
> 
> 	async_tx_issue_pending_all();
> 	blk_finish_plug(&plug);
> -- 
> 2.7.5
> 





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux