xfs
[Top] [All Lists]

Re: [PATCH v2 2/2] xfstests: introduce 280 for SEEK_DATA/SEEK_HOLE copy

To: <jeff.liu@xxxxxxxxxx>
Subject: Re: [PATCH v2 2/2] xfstests: introduce 280 for SEEK_DATA/SEEK_HOLE copy check
From: Rich Johnston <rjohnston@xxxxxxx>
Date: Fri, 11 May 2012 10:15:36 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <4F2FE410.2040508@xxxxxxxxxx>
References: <4F2FE410.2040508@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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>

<Prev in Thread] Current Thread [Next in Thread>