block: sed-opal: split generation of bytestring header and content
authorJonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Thu, 14 Feb 2019 00:16:02 +0000 (01:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Apr 2019 17:09:12 +0000 (11:09 -0600)
commit285599590e2e1f067d56a5855244e95f6303b28f
tree760eab99b46fd81951dd39f1582d6e36aa255f53
parentb2f9c6eb3f5f44d2fded05856f69050d7170eeff
block: sed-opal: split generation of bytestring header and content

Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz>
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/sed-opal.c