diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-02-11 21:34:40 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-02-12 15:24:12 -0500 |
commit | f161d4b44d7cc1dc66b53365215227db356378b1 (patch) | |
tree | fc7a5791374458619b4cd7aa8de799927de84617 /include/target | |
parent | 3fd7b60f2c7418239d586e359e0c6d8503e10646 (diff) |
target: Fix PR_APTPL_BUF_LEN buffer size limitation
This patch addresses the original PR_APTPL_BUF_LEN = 8k limitiation
for write-out of PR APTPL metadata that Martin has recently been
running into.
It changes core_scsi3_update_and_write_aptpl() to use vzalloc'ed
memory instead of kzalloc, and increases the default hardcoded
length to 256k.
It also adds logic in core_scsi3_update_and_write_aptpl() to double
the original length upon core_scsi3_update_aptpl_buf() failure, and
retries until the vzalloc'ed buffer is large enough to accommodate
the outgoing APTPL metadata.
Reported-by: Martin Svec <martin.svec@zoner.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 397fb635766a..eec07656eb03 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -409,7 +409,7 @@ struct t10_reservation { | |||
409 | /* Activate Persistence across Target Power Loss enabled | 409 | /* Activate Persistence across Target Power Loss enabled |
410 | * for SCSI device */ | 410 | * for SCSI device */ |
411 | int pr_aptpl_active; | 411 | int pr_aptpl_active; |
412 | #define PR_APTPL_BUF_LEN 8192 | 412 | #define PR_APTPL_BUF_LEN 262144 |
413 | u32 pr_generation; | 413 | u32 pr_generation; |
414 | spinlock_t registration_lock; | 414 | spinlock_t registration_lock; |
415 | spinlock_t aptpl_reg_lock; | 415 | spinlock_t aptpl_reg_lock; |