From 64d240b721b21e266ffde645ec965c3b6d1c551f Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 13 Apr 2015 23:21:58 +0900 Subject: [PATCH] target/file: Fix UNMAP with DIF protection support When UNMAP command is issued with DIF protection support enabled, the protection info for the unmapped region is remain unchanged. So READ command for the region causes data integrity failure. This fixes it by invalidating protection info for the unmapped region by filling with 0xff pattern. This change also adds helper function fd_do_prot_fill() in order to reduce code duplication with existing fd_format_prot(). Signed-off-by: Akinobu Mita Reviewed-by: Sagi Grimberg Reviewed-by: "Martin K. Petersen" Cc: Christoph Hellwig Cc: "James E.J. Bottomley" Cc: # v3.14+ Signed-off-by: Nicholas Bellinger --- Reading git-format-patch failed