Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-03 Thread Hannes Reinecke
On 11/03/2016 05:11 PM, Ewan D. Milne wrote: On Wed, 2016-11-02 at 22:27 +0100, Hannes Reinecke wrote: On 11/02/2016 04:44 PM, Ewan D. Milne wrote: In this and other places the patch changes the code from submitting the INQUIRY/EVPD command for the page it wants, to calling scsi_get_vpd_page().

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-03 Thread Ewan D. Milne
On Wed, 2016-11-02 at 22:27 +0100, Hannes Reinecke wrote: > On 11/02/2016 04:44 PM, Ewan D. Milne wrote: > > In this and other places the patch changes the code from submitting the > > INQUIRY/EVPD command for the page it wants, to calling scsi_get_vpd_page(). > > scsi_get_vpd_page() will return -E

[PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-03 Thread Hannes Reinecke
Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced. Signed-off-by: Hann

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-03 Thread Hannes Reinecke
On 11/02/2016 04:06 PM, Christoph Hellwig wrote: On Tue, Nov 01, 2016 at 10:49:36PM +0100, Hannes Reinecke wrote: Switch to scsi_execute_req_flags() instead of using the block interface directly. This will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-02 Thread Hannes Reinecke
On 11/02/2016 04:44 PM, Ewan D. Milne wrote: On Tue, 2016-11-01 at 22:49 +0100, Hannes Reinecke wrote: ... static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h, char *array_name, u8 *array_id) { - int err, i; - struct c8_inquiry *inqp; +

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-02 Thread Ewan D. Milne
On Tue, 2016-11-01 at 22:49 +0100, Hannes Reinecke wrote: ... > static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h, > char *array_name, u8 *array_id) > { > - int err, i; > - struct c8_inquiry *inqp; > + int err = SCSI_DH_IO, i; > + struc

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-02 Thread Christoph Hellwig
On Tue, Nov 01, 2016 at 10:49:36PM +0100, Hannes Reinecke wrote: > Switch to scsi_execute_req_flags() instead of > using the block interface directly. This will set > REQ_QUIET and REQ_PREEMPT, but this is okay as > we're evaluating the errors anyway and should be > able to send the command even if

[PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-01 Thread Hannes Reinecke
Switch to scsi_execute_req_flags() instead of using the block interface directly. This will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced. Signed-off-by: Hannes Reinecke --- drivers/scsi

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-01 Thread Hannes Reinecke
On 11/01/2016 03:47 PM, Christoph Hellwig wrote: On Mon, Oct 31, 2016 at 06:59:28PM +0100, Hannes Reinecke wrote: Switch to using scsi_execute_req_flags() instead of using the block primitives. __scsi_execute adds RQF_QUIET and RQF_PREEMPT to the request flags, which would be a change in behav

Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-11-01 Thread Christoph Hellwig
On Mon, Oct 31, 2016 at 06:59:28PM +0100, Hannes Reinecke wrote: > Switch to using scsi_execute_req_flags() instead of using the > block primitives. __scsi_execute adds RQF_QUIET and RQF_PREEMPT to the request flags, which would be a change in behavior. A little analysis on why that's safe or eve

[PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()

2016-10-31 Thread Hannes Reinecke
Switch to using scsi_execute_req_flags() instead of using the block primitives. Signed-off-by: Hannes Reinecke --- drivers/scsi/device_handler/scsi_dh_rdac.c | 160 - 1 file changed, 45 insertions(+), 115 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_