• Mike Christie's avatar
    tcmu: allow userspace to reset ring · 892782ca
    Mike Christie authored
    This patch adds 2 tcmu attrs to block/unblock a device and
    reset the ring buffer. They are used when the userspace
    daemon has crashed or forced to shutdown while IO is executing.
    On restart, the daemon can block the device so new IO is not
    sent to userspace while it puts the ring in a clean state.
    
    Notes: The reset ring opreation is specific to tcmu, but the
    block one could be generic. I kept it tcmu specific, because
    it requires some extra locking/state checks in the main IO
    path and since other backend modules did not need this
    functionality I thought only tcmu should take the perf hit.
    Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    892782ca
target_core_user.c 63.5 KB