diff options
Diffstat (limited to 'include/scsi/osd_initiator.h')
-rw-r--r-- | include/scsi/osd_initiator.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index 3ec346e15dda..39d6d1097153 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -267,7 +267,7 @@ int osd_execute_request_async(struct osd_request *or, | |||
267 | * @bad_attr_list - List of failing attributes (optional) | 267 | * @bad_attr_list - List of failing attributes (optional) |
268 | * @max_attr - Size of @bad_attr_list. | 268 | * @max_attr - Size of @bad_attr_list. |
269 | * | 269 | * |
270 | * After execution, sense + return code can be analyzed using this function. The | 270 | * After execution, osd_request results are analyzed using this function. The |
271 | * return code is the final disposition on the error. So it is possible that a | 271 | * return code is the final disposition on the error. So it is possible that a |
272 | * CHECK_CONDITION was returned from target but this will return NO_ERROR, for | 272 | * CHECK_CONDITION was returned from target but this will return NO_ERROR, for |
273 | * example on recovered errors. All parameters are optional if caller does | 273 | * example on recovered errors. All parameters are optional if caller does |
@@ -276,7 +276,31 @@ int osd_execute_request_async(struct osd_request *or, | |||
276 | * of the SCSI_OSD_DPRINT_SENSE Kconfig value. Set @silent if you know the | 276 | * of the SCSI_OSD_DPRINT_SENSE Kconfig value. Set @silent if you know the |
277 | * command would routinely fail, to not spam the dmsg file. | 277 | * command would routinely fail, to not spam the dmsg file. |
278 | */ | 278 | */ |
279 | |||
280 | /** | ||
281 | * osd_err_priority - osd categorized return codes in ascending severity. | ||
282 | * | ||
283 | * The categories are borrowed from the pnfs_osd_errno enum. | ||
284 | * See comments for translated Linux codes returned by osd_req_decode_sense. | ||
285 | */ | ||
286 | enum osd_err_priority { | ||
287 | OSD_ERR_PRI_NO_ERROR = 0, | ||
288 | /* Recoverable, caller should clear_highpage() all pages */ | ||
289 | OSD_ERR_PRI_CLEAR_PAGES = 1, /* -EFAULT */ | ||
290 | OSD_ERR_PRI_RESOURCE = 2, /* -ENOMEM */ | ||
291 | OSD_ERR_PRI_BAD_CRED = 3, /* -EINVAL */ | ||
292 | OSD_ERR_PRI_NO_ACCESS = 4, /* -EACCES */ | ||
293 | OSD_ERR_PRI_UNREACHABLE = 5, /* any other */ | ||
294 | OSD_ERR_PRI_NOT_FOUND = 6, /* -ENOENT */ | ||
295 | OSD_ERR_PRI_NO_SPACE = 7, /* -ENOSPC */ | ||
296 | OSD_ERR_PRI_EIO = 8, /* -EIO */ | ||
297 | }; | ||
298 | |||
279 | struct osd_sense_info { | 299 | struct osd_sense_info { |
300 | u64 out_resid; /* Zero on success otherwise out residual */ | ||
301 | u64 in_resid; /* Zero on success otherwise in residual */ | ||
302 | enum osd_err_priority osd_err_pri; | ||
303 | |||
280 | int key; /* one of enum scsi_sense_keys */ | 304 | int key; /* one of enum scsi_sense_keys */ |
281 | int additional_code ; /* enum osd_additional_sense_codes */ | 305 | int additional_code ; /* enum osd_additional_sense_codes */ |
282 | union { /* Sense specific information */ | 306 | union { /* Sense specific information */ |