Re: [PATCH 4/5] target/user: Refactor data ring allocation code

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

 



On 04/23/2015 03:10 AM, Ilias Tsitsimpis wrote:
Hi Andy,

You are right, the function names are a bit off. I see the following
options:

1) Rename these functions to map_sg_to_data_area() and
unmap_sg_from_data_area(). Even though these functions allocate,
deallocate space in the data area and possibly copy to/from it, their
purpose is to map/unmap the scatterlist to the data area. Later on, we
can improve these functions to actually map the data, and not copy them.

2) Rename these functions to alloc_and_scatter_data_area() and
gather_and_free_data_area(). These names describe exactly what these
functions do.

3) Split them into a pair of functions that allocate/free data area, and
another pair that copy between the data area and the sg. I didn't go for
this one because I didn't want to divert from your original
implementation. Such approach would also have to iterate over the
scatter/gather list twice.

Very true. I'd vote for #2 then, for now.

Other than this issue, all 5 patches looked good to me.

Reviewed-by: Andy Grover <agrover@xxxxxxxxxx>

-- Andy

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




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux