[bug] Crash with multiple file names

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

 



Hi!  fio crashed with this configuration.  I notice there are a
multiple variables counting the number of files, so I don't know which
one to use.  nr_files *seems* safe?

diff --git a/filesetup.c b/filesetup.c
index af23191..eb8774a 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -685,8 +685,8 @@ int add_file(struct thread_data *td, const char *fname)

        f->fd = -1;

-       if (td->files_size <= td->files_index) {
-               int new_size = td->o.nr_files;
+       if (td->files_size <= td->o.nr_files) {
+               int new_size = td->o.nr_files + 1;

                dprint(FD_FILE, "resize file array to %d files\n", new_size);


Test config:

[global]
directory=/media/ext4

[a]
filename=large-001:large-002:large-003:large-004:large-005:large-006
bs=1M
rw=read


x86_64, fio 1.25.1

-- 
mvh
Carl Henrik
--
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