Skip to content

Commit

Permalink
scsi: ufs: ufshpb: Do not report victim error in HCM
Browse files Browse the repository at this point in the history
In host control mode, eviction is perceived as an extreme measure. There
are several conditions that both the entering and exiting regions should
meet, so that eviction will take place.

The common case however, is that those conditions are rarely met, so it is
normal that the act of eviction fails.  Therefore, do not report an error
in host control mode if eviction fails.

Link: https://lore.kernel.org/r/20210808090024.21721-5-avri.altman@wdc.com
Fixes: 6c59cb5 (scsi: ufs: ufshpb: Make eviction depend on region's reads)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Avri Altman authored and Martin K. Petersen committed Aug 12, 2021
1 parent 22aede9 commit 10163ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/ufs/ufshpb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,8 @@ static int ufshpb_add_region(struct ufshpb_lu *hpb, struct ufshpb_region *rgn)
victim_rgn = ufshpb_victim_lru_info(hpb);
if (!victim_rgn) {
dev_warn(&hpb->sdev_ufs_lu->sdev_dev,
"cannot get victim region error\n");
"cannot get victim region %s\n",
hpb->is_hcm ? "" : "error");
ret = -ENOMEM;
goto out;
}
Expand Down

0 comments on commit 10163ce

Please sign in to comment.