• Jens Axboe's avatar
    nvme: only reconfigure discard if necessary · 3831761e
    Jens Axboe authored
    Currently nvme reconfigures discard for every disk revalidation. This
    is problematic because any O_WRONLY or O_RDWR open will trigger a
    partition scan through udev/systemd, and we will reconfigure discard.
    This blows away any user settings, like discard_max_bytes.
    
    Only re-configure the user settable settings if we need to.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    [removed redundant queue flag setting]
    Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
    3831761e
core.c 91.1 KB