Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-28 Thread James Bottomley
On Thu, 2012-09-27 at 13:41 -0400, Martin K. Petersen wrote: James == James Bottomley james.bottom...@hansenpartnership.com writes: I'm fine with having the eh action be triggered for FS requests only, if that's what you're asking? James Sort of ... I was thinking do it for all non

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-27 Thread Martin K. Petersen
James == James Bottomley james.bottom...@hansenpartnership.com writes: I'm fine with having the eh action be triggered for FS requests only, if that's what you're asking? James Sort of ... I was thinking do it for all non REQ_TYPE_BLOCK_PC James commands (which includes flush and other

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-26 Thread James Bottomley
On Wed, 2012-09-26 at 22:02 -0400, Martin K. Petersen wrote: James == James Bottomley james.bottom...@hansenpartnership.com writes: James Plus, I think it fixes a bug where you get different behaviours James from REQ_TYPE_BLOCK_PC commands when a driver is and isn't James attached (I've

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-24 Thread Li Zhong
On Mon, 2012-09-24 at 09:44 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 13:30 +0800, Li Zhong wrote: Just noticed that after commit 919f797, it is possible that scsi_cmd_to_driver() returns NULL. This patch adds the NULL checking for drv returned from the above function.

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-24 Thread James Bottomley
On Mon, 2012-09-24 at 15:03 +0800, Li Zhong wrote: On Mon, 2012-09-24 at 09:44 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 13:30 +0800, Li Zhong wrote: Just noticed that after commit 919f797, it is possible that scsi_cmd_to_driver() returns NULL. This patch adds the NULL checking

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-24 Thread Li Zhong
On Mon, 2012-09-24 at 11:35 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 15:03 +0800, Li Zhong wrote: On Mon, 2012-09-24 at 09:44 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 13:30 +0800, Li Zhong wrote: Just noticed that after commit 919f797, it is possible that

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-24 Thread James Bottomley
On Mon, 2012-09-24 at 17:25 +0800, Li Zhong wrote: On Mon, 2012-09-24 at 11:35 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 15:03 +0800, Li Zhong wrote: On Mon, 2012-09-24 at 09:44 +0400, James Bottomley wrote: On Mon, 2012-09-24 at 13:30 +0800, Li Zhong wrote: Just noticed

[PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-23 Thread Li Zhong
Just noticed that after commit 919f797, it is possible that scsi_cmd_to_driver() returns NULL. This patch adds the NULL checking for drv returned from the above function. Maybe it is not possible at run time, but from the code itself, we'd better have this check? This patch actually is a

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-23 Thread James Bottomley
On Mon, 2012-09-24 at 13:30 +0800, Li Zhong wrote: Just noticed that after commit 919f797, it is possible that scsi_cmd_to_driver() returns NULL. This patch adds the NULL checking for drv returned from the above function. Maybe it is not possible at run time, but from the code itself,