From: Boaz Harrosh Date: Mon, 16 Nov 2009 18:48:38 +0000 (+0200) Subject: [SCSI] libosd: Error handling revamped X-Git-Tag: v2.6.33-rc1~344^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa9fffbe2c4db4557248c5c626a85bf3c7867044;p=pandora-kernel.git [SCSI] libosd: Error handling revamped Administer some love to the osd_req_decode_sense function * Fix a bad bug with osd_req_decode_sense(). If there was no scsi residual, .i.e the request never reached the target, then all the osd_sense_info members where garbage. * Add grossly missing in/out_resid to osd_sense_info and fill them in properly. * Define an osd_err_priority enum which divides the possible errors into 7 categories in ascending severity. Each category is also assigned a Linux return code translation. Analyze the different osd/scsi/block returned errors and set the proper osd_err_priority and Linux return code accordingly. * extra check a few situations so not to get stuck with inconsistent error view. Example an empty residual with an error code, and other places ... Lots of libosd's osd_req_decode_sense clients had this logic in some form or another. Consolidate all these into one place that should actually know about osd returns. Thous translating it to a more abstract error. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley --- Reading git-diff-tree failed