On 7/13/21 12:50 PM, Bodo Stroesser wrote: > When running command pipelining for WRITE direction commands, > (e.g. tape device write) userspace sends cmd completion to cmd > ring before processing write data. In that case userspace has to > copy data before sending completion, because cmd completion also > implicitly releases the data buffer in data area. > > The new feature KEEP_BUF allows userspace to optionally keep the > buffer after completion by setting new bit TCMU_UFLAG_KEEP_BUF in > tcmu_cmd_entry_hdr->uflags. In that case buffer has to be released > explicitly by writing the cmd_id to new action item free_kept_buf. > > All kept buffers are released during reset_ring and if userspace > closes uio device (tcmu_release). > > Signed-off-by: Bodo Stroesser <bostroesser@xxxxxxxxx> Reviewed-by: Mike Christie <michael.christie@xxxxxxxxxx>