sg_ring: Gentler scsi merge
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 2 patches 1 replyIn review
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] sg_ring: Gentler scsi merge
OK, after wading through many scsi drivers, I decided to change tack and try to provide a transition path. This is in two stages:
1) These two patches. sg_ring used underneath, but if any driver asks for scsi_sglist() they get a 2.6.24-style chained sg. No other patches are necessary.
2) Once all chained-sg-needing scsi drivers change to use cmd->sg (ie. sg_ring) directly, and the chained sg patches can be reverted. scsi_sglist() and scsi_sg_count() then become:
/* You should only use these if you never need chained sgs */
static inline struct scatterlist *scsi_sglist(struct scsi_cmd *cmd)
{
BUG_ON(!list_empty(&cmd->sg->list));
return &cmd->sg->sg[0];
}
static unsigned int scsi_sg_count(struct scsi_cmd *cmd)
{
if (!cmd->sg)
return 0;
BUG_ON(!list_empty(&cmd->sg->list));
return cmd->sg->num;
}Thanks,
Rusty.