]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-rdma: Don't use the inline buffer in order to avoid allocation for small reads
authorSagi Grimberg <sagi@grimberg.me>
Thu, 28 Jul 2016 15:04:09 +0000 (18:04 +0300)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 4 Aug 2016 14:44:40 +0000 (17:44 +0300)
commited6b6e2d75e6bf8d5c4c3a149378bd6fc4281121
treef947b259e8c9c1a1d183603ead13d2c386ae8ec8
parent9877151ea0ac1f13c171f0450faf2697dcb98a33
nvmet-rdma: Don't use the inline buffer in order to avoid allocation for small reads

Under extreme conditions this might cause data corruptions. By doing that
we we repost the buffer and then post this buffer for the device to send.
If we happen to use shared receive queues the device might write to the
buffer before it sends it (there is no ordering between send and recv
queues). Without SRQs we probably won't get that if the host doesn't
mis-behave and send more than we allowed it, but relying on that is not
really a good idea.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/rdma.c