• Chaitanya Kulkarni's avatar
    nvmet: add error-log definitions · e4a97625
    Chaitanya Kulkarni authored
    This patch adds necessary fields in the target data structures to
    support error log page. For a target controller, we add a new error log
    field to maintain the error log, at any given point we maintain error
    entries equal to NVMET_ERROR_LOG_SLOTS for each controller. In the
    following patch, we also update the error log page entry in the I/O
    completion path so we introduce a spinlock for synchronization of the
    log.
    
    For nvmet_req, we add a new field error_loc to hold the location of
    the error in the command when the actual error occurs for each request
    and a starting LBA if applicable.
    Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    e4a97625
core.c 32.5 KB