• Chaitanya Kulkarni's avatar
    nvmet: generate AEN for ns revalidate size change · de124f42
    Chaitanya Kulkarni authored
    The newly added function nvmet_ns_revalidate() does update the ns size
    in the identify namespace in-core target data structure when host issues
    id-ns command. This can lead to host having inconsistencies between size
    of the namespace present in the id-ns command result and size of the
    corresponding block device until host scans the namespaces explicitly.
    
    To avoid this scenario generate AEN if old size is not same as the new
    one in nvmet_ns_revalidate().
    
    This will allow automatic AEN generation when host calls id-ns command
    and also allows target to install userspace rules so that it can trigger
    nvmet_ns_revalidate() (using configfs interface with the help of next
    patch) resulting in appropriate AEN generation when underlying namespace
    size change is detected.
    Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimbeg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    de124f42
core.c 36.1 KB