]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: only reconfigure discard if necessary
authorJens Axboe <axboe@kernel.dk>
Wed, 2 May 2018 17:06:54 +0000 (11:06 -0600)
committerKeith Busch <keith.busch@intel.com>
Wed, 2 May 2018 17:16:58 +0000 (11:16 -0600)
commit35af4dadad11ef7ee1c1e0c35bfd010cf19abe93
tree4ce6cabeed4a0cbca0d933ea39211407bbc16810
parent75d0a42d870f9e5cb15f02ab8c63148a412c5f54
nvme: only reconfigure discard if necessary

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: Jens Axboe <axboe@kernel.dk>
[removed redundant queue flag setting]
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/core.c