Commit 13ef0023 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Li Lingfeng
Browse files

scsi: core: Add scsi_prot_ref_tag() helper

stable inclusion
from stable-v5.10.206
commit 294d66c35a4e019a9dfe889fe382adce1cc3773e
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8ZD3X
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.206&id=294d66c35a4e019a9dfe889fe382adce1cc3773e

-------------------------

[ Upstream commit 7ba46799 ]

We are about to remove the request pointer from struct scsi_cmnd and that
will complicate getting to the ref_tag via t10_pi_ref_tag() in the various
drivers. Introduce a helper function to retrieve the reference tag so
drivers will not have to worry about the details.

Link: https://lore.kernel.org/r/20210609033929.3815-2-martin.petersen@oracle.com


Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Message-Id: <20210609033929.3815-2-martin.petersen@oracle.com>
Stable-dep-of: 066c5b46b6ea ("scsi: core: Always send batch on reset or error handling command")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
parent bb2503a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment