Re: [PATCH v2] bcache: stop writeback thread after detaching

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

 



Hi Tang Junhui--

Thank you.

On 11/21/2017 10:20 PM, tang.junhui@xxxxxxxxxx wrote:
> From: Tang Junhui <tang.junhui@xxxxxxxxxx>
> 
> Currently, when a cached device detaching from cache, writeback thread is
> not stopped, and writeback_rate_update work is not canceled. For example,
> after bellow command:
> echo 1 >/sys/block/sdb/bcache/detach
> you can still see the writeback thread. Then you attach the device to the
> cache again, bcache will create another writeback thread, for example,
> after bellow command:
> echo  ba0fb5cd-658a-4533-9806-6ce166d883b9 > /sys/block/sdb/bcache/attach
> then you will see 2 writeback threads.
> This patch stops writeback thread and cancels writeback_rate_update work
> when cached device detaching from cache.
> 
> Compare with patch v1, this v2 patch moves code down into the register
> lock for safety in case of any future changes as Coly and mike suggested.
> 
> Signed-off-by: Tang Junhui <tang.junhui@xxxxxxxxxx>

Reviewed-by: Michael Lyle <mlyle@xxxxxxxx>

I've added it to my staging tree.  Just one concern:
>  mode change 100644 => 100755 drivers/md/bcache/super.c

Your patches tend to have executable files in them, and I need to remove
these before they'll be accepted upstream.  I've fixed it this time, but
can you please be careful in the future?

Thanks,

Mike



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux