default of $jobname.$jobnum.$filenum will be used if
no other format specifier is given.
+unique_filename=bool To avoid collisions between networked clients, fio
+ defaults to prefixing any generated filenames (with a directory
+ specified) with the source of the client connecting. To disable
+ this behavior, set this option to 0.
+
opendir=str Tell fio to recursively add any file it can find in this
directory and down the file system tree.
dprint(FD_FILE, "add file %s\n", fname);
if (td->o.directory)
- len = set_name_idx(file_name, PATH_MAX, td->o.directory, numjob);
+ len = set_name_idx(file_name, PATH_MAX, td->o.directory, numjob,
+ td->o.unique_filename);
sprintf(file_name + len, "%s", fname);
.RE
.P
.TP
+.BI unique_filename \fR=\fPbool
+To avoid collisions between networked clients, fio defaults to prefixing
+any generated filenames (with a directory specified) with the source of
+the client connecting. To disable this behavior, set this option to 0.
+.TP
.BI lockfile \fR=\fPstr
Fio defaults to not locking any files before it does IO to them. If a file or
file descriptor is shared, fio can serialize IO to that file to make the end
* Returns the directory at the index, indexes > entires will be
* assigned via modulo division of the index
*/
-int set_name_idx(char *target, size_t tlen, char *input, int index)
+int set_name_idx(char *target, size_t tlen, char *input, int index,
+ bool unique_filename)
{
unsigned int cur_idx;
int len;
for (cur_idx = 0; cur_idx <= index; cur_idx++)
fname = get_next_name(&str);
- if (client_sockaddr_str[0]) {
+ if (client_sockaddr_str[0] && unique_filename) {
len = snprintf(target, tlen, "%s/%s.", fname,
client_sockaddr_str);
} else
},
{
.name = "filename_format",
+ .lname = "Filename Format",
.type = FIO_OPT_STR_STORE,
.off1 = td_var_offset(filename_format),
.prio = -1, /* must come after "directory" */
.category = FIO_OPT_C_FILE,
.group = FIO_OPT_G_FILENAME,
},
+ {
+ .name = "unique_filename",
+ .lname = "Unique Filename",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(unique_filename),
+ .help = "For network clients, prefix file with source IP",
+ .def = "1",
+ .category = FIO_OPT_C_FILE,
+ .group = FIO_OPT_G_FILENAME,
+ },
{
.name = "lockfile",
.lname = "Lockfile",
struct thread_data;
void fio_options_free(struct thread_data *);
char *get_name_idx(char *, int);
-int set_name_idx(char *, size_t, char *, int);
+int set_name_idx(char *, size_t, char *, int, bool);
extern char client_sockaddr_str[]; /* used with --client option */
unsigned int iodepth_batch_complete_min;
unsigned int iodepth_batch_complete_max;
+ unsigned int unique_filename;
+
unsigned long long size;
unsigned long long io_limit;
unsigned int size_percent;
uint32_t size_percent;
uint32_t fill_device;
uint32_t file_append;
+ uint32_t unique_filename;
uint64_t file_size_low;
uint64_t file_size_high;
uint64_t start_offset;
uint32_t bs_unaligned;
uint32_t fsync_on_close;
uint32_t bs_is_seq_rand;
+ uint32_t pad1;
uint32_t random_distribution;
uint32_t exitall_error;
uint32_t fsync_blocks;
uint32_t fdatasync_blocks;
uint32_t barrier_blocks;
- uint32_t pad1;
uint64_t start_delay;
uint64_t start_delay_high;
uint64_t timeout;
uint64_t trim_backlog;
uint32_t clat_percentiles;
uint32_t percentile_precision;
- uint32_t pad2;
fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
uint8_t read_iolog_file[FIO_TOP_STR_MAX];
uint64_t number_ios;
uint32_t sync_file_range;
- uint32_t pad3;
+ uint32_t pad2;
uint64_t latency_target;
uint64_t latency_window;