Re: [RFC PATCH 10/11] smb/server: send notify events to the client

ChenXiaoSong <[email protected]> Sat, 25 Jul 2026 22:14:09 +0800
Newsgroups org.kernel.vger.linux-cifs
Message-ID <[email protected]>
Thanks for your reviews. Your suggestions are very helpful to me.

在 2026/7/25 22:02, Namjae Jeon 写道:
>> +static int ksmbd_notify_reply(struct ksmbd_work *work,
>> +                             struct ksmbd_notify *notify,
>> +                             struct smb2_change_notify_req *req,
>> +                             struct smb2_change_notify_rsp *rsp,
>> +                             struct list_head *events)
>> +{
>> +       u32 max_len = min(le32_to_cpu(req->OutputBufferLength),
>> +                         notify->max_buffer_size);
> Why is the response limited by notify->max_buffer_size, which is
> captured when the watch is first created?
> The maximum amount returned for this completion should be governed by
> the current request's OutputBufferLength. Limiting it to the first
> request's buffer size can unnecessarily return STATUS_NOTIFY_ENUM_DIR
> even when a later request supplied a sufficiently large output buffer.
> 
> Thanks for the patch!

-- 
ChenXiaoSong <[email protected]>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en