Re: [PATCH 2/2] completely convert sg to block layer helpers

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

 



Mike Christie wrote:
> any missing functionality. I am still testing the patch. I have not
> tested some of the older sg interfaces

I am pretty sure (100% :)), that I messed up the old interface handling.

> -
> -static int
> -sg_write_xfer(Sg_request * srp)
> -{
> -	sg_io_hdr_t *hp = &srp->header;
> -	Sg_scatter_hold *schp = &srp->data;
> -	struct scatterlist *sg = schp->buffer;
> -	int num_xfer = 0;
> -	int j, k, onum, usglen, ksglen, res;
> -	int iovec_count = (int) hp->iovec_count;
> -	int dxfer_dir = hp->dxfer_direction;
> -	unsigned char *p;
> -	unsigned char __user *up;
> -	int new_interface = ('\0' == hp->interface_id) ? 0 : 1;
> -
> -	if ((SG_DXFER_UNKNOWN == dxfer_dir) || (SG_DXFER_TO_DEV == dxfer_dir) ||
> -	    (SG_DXFER_TO_FROM_DEV == dxfer_dir)) {
> -		num_xfer = (int) (new_interface ? hp->dxfer_len : hp->flags);
> -		if (schp->bufflen < num_xfer)
> -			num_xfer = schp->bufflen;

In sg_write_xfer here, for the old interface is it valid to have
hp->dxfer_len greater than hp->flags, then have sg_read_oxfer get
num_read_xfer that is not equal to hp->dxfer_len?

-
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