]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_librbd_fsx: align temp_buf by readbdy instead of writebdy
authorIlya Dryomov <ilya.dryomov@inktank.com>
Fri, 25 Apr 2014 09:36:53 +0000 (13:36 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 7 May 2014 13:30:05 +0000 (17:30 +0400)
temp_buf is used for reads, so align it by readbdy.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/test/librbd/fsx.c

index 2b65da5810b0117e8746babe439cc8ede8da92e4..f28d82023241f67da59b97ccfc542cdad7f7188e 100644 (file)
@@ -1533,8 +1533,8 @@ main(int argc, char **argv)
        good_buf = (char *) malloc(maxfilelen + writebdy);
        good_buf = round_ptr_up(good_buf, writebdy, 0);
        memset(good_buf, '\0', maxfilelen);
-       temp_buf = (char *) malloc(maxfilelen + writebdy);
-       temp_buf = round_ptr_up(temp_buf, writebdy, 0);
+       temp_buf = (char *) malloc(maxfilelen + readbdy);
+       temp_buf = round_ptr_up(temp_buf, readbdy, 0);
        memset(temp_buf, '\0', maxfilelen);
        if (lite) {     /* zero entire existing file */
                ssize_t written;