On 02/06/2012 08:30 AM, Jeff Liu wrote:
> Introduce 280 for SEEK_DATA/SEEK_HOLE copy check.
>
> Signed-off-by: Jie Liu<jeff.liu@xxxxxxxxxx>
>
+static int
+do_extent_copy(int src_fd, int dest_fd, off_t data_off, off_t hole_off)
+{
...
+
+ while (len> 0) {
+ memset(buf, 0, sizeof(buf));
+ ssize_t nr_read = read(src_fd, buf, BUF_SIZE);
#RCJ The memset above is unnecessary.
+static int
+copy_extents(int src_fd, int dest_fd, off_t src_total_size)
+{
+ int ret = 0;
+ unsigned int i = 0;
...
+ ++i;
+ seek_start = hole_pos;
+ } while (seek_start< src_total_size);
#RCJ i is unused.
Other than the comments above, this version of the test looks good.
Reviewed-by: Rich Johnston<rjohnston@xxxxxxx>
|