[[PATCH v1] 14/37] [CIFS] SMBD: Post a SMBD data transfer message with page payload

Tom Talpey ttalpey at microsoft.com
Mon Aug 14 20:23:13 UTC 2017


> -----Original Message-----
> From: linux-cifs-owner at vger.kernel.org [mailto:linux-cifs-
> owner at vger.kernel.org] On Behalf Of Long Li
> Sent: Wednesday, August 2, 2017 4:10 PM
> To: Steve French <sfrench at samba.org>; linux-cifs at vger.kernel.org; samba-
> technical at lists.samba.org; linux-kernel at vger.kernel.org
> Cc: Long Li <longli at microsoft.com>
> Subject: [[PATCH v1] 14/37] [CIFS] SMBD: Post a SMBD data transfer message
> with page payload
> 
>  /*
> + * Send a page
> + * page: the page to send
> + * offset: offset in the page to send
> + * size: length in the page to send
> + * remaining_data_length: remaining data to send in this payload
> + */
> +static int cifs_rdma_post_send_page(struct cifs_rdma_info *info, struct page
> *page,
> +               unsigned long offset, size_t size, int remaining_data_length)
> +{
>...
> +       wait_event(info->wait_send_queue, atomic_read(&info->send_credits) >
> 0);

This is an uninterruptible wait, correct? What's to guarantee the event will
ever fire? Also, if the count is zero, there should be a check that an SMB Direct
credit request is outstanding. If not, it's wasteful to sleep for the keepalive timer
to do so.

Tom.



More information about the samba-technical mailing list