From 5132d1e655dc4befcc075ef32a261eb9733bb04c Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sun, 8 Feb 2015 03:06:17 -0800 Subject: [PATCH] target: Add internal WRITE_STRIP support This patch adds WRITE_STRIP support in target_write_prot_action() that invokes sbc_dif_verify_write() for checking T10-PI metadata before submitting the I/O to a backend driver. Upon verify failure, the specific sense code is propigated up the failure path up to transport_generic_request_failure(). Also, update sbc_dif_verify_write() to only perform the subsequent protection metadata copy when a valid *sg is passed. (Use ilog2 instead of division and unlikely for pi_err - Sagi) Reviewed-by: Martin Petersen Reviewed-by: Sagi Grimberg Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- Reading git-format-patch failed