Lines Matching defs:file

15  * otherwise, applies only to this software file.  Patent licenses, if
33 * iogen - a tool for generating file/sds io for a doio process
51 #include <sys/file.h>
89 * Structure for retaining test file information
93 char f_path[MAX_FNAME_LENGTH + 1]; /* file name (full path) */
95 int f_iou; /* file iounit */
96 int f_riou; /* file raw iounit (for O_RAW/O_SSD) */
99 int f_type; /* file type S_IFREG, etc... */
140 int O_opt = 0; /* file creation Open flags */
170 struct file_info *File_List; /* info about each file */
175 int Fileio = 0; /* flag indicating that a file */
358 * Map file types to strings
511 "Path Length iou raw iou file\n");
553 "iogen%s: Output file %s exists, but is not a FIFO\n",
592 * Choose system call, flags, and file
628 * otherwise, we're doing file io. Choose starting offset, length,
637 * IO that is O_RAW or O_SSD must be aligned on the file r_iou. Otherwise
828 the file open read/write */
938 * Get information about a file that iogen uses to choose io length and
939 * offset. Information gathered is file length, iounit, and raw iounit.
941 * device on which the file resides. For block/character special files
983 * which the file resides. riou is the iou (logical sector size) of
993 * attempt to determine it by looking at the device the file
1022 "iogen%s: Error %s (%d) getting direct I/O info of file %s\n",
1036 * Otherwise, file is a device. Use lk_devinfo() to get its logical
1066 * Create file path as nbytes long. If path exists, the file will either be
1067 * extended or truncated to be nbytes long. Returns final size of file,
1092 "iogen%s: Could not stat file %s: %s (%d)\n",
1099 "iogen%s: file %s exists, but is not a regular file - cannot modify length\n",
1112 "iogen%s: Could not create/open file %s: %s (%d)\n",
1118 * Truncate file if it is longer than nbytes, otherwise attempt to
1119 * pre-allocate file blocks.
1134 * The file must be designated as Real-Time before any data
1144 "iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
1181 "iogen%s: Could not fcntl(F_RESVSP) %d bytes in file %s: %s (%d)\n",
1189 /* F_ALLOCSP allocates from the start of the file to l_start */
1201 "iogen%s: Could not fcntl(F_ALLOCSP) %d bytes in file %s: %s (%d)\n",
1210 * Write a byte at the end of file so that stat() sets the right
1211 * file size.
1222 "iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
1231 "iogen%s: Error %s (%d) opening file %s with flags O_CREAT|O_RDWR|O_DIRECT\n",
1240 * about not being able to create a file of <nbytes> length,
1241 * since the file will be shorter.
1252 "iogen%s: Could not lseek() to EOF of file %s: %s (%d)\n\tactual offset %d file size goal %d miniosz %lld\n",
1271 "iogen%s: Could not write %d byte length file %s: %s (%d)\n",
1276 "\toffset %d file size goal %d, miniosz=%d\n",
1291 "iogen%s: Could not lseek() to EOF in file %s: %s (%d)\n\toffset goal %d\n",
1300 "iogen%s: Could not create a %d byte length file %s: %s (%d)\n",
1306 "\toffset %d file size goal %d\n",
1378 char *file, *cp, ch;
1584 /* this means "use direct i/o to preallocate file" */
1743 * Supply default file io flags - defaut is 'buffered,raw,sync,ldraw'.
1773 * Initialize File_List[] - only necessary if doing file io. First
1795 * the file to the desired length. Otherwise, just make sure
1796 * the file is accessable.
1803 "iogen%s: illegal file length (%s) for file %s\n",
1808 file = cp + 1;
1810 if (strlen(file) > MAX_FNAME_LENGTH) {
1812 "iogen%s: Max fname length is %d chars - ignoring file %s\n",
1814 file);
1819 nb = create_file(file, len);
1823 "iogen%s warning: Couldn't create file %s of %d bytes\n",
1824 TagName, file, len);
1832 file = argv[optind];
1833 if (access(file, R_OK | W_OK) == -1) {
1835 "iogen%s: file %s cannot be accessed for reading and/or writing: %s (%d)\n",
1836 TagName, file, SYSERR, errno);
1842 * get per-file information
1847 if (file[0] == '/') {
1848 strcpy(fptr->f_path, file);
1856 strcat(fptr->f_path, file);
1861 "iogen%s warning: Error getting file info for %s\n",
1862 TagName, file);
1866 * If the file length is smaller than our min transfer size,
1872 "iogen%s warning: Ignoring file %s\n",
1882 * If the file length is smaller than our max transfer size,
1888 "iogen%s warning: Ignoring file %s\n",
1959 "\t-f flag,... Flags to use for file IO. Supported flags are\n");
1999 "\t consectutive transfers within a given file.\n");
2014 "\t realtime:extsize - put file on real-time volume\n");
2022 "\t direct - use O_DIRECT I/O to write to the file\n");
2064 "\t[len:]file,... Test files to do IO against (note ssread/sswrite\n");
2066 "\t don't need a test file). The len: syntax\n");
2096 "usage%s: iogen [-hoq] [-a aio_type,...] [-f flag[,flag...]] [-i iterations] [-p outpipe] [-m offset-mode] [-s syscall[,syscall...]] [-t mintrans] [-T maxtrans] [ -O file-create-flags ] [[len:]file ...]\n",