mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
t10-pi: Move opencoded contants to common header
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
e23947bd76
commit
128b6f9fdd
@@ -28,9 +28,6 @@
|
||||
|
||||
typedef __be16 (csum_fn) (void *, unsigned int);
|
||||
|
||||
static const __be16 APP_ESCAPE = (__force __be16) 0xffff;
|
||||
static const __be32 REF_ESCAPE = (__force __be32) 0xffffffff;
|
||||
|
||||
static __be16 t10_pi_crc_fn(void *data, unsigned int len)
|
||||
{
|
||||
return cpu_to_be16(crc_t10dif(data, len));
|
||||
@@ -82,7 +79,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
|
||||
switch (type) {
|
||||
case 1:
|
||||
case 2:
|
||||
if (pi->app_tag == APP_ESCAPE)
|
||||
if (pi->app_tag == T10_PI_APP_ESCAPE)
|
||||
goto next;
|
||||
|
||||
if (be32_to_cpu(pi->ref_tag) !=
|
||||
@@ -95,8 +92,8 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (pi->app_tag == APP_ESCAPE &&
|
||||
pi->ref_tag == REF_ESCAPE)
|
||||
if (pi->app_tag == T10_PI_APP_ESCAPE &&
|
||||
pi->ref_tag == T10_PI_REF_ESCAPE)
|
||||
goto next;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user