Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 001291e5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "md: dm-req-crypt: Reduce the max hw_sectors for dm-req-crypt queue"

parents 7b1b8e13 7a475661
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@
 */
#define DM_REQ_CRYPT_ENCRYPTION_MODE_TRANSPARENT 1

#define DM_REQ_CRYPT_QUEUE_SIZE 256

struct req_crypt_result {
	struct completion completion;
	int err;
@@ -1043,6 +1045,8 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
	char dummy;
	int err = DM_REQ_CRYPT_ERROR, i;
	struct crypto_engine_entry *eng_list = NULL;
	struct block_device *bdev = NULL;
	struct request_queue *q = NULL;

	DMDEBUG("dm-req-crypt Constructor.\n");

@@ -1095,6 +1099,10 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
		is_fde_enabled = true; /* backward compatible */
	}

	bdev = dev->bdev;
	q = bdev_get_queue(bdev);
	blk_queue_max_hw_sectors(q, DM_REQ_CRYPT_QUEUE_SIZE);

	_req_crypt_io_pool = KMEM_CACHE(req_dm_crypt_io, 0);
	if (!_req_crypt_io_pool) {
		err =  DM_REQ_CRYPT_ERROR;