Re: [PATCH v2 4/6] ksmbd: defer CHANGE_NOTIFY completion instead of STATUS_NOT_IMPLEMENTED
Gaël Blivet <[email protected]>
| Newsgroups | org.kernel.vger.linux-cifs |
|---|---|
| Message-ID | <[email protected]> |
Hi ChenXiaoSong, Makes sense, sorry for the misunderstanding. Could be cleaner, but doesn't wait_for_completion_interruptible() still block a worker thread from ksmbd_wq for as long as the watch stays open? Happy to help align the merged patch with your series once it's up. > Le 10 juil. 2026 à 09:04, ChenXiaoSong <[email protected]> a écrit : > > Would it be better to do it like the following? > > ``` > int smb2_notify() > { > setup_async_work(..., smb2_notify_cancel_fn, ...); > > smb2_send_interim_resp(work, STATUS_PENDING); > wait_for_completion_interruptible(); // woken up by smb2_notify_cancel_fn() > > if (work->state == KSMBD_WORK_CANCELLED) { > smb2_send_interim_resp(work, STATUS_CANCELLED); > work->send_no_response = 1; > goto out; > } > > // Add my implementation of notification events here. > }