diff options
author | jimharris <jimharris@FreeBSD.org> | 2013-03-26 21:14:51 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2013-03-26 21:14:51 +0000 |
commit | 21ee92ac4f6bdb321bcb61110a71cc121390f2b9 (patch) | |
tree | 373bb8bf3ef938e872f43909aca8e28c959f1d9a /sys/dev/nvme/nvme_private.h | |
parent | 18a3a60fb4e69d37c0f75f7989372bf51c6cd27c (diff) | |
download | FreeBSD-src-21ee92ac4f6bdb321bcb61110a71cc121390f2b9.zip FreeBSD-src-21ee92ac4f6bdb321bcb61110a71cc121390f2b9.tar.gz |
Cap the number of retry attempts to a configurable number. This ensures
that if a specific I/O repeatedly times out, we don't retry it indefinitely.
The default number of retries will be 4, but is adjusted using hw.nvme.retry_count.
Sponsored by: Intel
Reviewed by: carl
Diffstat (limited to 'sys/dev/nvme/nvme_private.h')
-rw-r--r-- | sys/dev/nvme/nvme_private.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 091d13c..dd36a86 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -104,6 +104,8 @@ MALLOC_DECLARE(M_NVME); #define NVME_MIN_TIMEOUT_PERIOD (5) #define NVME_MAX_TIMEOUT_PERIOD (120) +#define NVME_DEFAULT_RETRY_COUNT (4) + /* Maximum log page size to fetch for AERs. */ #define NVME_MAX_AER_LOG_SIZE (4096) @@ -111,7 +113,8 @@ MALLOC_DECLARE(M_NVME); #define CACHE_LINE_SIZE (64) #endif -extern uma_zone_t nvme_request_zone; +extern uma_zone_t nvme_request_zone; +extern int32_t nvme_retry_count; struct nvme_request { @@ -122,6 +125,7 @@ struct nvme_request { struct uio *uio; nvme_cb_fn_t cb_fn; void *cb_arg; + int32_t retries; STAILQ_ENTRY(nvme_request) stailq; }; @@ -409,6 +413,7 @@ void nvme_qpair_submit_tracker(struct nvme_qpair *qpair, void nvme_qpair_process_completions(struct nvme_qpair *qpair); void nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); +void nvme_qpair_reset(struct nvme_qpair *qpair); void nvme_admin_qpair_enable(struct nvme_qpair *qpair); void nvme_admin_qpair_disable(struct nvme_qpair *qpair); |