Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-03 Thread Yi Li
The root cause: After just cached_dev_free do cancel_writeback_rate_update_dwork without bch_register_lock . at the same time. Wirting the writeback_percent by sysfs witch bch_register_lock will insert a writeback_rate_update work. cached_dev_free with bch_register_lock to do

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-02 Thread Coly Li
On 12/3/20 2:25 PM, Yi Li wrote: >> On 12/1/20 12:35 PM, Yi Li wrote: >>> sorry, This patch will cause deadlock, i will check and redo it. >> >> Can you try latest upstream kernel firstly ? Before spending more time >> on the fix. >> > > This issue just happened three times (xenserver7.5 dom0

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-02 Thread Yi Li
> On 12/1/20 12:35 PM, Yi Li wrote: >> sorry, This patch will cause deadlock, i will check and redo it. > > Can you try latest upstream kernel firstly ? Before spending more time > on the fix. > This issue just happened three times (xenserver7.5 dom0 kernel) on the same machine and cannot

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-01 Thread Coly Li
On 12/1/20 12:35 PM, Yi Li wrote: > sorry, This patch will cause deadlock, i will check and redo it. Can you try latest upstream kernel firstly ? Before spending more time on the fix. If I remember correctly, when cancel_writeback_rate_update_dwork() is not timed out, the cache set memory won't

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-01 Thread Coly Li
On 11/30/20 7:21 PM, Yi Li wrote: > bcache_device_detach will release the cache_set after hotunplug cache > disk. update_writeback_rate should check validate of cache_set. > I see the kernel is 4.4.0+10, do you try the the v5.9 kernel ? I don't see your kernel code, it is not easy to response.

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-11-30 Thread Yi Li
sorry, This patch will cause deadlock, i will check and redo it. On 11/30/20, Yi Li wrote: > bcache_device_detach will release the cache_set after hotunplug cache > disk. update_writeback_rate should check validate of cache_set. > > IP: [] update_writeback_rate+0x59/0x3a0 [bcache] > PGD

[PATCH] bcache: fix panic due to cache_set is null

2020-11-30 Thread Yi Li
bcache_device_detach will release the cache_set after hotunplug cache disk. update_writeback_rate should check validate of cache_set. IP: [] update_writeback_rate+0x59/0x3a0 [bcache] PGD 879620067 PUD 8755d3067 PMD 0 Oops: [#1] SMP CPU: 8 PID: 1005702 Comm: kworker/8:0 Tainted: G