Re: [PATCHv2] cephfs: Fix scheduler warning due to nested blocking

2016-10-11 Thread Yan, Zheng
> On 11 Oct 2016, at 17:16, Nikolay Borisov wrote: > > try_get_cap_refs can be used as a condition in a wait_event* calls. > This is all fine until it has to call __ceph_do_pending_vmtruncate, > which in turn acquires the i_truncate_mutex. This leads to a situation > in which a task's state is !

[PATCHv2] cephfs: Fix scheduler warning due to nested blocking

2016-10-11 Thread Nikolay Borisov
try_get_cap_refs can be used as a condition in a wait_event* calls. This is all fine until it has to call __ceph_do_pending_vmtruncate, which in turn acquires the i_truncate_mutex. This leads to a situation in which a task's state is !TASK_RUNNING and at the same time it's trying to acquire a sleep