int opc, enum cksum_types cksum_type,
__u32 *cksum)
{
- struct cfs_crypto_hash_desc *hdesc;
+ struct ahash_request *req;
unsigned int bufsize;
int i, err;
unsigned char cfs_alg = cksum_obd2cfs(cksum_type);
- hdesc = cfs_crypto_hash_init(cfs_alg, NULL, 0);
- if (IS_ERR(hdesc)) {
+ req = cfs_crypto_hash_init(cfs_alg, NULL, 0);
+ if (IS_ERR(req)) {
CERROR("%s: unable to initialize checksum hash %s\n",
tgt_name(tgt), cfs_crypto_hash_name(cfs_alg));
- return PTR_ERR(hdesc);
+ return PTR_ERR(req);
}
CDEBUG(D_INFO, "Checksum for algo %s\n", cfs_crypto_hash_name(cfs_alg));
* display in dump_all_bulk_pages() */
np->index = i;
- cfs_crypto_hash_update_page(hdesc, np, off,
+ cfs_crypto_hash_update_page(req, np, off,
len);
continue;
} else {
tgt_name(tgt));
}
}
- cfs_crypto_hash_update_page(hdesc, local_nb[i].lnb_page,
+ cfs_crypto_hash_update_page(req, local_nb[i].lnb_page,
local_nb[i].lnb_page_offset & ~PAGE_MASK,
local_nb[i].lnb_len);
* display in dump_all_bulk_pages() */
np->index = i;
- cfs_crypto_hash_update_page(hdesc, np, off,
+ cfs_crypto_hash_update_page(req, np, off,
len);
continue;
} else {
}
bufsize = sizeof(*cksum);
- err = cfs_crypto_hash_final(hdesc, (unsigned char *)cksum, &bufsize);
+ err = cfs_crypto_hash_final(req, (unsigned char *)cksum, &bufsize);
return 0;
}
enum cksum_types t10_cksum_type = tgt->lut_dt_conf.ddp_t10_cksum_type;
unsigned char cfs_alg = cksum_obd2cfs(OBD_CKSUM_T10_TOP);
const char *obd_name = tgt->lut_obd->obd_name;
- struct cfs_crypto_hash_desc *hdesc;
+ struct ahash_request *req;
unsigned int bufsize;
unsigned char *buffer;
struct page *__page;
if (__page == NULL)
return -ENOMEM;
- hdesc = cfs_crypto_hash_init(cfs_alg, NULL, 0);
- if (IS_ERR(hdesc)) {
+ req = cfs_crypto_hash_init(cfs_alg, NULL, 0);
+ if (IS_ERR(req)) {
CERROR("%s: unable to initialize checksum hash %s\n",
tgt_name(tgt), cfs_crypto_hash_name(cfs_alg));
- return PTR_ERR(hdesc);
+ return PTR_ERR(req);
}
buffer = kmap(__page);
* display in dump_all_bulk_pages() */
np->index = i;
- cfs_crypto_hash_update_page(hdesc, np, off,
+ cfs_crypto_hash_update_page(req, np, off,
len);
continue;
} else {
used_number += used;
if (used_number == guard_number) {
- cfs_crypto_hash_update_page(hdesc, __page, 0,
+ cfs_crypto_hash_update_page(req, __page, 0,
used_number * sizeof(*guard_start));
used_number = 0;
}
* display in dump_all_bulk_pages() */
np->index = i;
- cfs_crypto_hash_update_page(hdesc, np, off,
+ cfs_crypto_hash_update_page(req, np, off,
len);
continue;
} else {
GOTO(out, rc);
if (used_number != 0)
- cfs_crypto_hash_update_page(hdesc, __page, 0,
+ cfs_crypto_hash_update_page(req, __page, 0,
used_number * sizeof(*guard_start));
bufsize = sizeof(cksum);
- rc = cfs_crypto_hash_final(hdesc, (unsigned char *)&cksum, &bufsize);
+ rc = cfs_crypto_hash_final(req, (unsigned char *)&cksum, &bufsize);
if (rc == 0)
*check_sum = cksum;