All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sg_ring: Gentler scsi merge
@ 2008-01-03  7:00 Rusty Russell
  2008-01-03  8:50 ` [PATCH 1/3] scsi: Convert everyone to scsi_sglist and scsi_sg_count Rusty Russell
  2008-01-03  9:42 ` [PATCH 0/2] sg_ring: Gentler scsi merge Boaz Harrosh
  0 siblings, 2 replies; 7+ messages in thread
From: Rusty Russell @ 2008-01-03  7:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-scsi

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-04  3:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03  7:00 [PATCH 0/2] sg_ring: Gentler scsi merge Rusty Russell
2008-01-03  8:50 ` [PATCH 1/3] scsi: Convert everyone to scsi_sglist and scsi_sg_count Rusty Russell
2008-01-03  8:54   ` [PATCH 2/3] usb_storage: usb_stor_bulk_transfer_sg cleanup Rusty Russell
2008-01-03  8:55     ` [PATCH 3/3] scsi: convert core to sg_ring Rusty Russell
2008-01-03  9:26   ` [PATCH 1/3] scsi: Convert everyone to scsi_sglist and scsi_sg_count Boaz Harrosh
2008-01-04  3:28     ` Rusty Russell
2008-01-03  9:42 ` [PATCH 0/2] sg_ring: Gentler scsi merge Boaz Harrosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.