path: root/sys/cam/ctl/ctl_error.h
diff options
authorAlexander Motin <mav@FreeBSD.org>2014-12-03 15:16:18 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-12-03 15:16:18 +0000
commit9e52565344f48fbd9bec44f9d72c5a1c639e32c6 (patch)
treea2523f5c7e49f9e413a5831c8a6e8791872e229a /sys/cam/ctl/ctl_error.h
parent672aa7f472bb9397aee52462b6a8cb23425d3bf9 (diff)
Do not pre-allocate UNIT ATTENTIONs storage for every possible initiator.
Abusing ability of major UAs cover minor ones we may not account UAs for inactive ports. Allocate UAs storage for port and start accounting only after some initiator from that port fetched its first POWER ON OCCURRED. This reduces per-LUN CTL memory usage from >1MB to less then 100K. MFC after: 1 month
Notes: svn path=/head/; revision=275458
Diffstat (limited to 'sys/cam/ctl/ctl_error.h')
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl_error.h b/sys/cam/ctl/ctl_error.h
index d7d82aa392a0..8430eef0bb02 100644
--- a/sys/cam/ctl/ctl_error.h
+++ b/sys/cam/ctl/ctl_error.h
@@ -42,6 +42,8 @@
#ifndef _CTL_ERROR_H_
#define _CTL_ERROR_H_
+struct ctl_lun;
void ctl_set_sense_data_va(struct scsi_sense_data *sense_data, void *lun,
scsi_sense_data_type sense_format, int current_error,
int sense_key, int asc, int ascq, va_list ap);
@@ -55,8 +57,8 @@ void ctl_sense_to_desc(struct scsi_sense_data_fixed *sense_src,
void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src,
struct scsi_sense_data_fixed *sense_dest);
void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq);
-ctl_ua_type ctl_build_ua(ctl_ua_type *ua_type, struct scsi_sense_data *sense,
- scsi_sense_data_type sense_format);
+ctl_ua_type ctl_build_ua(struct ctl_lun *lun, uint32_t initidx,
+ struct scsi_sense_data *sense, scsi_sense_data_type sense_format);
void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio);
void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag);
void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command,