All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
To: "Gaël Blivet" <gael.blivet@gmail.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>, linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2 4/6] ksmbd: defer CHANGE_NOTIFY completion instead of STATUS_NOT_IMPLEMENTED
Date: Fri, 10 Jul 2026 14:48:50 +0800	[thread overview]
Message-ID: <882a42e8-bf41-4f7c-a30f-e9d2fe44c49d@chenxiaosong.com> (raw)
In-Reply-To: <36FFCEFB-8E41-4EB6-B835-0B440C9F4A52@gmail.com>

Hi Gaël,

Thanks for your patches.

I mean sending STATUS_CANCELLED in smb2_notify() (not in 
smb2_notify_cancel_fn()). The event notification and STATUS_CANCELLED 
response should be handled in smb2_notify().

You can refer to the implementation of smb2_lock():

```
int smb2_lock()
{
     smb2_send_interim_resp(work, STATUS_PENDING);
     ksmbd_vfs_posix_lock_wait(flock); // woken up by 
smb2_remove_blocked_lock()

     smb2_send_interim_resp(work, STATUS_CANCELLED);
     work->send_no_response = 1
}
```

I have already implemented the complete notify feature, but since my 
patch series is quite large, I still need to make some changes and split 
it into smaller patches that are easier to review.

On 7/10/26 13:59, Gaël Blivet wrote:
> Because cancel_fn runs under conn->request_lock, smb2_cancel() holds it as a spinlock while walking async_requests, so cancel_fn can’t sleep. ksmbd_conn_write() takes conn->srv_mutex and can block on the actual socket write too, so calling it there directly would mean sleeping under a spinlock.
> 
> smb2_notify_cancel_fn() only does the non-sleeping parts inline (list removal, freeing cancel_argv, releasing the async id), same as smb2_remove_blocked_lock() elsewhere in this file, and pushes the actual response send to a workqueue.

-- 
ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en


  reply	other threads:[~2026-07-10  6:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  0:06 [PATCH v2 0/6] ksmbd: add macOS Time Machine / AAPL SMB2 extension support Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 1/6] ksmbd: add Apple AAPL kAAPL_SERVER_QUERY create context support Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 2/6] ksmbd: synthesize empty AFP_AfpInfo xattr on first probe Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 3/6] ksmbd: send inline FinderInfo in FIND responses when READDIR_ATTR negotiated Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 4/6] ksmbd: defer CHANGE_NOTIFY completion instead of STATUS_NOT_IMPLEMENTED Gaël Blivet-Bailly
2026-07-09  7:03   ` ChenXiaoSong
2026-07-09  9:24   ` ChenXiaoSong
2026-07-10  5:59     ` Gaël Blivet
2026-07-10  6:48       ` ChenXiaoSong [this message]
2026-07-10  7:04         ` ChenXiaoSong
2026-07-10  8:54           ` Gaël Blivet
2026-07-10  9:15             ` ChenXiaoSong
2026-07-10 13:28               ` Gaël Blivet
2026-07-09  0:06 ` [PATCH v2 5/6] ksmbd: implement full-file copy for AAPL ChunkCount=0 COPYCHUNK Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 6/6] ksmbd: add AAPL READDIR_ATTR V2 support Gaël Blivet-Bailly
2026-07-09 13:15 ` [PATCH v2 0/6] ksmbd: add macOS Time Machine / AAPL SMB2 extension support Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=882a42e8-bf41-4f7c-a30f-e9d2fe44c49d@chenxiaosong.com \
    --to=chenxiaosong@chenxiaosong.com \
    --cc=gael.blivet@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.