[PATCH 35/48] hpsa: remove incorrect BUG_ONs checking for raid offload enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stephen Cameron <stephenmcameron@xxxxxxxxx>

In set_encrypt_ioaccel2() and in hpsa_scsi_ioaccel_raid_map
there were BUG_ONs that looked like this:

	BUG_ON(!(dev->offload_config && dev->offload_enabled));

But, In hpsa_ack_ctlr_events() we have this,

	/* Stop sending new RAID offload reqs via the IO accelerator */
	scsi_block_requests(h->scsi_host);
	for (i = 0; i < h->ndevices; i++)
		h->dev[i]->offload_enabled = 0;
	hpsa_drain_accel_commands(h);

So, we set offload_enabled = 0 for all drives, then do this
drain_accel_commands, so that means accel commands could still
be in flight, ie. perhaps having just been submitted into
hpsa_scsi_ioaccel_raid_map concurrent with ->offload_enabled
having just been set to zero.

Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
Signed-off-by: Don Brace <don.brace@xxxxxxxx>
---
 drivers/scsi/hpsa.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index bae3759..5abd49d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3456,8 +3456,6 @@ static void set_encrypt_ioaccel2(struct ctlr_info *h,
 	struct raid_map_data *map = &dev->raid_map;
 	u64 first_block;
 
-	BUG_ON(!(dev->offload_config && dev->offload_enabled));
-
 	/* Are we doing encryption on this device */
 	if (!(le16_to_cpu(map->flags) & RAID_MAP_FLAG_ENCRYPT_ON))
 		return;
@@ -3688,8 +3686,6 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
 #endif
 	int offload_to_mirror;
 
-	BUG_ON(!(dev->offload_config && dev->offload_enabled));
-
 	/* check for valid opcode, get LBA and block count */
 	switch (cmd->cmnd[0]) {
 	case WRITE_6:

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux