Re: [PATCH] scsi_debug: illegal blocking memory allocation

2007-01-04 Thread James Bottomley
On Thu, 2007-01-04 at 12:21 +0100, Jens Axboe wrote: I guess it's fully up to you how you want to solve it. The scheme seems a little elaborate, but these error conditions are unlikely to ever been seen in the wild, so no objections from me. Actually, there's already a DID_ code that does what

Re: [PATCH] scsi_debug: illegal blocking memory allocation

2007-01-04 Thread Matthew Wilcox
On Thu, Jan 04, 2007 at 09:10:01AM -0600, James Bottomley wrote: On Thu, 2007-01-04 at 12:21 +0100, Jens Axboe wrote: I guess it's fully up to you how you want to solve it. The scheme seems a little elaborate, but these error conditions are unlikely to ever been seen in the wild, so no

Re: [PATCH] scsi_debug: illegal blocking memory allocation

2007-01-04 Thread James Bottomley
On Thu, 2007-01-04 at 08:27 -0700, Matthew Wilcox wrote: Any returning command, or a returning command from this device? This device We may be out of memory from a different device, and this may be the only command being sent to the scsi_debug driver. Wouldn't we end up halting the

Re: [PATCH] scsi_debug: illegal blocking memory allocation

2007-01-04 Thread Douglas Gilbert
Jens Axboe wrote: On Thu, Jan 04 2007, James Bottomley wrote: On Thu, 2007-01-04 at 12:21 +0100, Jens Axboe wrote: I guess it's fully up to you how you want to solve it. The scheme seems a little elaborate, but these error conditions are unlikely to ever been seen in the wild, so no

[PATCH] scsi_debug: illegal blocking memory allocation

2007-01-03 Thread Jens Axboe
Hi Doug, resp_inquiry() does a GFP_KERNEL memory allocation, but it's not allowed to from the queuecommand context. There's no good way to return this error, so I used DID_ERROR which is used from similar paths. That doesn't seem quite right though, it would be better to return an error

Re: [PATCH] scsi_debug: illegal blocking memory allocation

2007-01-03 Thread Douglas Gilbert
Jens Axboe wrote: Hi Doug, resp_inquiry() does a GFP_KERNEL memory allocation, but it's not allowed to from the queuecommand context. There's no good way to return this error, so I used DID_ERROR which is used from similar paths. That doesn't seem quite right though, it would be better to