Lines Matching refs:file

318 		 * around to the start of the file.
669 * that would be a good hint to the block allocator for this file.
781 * delete it, otherwise we would insert a new file extent item
782 * with the same key (offset) as that 0 bytes length file
1563 struct file *file = iocb->ki_filp;
1565 struct inode *inode = file_inode(file);
1802 struct file *file = iocb->ki_filp;
1803 struct inode *inode = file_inode(file);
1834 invalidate_mapping_pages(file->f_mapping, pos >> PAGE_SHIFT,
1861 struct file *file = iocb->ki_filp;
1862 struct inode *inode = file_inode(file);
1917 err = file_remove_privs(file);
1926 * although we have opened a file as writable, we have
2019 int btrfs_release_file(struct inode *inode, struct file *filp)
2029 * Set by setattr when we are about to truncate a file from a non-zero
2032 * a file in place.
2095 int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
2097 struct dentry *dentry = file_dentry(file);
2106 trace_btrfs_sync_file(file, datasync);
2112 * several problems, from missing file extent items to represent holes
2163 * Therefore after the log replay we will have a file extent item
2221 ret = filemap_check_wb_err(inode->i_mapping, file->f_wb_err);
2250 * version of the file in the log. It is possible that
2251 * someone will come in and modify the file, but that's
2253 * have references to all of the file's extents
2256 * file again, but that will end up using the synchronization
2283 err = file_check_and_advance_wb_err(file);
2301 static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma)
2601 * the file range with an extent.
2699 * file extent is inserted here.
2779 * ends at (or beyond) lockend. Since we have no file extent items to
2790 * Don't insert file hole extent item if it's for a range beyond eof
2836 static int btrfs_punch_hole(struct file *file, loff_t offset, loff_t len)
2838 struct inode *inode = file_inode(file);
2870 ret = file_modified(file);
2880 * We needn't truncate any block which is beyond the end of the file
3279 static long btrfs_fallocate(struct file *file, int mode,
3282 struct inode *inode = file_inode(file);
3309 return btrfs_punch_hole(file, offset, len);
3331 ret = file_modified(file);
3349 * If we are fallocating from the end of the file onward we
3472 * size of the file so we need to update i_size and the inode item.
3506 * the very start of the file.
3557 static loff_t btrfs_file_llseek(struct file *file, loff_t offset, int whence)
3559 struct inode *inode = file->f_mapping->host;
3563 return generic_file_llseek(file, offset, whence);
3575 return vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
3578 static int btrfs_file_open(struct inode *inode, struct file *filp)