FIO and gfapi

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

 



Hi,

I am currently using glusterfs 3.12.2 and when i use FIO 3.2, the file
is extended automatically to 16E when doing read.

Steps to produce

1. Perform sequential write
sudo fio -group_reporting -ioengine gfapi -volume test -brick
ubuntu24D -fallocate none -direct 1 -nrfiles 1 -filesize 1G -openfiles
1 -bs 256k -numjobs 1 -iodepth 1 -name test6 -rw write

2. Perform sequential read
sudo fio -group_reporting -ioengine gfapi -volume test -brick
ubuntu24D -fallocate none -direct 1 -nrfiles 1 -filesize 1G -openfiles
1 -bs 256k -numjobs 1 -iodepth 1 -name test6 -rw read

3. Mount the gluster volume using FUSE and can see the file size is now 16E
-rw-r--r--  1 root root  16E Nov 24 18:02 test6.0.0


I also run in debug mode and you can see the file is extended to 16E

file     12546 fio file test8.0.0 open mode rw td rw read
file     12546 fio extend file test8.0.0 from 1073741824 to 18446744073709551615

I also do some printf and i can see that f->real_file_size =
buf.st_size; is never executed and the function return on if (!g ||
!g->fs) {

int fio_gf_get_file_size(struct thread_data *td, struct fio_file *f)
{
        struct stat buf;
        int ret;
        struct gf_data *g = td->io_ops_data;

        dprint(FD_FILE, "get file size %s\n", f->file_name);

        if (!g || !g->fs) {
                return 0;
        }
        if (fio_file_size_known(f))
                return 0;

        ret = glfs_lstat(g->fs, f->file_name, &buf);
        if (ret < 0) {
                log_err("glfs_lstat failed.\n");
                return ret;
        }

        f->real_file_size = buf.st_size;
        fio_file_set_size_known(f);

        return 0;

}

Anyone can help to see what goes wrong? Thanks.

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



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux