Lines Matching defs:offset
47 * @offset: the offset
53 * Returns: The new offset, or errno
56 static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence)
67 error = generic_file_llseek(file, offset, whence);
73 error = gfs2_seek_data(file, offset);
77 error = gfs2_seek_hole(file, offset);
86 error = generic_file_llseek(file, offset, whence);
386 * @offset: The file offset of the write
395 static void gfs2_size_hint(struct file *filep, loff_t offset, size_t size)
452 u64 offset = page_offset(page);
468 if (offset >= size) {
477 if (size - offset < PAGE_SIZE)
478 length = size - offset;
482 gfs2_size_hint(vmf->vma->vm_file, offset, length);
493 !gfs2_write_alloc_required(ip, offset, length)) {
817 loff_t offset = iocb->ki_pos;
834 if (offset + len > i_size_read(&ip->i_inode))
897 * offset. There is still a race, but provided the app is using its
979 static int fallocate_chunk(struct inode *inode, loff_t offset, loff_t len,
984 loff_t end = offset + len;
1000 while (offset < end) {
1003 error = gfs2_iomap_get_alloc(inode, offset, end - offset,
1007 offset = iomap.offset + iomap.length;
1056 static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
1065 const loff_t pos = offset;
1068 loff_t next = (offset + len - 1) >> sdp->sd_sb.sb_bsize_shift;
1073 offset &= bsize_mask;
1075 len = next - offset;
1083 gfs2_size_hint(file, offset, len);
1091 if (!gfs2_write_alloc_required(ip, offset, bytes)) {
1093 offset += bytes;
1143 error = fallocate_chunk(inode, offset, max_bytes, mode);
1150 offset += max_bytes;
1172 static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
1194 (offset + len) > inode->i_size) {
1195 ret = inode_newsize_ok(inode, offset + len);
1205 ret = __gfs2_punch_hole(file, offset, len);
1207 ret = __gfs2_fallocate(file, mode, offset, len);