• Long Li's avatar
    CIFS: SMBD: Upper layer performs SMB write via RDMA read through memory registration · db223a59
    Long Li authored
    When sending I/O, if size is larger than rdma_readwrite_threshold we prepare
    to send SMB write packet for a RDMA read via memory registration. The actual
    I/O is done by remote peer through local RDMA hardware. Modify the relevant
    fields in the packet accordingly, and append a smbd_buffer_descriptor_v1 to
    the end of the SMB write packet.
    
    On write I/O finish, deregister the memory region if this was for a RDMA read.
    If remote invalidation is not used, the call to smbd_deregister_mr will do
    local invalidation and possibly wait. Memory region is normally deregistered
    in MID callback as soon as it's used. There are situations where the MID may
    not be created on I/O failure, under which memory region is deregistered when
    write data context is released.
    Signed-off-by: default avatarLong Li <longli@microsoft.com>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
    Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
    db223a59
smb2pdu.c 98.5 KB