Lines Matching defs:file

1460 	/* End of file and Attributes should not have to be updated on close */
1933 /* if file already sparse don't bother setting sparse again */
1945 * in the file attributes. If we fail setting sparse though we
1948 * if the file is repeatedly extended.
1977 * If extending file more than one page make sparse. Many Linux fs
1985 /* whether set sparse succeeds or not, extend the file */
2026 * here in addition to setting the file size, in reflink
2027 * it is likely that the target file is sparse. Its allocation
2029 * to make sure that file's cached size is updated immediately
2171 smb3_notify(const unsigned int xid, struct file *pfile,
3061 * When querying an ACL, even if the file is a symlink
3170 static long smb3_zero_data(struct file *file, struct cifs_tcon *tcon,
3173 struct cifsFileInfo *cfile = file->private_data;
3188 static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
3192 struct inode *inode = file_inode(file);
3194 struct cifsFileInfo *cfile = file->private_data;
3213 /* if file not oplocked can't be sure whether asking to extend size */
3218 rc = smb3_zero_data(file, tcon, offset, len, xid);
3223 * do we also need to change the size of the file?
3251 static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
3254 struct inode *inode = file_inode(file);
3255 struct cifsFileInfo *cfile = file->private_data;
3264 /* Need to make file sparse, if not already, before freeing range. */
3416 static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon,
3421 struct cifsFileInfo *cfile = file->private_data;
3433 /* if file not oplocked can't be sure whether asking to extend size */
3443 * Extending the file
3467 * Must check if file sparse. If not sparse, and since we are not
3468 * extending then no need to do anything since file already allocated
3477 * We can not preallocate pages beyond the end of the file
3485 * For fallocates that are partially beyond the end of file,
3486 * clamp len so we only fallocate up to the end of file.
3496 * regions of a sparse file. Since smb2 does not have a
3498 * We can either turn the entire file to become non-sparse
3500 * the whole file, or we can overwrite the region with zeroes
3515 * Check if falloc starts within first few pages of file
3516 * and ends within a few pages of the end of file to
3517 * ensure that most of file is being forced to be
3518 * fallocated now. If so then setting whole file sparse
3520 * or end of the file non-sparse via set_sparse is harmless.
3543 static long smb3_collapse_range(struct file *file, struct cifs_tcon *tcon,
3548 struct inode *inode = file_inode(file);
3550 struct cifsFileInfo *cfile = file->private_data;
3598 static long smb3_insert_range(struct file *file, struct cifs_tcon *tcon,
3603 struct cifsFileInfo *cfile = file->private_data;
3604 struct inode *inode = file_inode(file);
3640 rc = smb3_zero_data(file, tcon, off, len, xid);
3653 static loff_t smb3_llseek(struct file *file, struct cifs_tcon *tcon, loff_t offset, int whence)
3655 struct cifsFileInfo *wrcfile, *cfile = file->private_data;
3664 return generic_file_llseek(file, offset, whence);
3732 return vfs_setpos(file, offset, inode->i_sb->s_maxbytes);
3812 static long smb3_fallocate(struct file *file, struct cifs_tcon *tcon, int mode,
3817 return smb3_punch_hole(file, tcon, off, len);
3820 return smb3_zero_range(file, tcon, off, len, true);
3821 return smb3_zero_range(file, tcon, off, len, false);
3823 return smb3_simple_falloc(file, tcon, off, len, true);
3825 return smb3_collapse_range(file, tcon, off, len);
3827 return smb3_insert_range(file, tcon, off, len);
3829 return smb3_simple_falloc(file, tcon, off, len, false);