• Logan Gunthorpe's avatar
    nvmet: add passthru code to process commands · c1fef73f
    Logan Gunthorpe authored
    Add passthru command handling capability for the NVMeOF target and
    export passthru APIs which are used to integrate passthru
    code with nvmet-core.
    
    The new file passthru.c handles passthru cmd parsing and execution.
    In the passthru mode, we create a block layer request from the nvmet
    request and map the data on to the block layer request.
    
    Admin commands and features are on an allow list as there are a number
    of each that don't make too much sense with passthrough. We use an
    allow list such that new commands can be considered before being blindly
    passed through. In both cases, vendor specific commands are always
    allowed.
    
    We also reject reservation IO commands as the underlying device cannot
    differentiate between multiple hosts behind a fabric.
    Based-on-a-patch-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    c1fef73f
nvmet.h 15.8 KB