engines/falloc: add blockdevice as a target
authorDmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Wed, 10 Mar 2021 16:33:35 +0000 (19:33 +0300)
committerDmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Wed, 10 Mar 2021 16:40:49 +0000 (19:40 +0300)
fallocate supoport for blockdevices was added five years ago.
It is time to stress-test it via fio.

engines/falloc.c

index 6382569b9a92c42c1ad5d76a75d9441808de6cc8..4b05ed68fb467263ddbebabe7e79dd5231f92b63 100644 (file)
@@ -25,8 +25,8 @@ static int open_file(struct thread_data *td, struct fio_file *f)
 
        dprint(FD_FILE, "fd open %s\n", f->file_name);
 
-       if (f->filetype != FIO_TYPE_FILE) {
-               log_err("fio: only files are supported fallocate \n");
+       if (f->filetype != FIO_TYPE_FILE && f->filetype != FIO_TYPE_BLOCK) {
+               log_err("fio: only files and blockdev are supported fallocate \n");
                return 1;
        }
        if (!strcmp(f->file_name, "-")) {