Lines Matching full:file
49 * file system. If not already created, this routine will create the
95 * When Debugfs is configured this routine removes debugfs file system
113 * or fc_trace_clear debugfs file
114 * @filp: The file pointer to read from.
117 * @ppos: The position in the file to start reading from.
123 * It will start reading file at @ppos and
129 static ssize_t fnic_trace_ctrl_read(struct file *filp, in fnic_trace_ctrl_read()
145 pr_err("fnic: Cannot read to any debugfs file\n"); in fnic_trace_ctrl_read()
153 * fc_trace_clear debugfs file
154 * @filp: The file pointer to write from.
157 * @ppos: The position in the file to start writing to.
167 static ssize_t fnic_trace_ctrl_write(struct file *filp, in fnic_trace_ctrl_write()
196 pr_err("fnic: cannot write to any debugfs file\n"); in fnic_trace_ctrl_write()
213 * @file: The file pointer to attach the log output
216 * This routine is the entry point for the debugfs open file operation.
219 * the private_data field in @file.
226 struct file *file) in fnic_trace_debugfs_open() argument
258 file->private_data = fnic_dbg_prt; in fnic_trace_debugfs_open()
264 * fnic_trace_debugfs_lseek - Seek through a debugfs file
265 * @file: The file pointer to seek through.
270 * This routine is the entry point for the debugfs lseek file operation.
273 * figures out what the new offset of the debugfs file will be and assigns
274 * that value to the f_pos field of @file.
280 static loff_t fnic_trace_debugfs_lseek(struct file *file, in fnic_trace_debugfs_lseek() argument
284 fnic_dbgfs_t *fnic_dbg_prt = file->private_data; in fnic_trace_debugfs_lseek()
285 return fixed_size_llseek(file, offset, howto, in fnic_trace_debugfs_lseek()
290 * fnic_trace_debugfs_read - Read a debugfs file
291 * @file: The file pointer to read from.
294 * @pos: The position in the file to start reading from.
298 * field of @file. It will start reading at @pos and copy up to @nbytes of
303 * less than @nbytes if the end of the file was reached).
305 static ssize_t fnic_trace_debugfs_read(struct file *file, in fnic_trace_debugfs_read() argument
310 fnic_dbgfs_t *fnic_dbg_prt = file->private_data; in fnic_trace_debugfs_read()
320 * debugfs file data
322 * @file: The file pointer that contains the buffer to release
326 * file was opened.
332 struct file *file) in fnic_trace_debugfs_release() argument
334 fnic_dbgfs_t *fnic_dbg_prt = file->private_data; in fnic_trace_debugfs_release()
354 * file system. If not already created, this routine will create the
355 * create file trace to log fnic trace buffer output into debugfs and
356 * it will also create file trace_enable to control enable/disable of
375 "Cannot create trace_enable file under debugfs\n"); in fnic_trace_debugfs_init()
387 "Cannot create trace file under debugfs\n"); in fnic_trace_debugfs_init()
398 * When Debugfs is configured this routine removes debugfs file system
416 * file system. If not already created, this routine will create the
417 * create file trace to log fnic fc trace buffer output into debugfs and
418 * it will also create file fc_trace_enable to control enable/disable of
438 pr_err("fnic: Failed create fc_trace_enable file\n"); in fnic_fc_trace_debugfs_init()
449 pr_err("fnic: Failed to create fc_trace_enable file\n"); in fnic_fc_trace_debugfs_init()
461 pr_err("fnic: Failed create fc_rdata_trace file\n"); in fnic_fc_trace_debugfs_init()
473 pr_err("fnic: Failed to create fc_trace file\n"); in fnic_fc_trace_debugfs_init()
484 * When Debugfs is configured this routine removes debugfs file system
504 * fnic_reset_stats_open - Open the reset_stats file
506 * @file: The file pointer to attach the stats reset flag.
509 * This routine opens a debugsfs file reset_stats and stores i_private data
511 * file oprations.
516 static int fnic_reset_stats_open(struct inode *inode, struct file *file) in fnic_reset_stats_open() argument
526 file->private_data = debug; in fnic_reset_stats_open()
532 * fnic_reset_stats_read - Read a reset_stats debugfs file
533 * @filp: The file pointer to read from.
536 * @ppos: The position in the file to start reading from.
540 * and stores into local @buf. It will start reading file at @ppos and
546 static ssize_t fnic_reset_stats_read(struct file *file, in fnic_reset_stats_read() argument
550 struct stats_debug_info *debug = file->private_data; in fnic_reset_stats_read()
561 * fnic_reset_stats_write - Write to reset_stats debugfs file
562 * @filp: The file pointer to write from.
565 * @ppos: The position in the file to start writing to.
574 static ssize_t fnic_reset_stats_write(struct file *file, in fnic_reset_stats_write() argument
578 struct stats_debug_info *debug = file->private_data; in fnic_reset_stats_write()
627 * debugfs file data
629 * @file: The file pointer that contains the buffer to release
633 * file was opened.
639 struct file *file) in fnic_reset_stats_release() argument
641 struct stats_debug_info *debug = file->private_data; in fnic_reset_stats_release()
647 * fnic_stats_debugfs_open - Open the stats file for specific host
650 * @file: The file pointer to attach the specific host statistics.
653 * This routine opens a debugsfs file stats of specific host and print
660 struct file *file) in fnic_stats_debugfs_open() argument
681 file->private_data = debug; in fnic_stats_debugfs_open()
687 * fnic_stats_debugfs_read - Read a debugfs file
688 * @file: The file pointer to read from.
691 * @pos: The position in the file to start reading from.
695 * field of @file. It will start reading at @pos and copy up to @nbytes of
700 * less than @nbytes if the end of the file was reached).
702 static ssize_t fnic_stats_debugfs_read(struct file *file, in fnic_stats_debugfs_read() argument
707 struct stats_debug_info *debug = file->private_data; in fnic_stats_debugfs_read()
717 * debugfs file data
719 * @file: The file pointer that contains the buffer to release
723 * file was opened.
729 struct file *file) in fnic_stats_debugfs_release() argument
731 struct stats_debug_info *debug = file->private_data; in fnic_stats_debugfs_release()
753 * fnic_stats_init - Initialize stats struct and create stats file per fnic
756 * When Debugfs is configured this routine sets up the stats file per fnic
757 * It will create file stats and reset_stats under statistics/host# directory
784 printk(KERN_DEBUG "Cannot create host stats file\n"); in fnic_stats_debugfs_init()
794 printk(KERN_DEBUG "Cannot create host stats file\n"); in fnic_stats_debugfs_init()
805 * When Debugfs is configured this routine removes debugfs file system