OSDN Git Service

nvmet-fc: simplify sg list handling
authorJames Smart <jsmart2021@gmail.com>
Mon, 31 Jul 2017 20:21:14 +0000 (13:21 -0700)
committerSagi Grimberg <sagi@grimberg.me>
Mon, 28 Aug 2017 20:00:41 +0000 (23:00 +0300)
commit48fa362b6c3f4d69bdb6310b46626049092475e0
treec8f7d71b54dec83f09dae2cf659d08a14c2c2af3
parent5533d42480d6ced6765401c55a3622b4c437d7eb
nvmet-fc: simplify sg list handling

The existing nvmet_fc sg list handling has 2 faults:
a) the request between LLDD and transport has too large of an sg
   list (256 elements), which is normally 256k (64 elements).
b) sglist handling doesn't optimize on the fact that each element
   is a page.

This patch removes the static sg list in the request and uses the
dynamic list already present in the nvmet_fc transport. It also
simplies the handling of the sg list on multiple sequences to
take advantage of the per-page divisions.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fc.c
include/linux/nvme-fc-driver.h