Lines Matching defs:file
3 * Simple file system for zoned block devices exposing zones as files.
38 * act as if there is a hole up to the file maximum size.
73 /* All write I/Os should always be within the file maximum size */
113 static int zonefs_read_folio(struct file *unused, struct folio *folio)
160 struct file *swap_file, sector_t *span)
166 "swap file: not a conventional zone file\n");
198 * the maximum file size, which is equivalent to a zone finish.
235 * For a truncation to the maximum file size, the zone is
257 static int zonefs_file_fsync(struct file *file, loff_t start, loff_t end,
260 struct inode *inode = file_inode(file);
271 ret = file_write_and_wait_range(file, start, end);
314 static int zonefs_file_mmap(struct file *file, struct vm_area_struct *vma)
322 if (zonefs_inode_is_seq(file_inode(file)) &&
326 file_accessed(file);
332 static loff_t zonefs_file_llseek(struct file *file, loff_t offset, int whence)
334 loff_t isize = i_size_read(file_inode(file));
341 return generic_file_llseek_size(file, offset, whence, isize, isize);
384 * Do not exceed the LFS limits nor the file zone size. If pos is under the
387 static loff_t zonefs_write_check_limits(struct file *file, loff_t pos,
390 struct inode *inode = file_inode(file);
403 if (!(file->f_flags & O_LARGEFILE))
414 struct file *file = iocb->ki_filp;
415 struct inode *inode = file_inode(file);
437 count = zonefs_write_check_limits(file, iocb->ki_pos,
449 * sequentially from the end of the file. This code assumes that the block layer
673 static ssize_t zonefs_file_splice_read(struct file *in, loff_t *ppos,
715 struct file *file)
720 if (!(file->f_mode & FMODE_WRITE))
768 static int zonefs_file_open(struct inode *inode, struct file *file)
772 file->f_mode |= FMODE_CAN_ODIRECT;
773 ret = generic_file_open(inode, file);
777 if (zonefs_seq_file_need_wro(inode, file))
798 * The file zone may not be open anymore (e.g. the file was truncated to
834 static int zonefs_file_release(struct inode *inode, struct file *file)
842 if (zonefs_seq_file_need_wro(inode, file))