Home
last modified time | relevance | path

Searched refs:i_size (Results 1 – 25 of 313) sorted by relevance

12345678910>>...13

/linux/fs/
A Dkernel_read_file.c39 loff_t i_size, pos; in kernel_read_file() local
55 i_size = i_size_read(file_inode(file)); in kernel_read_file()
56 if (i_size <= 0) { in kernel_read_file()
61 if (i_size > INT_MAX) { in kernel_read_file()
66 if (!file_size && offset == 0 && i_size > buf_size) { in kernel_read_file()
71 whole_file = (offset == 0 && i_size <= buf_size); in kernel_read_file()
77 *file_size = i_size; in kernel_read_file()
80 *buf = allocated = vmalloc(i_size); in kernel_read_file()
91 i_size - pos); in kernel_read_file()
105 if (pos != i_size) { in kernel_read_file()
[all …]
A Dstack.c13 loff_t i_size; in fsstack_copy_inode_size() local
22 i_size = i_size_read(src); in fsstack_copy_inode_size()
53 if (sizeof(i_size) > sizeof(long) || sizeof(i_blocks) > sizeof(long)) in fsstack_copy_inode_size()
55 i_size_write(dst, i_size); in fsstack_copy_inode_size()
57 if (sizeof(i_size) > sizeof(long) || sizeof(i_blocks) > sizeof(long)) in fsstack_copy_inode_size()
/linux/fs/ubifs/
A Ddir.c323 dir->i_size += sz_change; in ubifs_create()
338 dir->i_size -= sz_change; in ubifs_create()
737 dir->i_size += sz_change; in ubifs_link()
751 dir->i_size -= sz_change; in ubifs_link()
811 dir->i_size -= sz_change; in ubifs_unlink()
830 dir->i_size += sz_change; in ubifs_unlink()
914 dir->i_size -= sz_change; in ubifs_rmdir()
933 dir->i_size += sz_change; in ubifs_rmdir()
987 dir->i_size += sz_change; in ubifs_mkdir()
1003 dir->i_size -= sz_change; in ubifs_mkdir()
[all …]
A Dfile.c107 loff_t i_size = i_size_read(inode); in do_readpage() local
229 inode->i_ino, pos, len, inode->i_size); in write_begin_slow()
611 loff_t i_size = i_size_read(inode); in populate_page() local
621 end_index = (i_size - 1) >> PAGE_SHIFT; in populate_page()
622 if (!i_size || page->index > end_index) { in populate_page()
680 int len = i_size & (PAGE_SIZE - 1); in populate_page()
1011 pgoff_t end_index = i_size >> PAGE_SHIFT; in ubifs_writepage()
1012 int err, len = i_size & (PAGE_SIZE - 1); in ubifs_writepage()
1059 if (i_size > synced_i_size) { in ubifs_writepage()
1186 ui->ui_size = inode->i_size; in do_truncation()
[all …]
/linux/fs/udf/
A Dtruncate.c78 inode->i_size == iinfo->i_lenExtents) in udf_truncate_tail_extent()
95 if (lbcount > inode->i_size) { in udf_truncate_tail_extent()
96 if (lbcount - inode->i_size >= inode->i_sb->s_blocksize) in udf_truncate_tail_extent()
100 (long long)inode->i_size, in udf_truncate_tail_extent()
104 nelen = elen - (lbcount - inode->i_size); in udf_truncate_tail_extent()
117 iinfo->i_lenExtents = inode->i_size; in udf_truncate_tail_extent()
132 inode->i_size == iinfo->i_lenExtents) in udf_discard_prealloc()
209 sector_t first_block = inode->i_size >> sb->s_blocksize_bits, offset; in udf_truncate_extents()
223 (inode->i_size & (sb->s_blocksize - 1)); in udf_truncate_extents()
286 iinfo->i_lenExtents = inode->i_size; in udf_truncate_extents()
/linux/fs/ntfs/
A Daops.c59 loff_t i_size; in ntfs_end_buffer_async_read() local
68 i_size = i_size_read(vi); in ntfs_end_buffer_async_read()
72 init_size = i_size; in ntfs_end_buffer_async_read()
166 loff_t i_size; in ntfs_read_block() local
220 init_size = i_size; in ntfs_read_block()
380 loff_t i_size; in ntfs_readpage() local
484 attr_len = i_size; in ntfs_readpage()
535 loff_t i_size; in ntfs_write_block() local
1338 loff_t i_size; in ntfs_writepage() local
1470 attr_len = i_size; in ntfs_writepage()
[all …]
/linux/fs/afs/
A Ddir_edit.c214 loff_t i_size; in afs_edit_dir_add() local
219 i_size = i_size_read(&vnode->vfs_inode); in afs_edit_dir_add()
221 (i_size & (AFS_DIR_BLOCK_SIZE - 1))) { in afs_edit_dir_add()
236 if (i_size == 0) in afs_edit_dir_add()
238 nr_blocks = i_size / AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add()
306 i_size = AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add()
307 afs_set_i_size(vnode, i_size); in afs_edit_dir_add()
381 loff_t i_size; in afs_edit_dir_remove() local
386 i_size = i_size_read(&vnode->vfs_inode); in afs_edit_dir_remove()
387 if (i_size < AFS_DIR_BLOCK_SIZE || in afs_edit_dir_remove()
[all …]
A Dwrite.c117 loff_t i_size, maybe_i_size; in afs_write_end() local
136 i_size = i_size_read(&vnode->vfs_inode); in afs_write_end()
137 if (maybe_i_size > i_size) { in afs_write_end()
139 i_size = i_size_read(&vnode->vfs_inode); in afs_write_end()
140 if (maybe_i_size > i_size) in afs_write_end()
345 loff_t size = iov_iter_count(iter), i_size; in afs_store_data() local
367 i_size = i_size_read(&vnode->vfs_inode); in afs_store_data()
375 op->store.i_size = max(pos + size, i_size); in afs_store_data()
540 loff_t i_size = i_size_read(&vnode->vfs_inode); in afs_write_back_from_locked_folio() local
564 if (start < i_size) { in afs_write_back_from_locked_folio()
[all …]
/linux/fs/9p/
A Dvfs_addr.c169 loff_t i_size = i_size_read(inode); in v9fs_vfs_write_folio_locked() local
174 if (start >= i_size) in v9fs_vfs_write_folio_locked()
177 len = min_t(loff_t, i_size - start, len); in v9fs_vfs_write_folio_locked()
263 loff_t i_size = i_size_read(inode); in v9fs_direct_IO() local
265 if (pos + n > i_size) in v9fs_direct_IO()
266 inode_add_bytes(inode, pos + n - i_size); in v9fs_direct_IO()
322 if (last_pos > inode->i_size) { in v9fs_write_end()
323 inode_add_bytes(inode, last_pos - inode->i_size); in v9fs_write_end()
A Dv9fs_vfs.h79 static inline void v9fs_i_size_write(struct inode *inode, loff_t i_size) in v9fs_i_size_write() argument
86 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write()
88 i_size_write(inode, i_size); in v9fs_i_size_write()
89 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write()
/linux/fs/jffs2/
A Dfile.c150 if (pageofs > inode->i_size) { in jffs2_write_begin()
158 (unsigned int)inode->i_size, pageofs); in jffs2_write_begin()
178 ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs)); in jffs2_write_begin()
180 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin()
181 ri.dsize = cpu_to_je32(pageofs - inode->i_size); in jffs2_write_begin()
211 inode->i_size = pageofs; in jffs2_write_begin()
286 ri->isize = cpu_to_je32((uint32_t)inode->i_size); in jffs2_write_end()
308 if (inode->i_size < pos + writtenlen) { in jffs2_write_end()
309 inode->i_size = pos + writtenlen; in jffs2_write_end()
310 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_write_end()
A Dfs.c123 if (ivalid & ATTR_SIZE && inode->i_size < iattr->ia_size) { in jffs2_do_setattr()
126 ri->dsize = cpu_to_je32(iattr->ia_size - inode->i_size); in jffs2_do_setattr()
127 ri->offset = cpu_to_je32(inode->i_size); in jffs2_do_setattr()
160 if (ivalid & ATTR_SIZE && inode->i_size > iattr->ia_size) in jffs2_do_setattr()
163 if (ivalid & ATTR_SIZE && inode->i_size < iattr->ia_size) { in jffs2_do_setattr()
165 inode->i_size = iattr->ia_size; in jffs2_do_setattr()
166 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_do_setattr()
187 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_do_setattr()
284 inode->i_size = je32_to_cpu(latest_node.isize); in jffs2_iget()
291 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_iget()
[all …]
/linux/security/integrity/ima/
A Dima_crypto.c332 loff_t i_size, offset; in ima_calc_file_hash_atfm() local
355 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_atfm()
357 if (i_size == 0) in ima_calc_file_hash_atfm()
371 if (i_size > rbuf_size[0]) { in ima_calc_file_hash_atfm()
377 rbuf[1] = ima_alloc_pages(i_size - rbuf_size[0], in ima_calc_file_hash_atfm()
459 loff_t i_size, offset = 0; in ima_calc_file_hash_tfm() local
472 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_tfm()
474 if (i_size == 0) in ima_calc_file_hash_tfm()
481 while (offset < i_size) { in ima_calc_file_hash_tfm()
537 loff_t i_size; in ima_calc_file_hash() local
[all …]
/linux/fs/hpfs/
A Dinode.c22 i->i_size = -1; in hpfs_init_inode()
84 i->i_size = ea_size; in hpfs_read_inode()
108 i->i_size = 0; in hpfs_read_inode()
130 i->i_size = 2048 * n_dnodes; in hpfs_read_inode()
138 i->i_size = le32_to_cpu(fnode->file_size); in hpfs_read_inode()
139 i->i_blocks = ((i->i_size + 511) >> 9) + 1; in hpfs_read_inode()
141 hpfs_i(i)->mmu_private = i->i_size; in hpfs_read_inode()
225 fnode->file_size = cpu_to_le32(i->i_size); in hpfs_write_inode_nolock()
226 if (de) de->file_size = cpu_to_le32(i->i_size); in hpfs_write_inode_nolock()
275 if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) in hpfs_setattr()
/linux/fs/erofs/
A Dinode.c121 inode->i_size = le64_to_cpu(die->i_size); in erofs_read_inode()
164 inode->i_size = le32_to_cpu(dic->i_size); in erofs_read_inode()
200 inode->i_blocks = roundup(inode->i_size, EROFS_BLKSIZ) >> 9; in erofs_read_inode()
225 inode->i_size >= PAGE_SIZE) { in erofs_fill_symlink()
230 lnk = kmalloc(inode->i_size + 1, GFP_KERNEL); in erofs_fill_symlink()
236 if (m_pofs + inode->i_size > PAGE_SIZE) { in erofs_fill_symlink()
245 memcpy(lnk, data + m_pofs, inode->i_size); in erofs_fill_symlink()
246 lnk[inode->i_size] = '\0'; in erofs_fill_symlink()
/linux/fs/jfs/
A Dinode.c49 if (inode->i_size >= IDATASIZE) { in jfs_iget()
60 inode->i_link[inode->i_size] = '\0'; in jfs_iget()
216 if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && in jfs_get_block()
309 if (to > inode->i_size) { in jfs_write_failed()
310 truncate_pagecache(inode, inode->i_size); in jfs_write_failed()
417 jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); in jfs_truncate()
419 nobh_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); in jfs_truncate()
422 jfs_truncate_nolock(ip, ip->i_size); in jfs_truncate()
/linux/fs/squashfs/
A Dinode.c66 inode->i_size = 0; in squashfs_new_inode()
155 inode->i_size = le32_to_cpu(sqsh_ino->file_size); in squashfs_read_inode()
158 inode->i_blocks = ((inode->i_size - 1) >> 9) + 1; in squashfs_read_inode()
199 inode->i_size = le64_to_cpu(sqsh_ino->file_size); in squashfs_read_inode()
203 inode->i_blocks = (inode->i_size - in squashfs_read_inode()
228 inode->i_size = le16_to_cpu(sqsh_ino->file_size); in squashfs_read_inode()
253 inode->i_size = le32_to_cpu(sqsh_ino->file_size); in squashfs_read_inode()
280 inode->i_size = le32_to_cpu(sqsh_ino->symlink_size); in squashfs_read_inode()
292 &offset, inode->i_size); in squashfs_read_inode()
/linux/fs/affs/
A Dfile.c39 if (inode->i_size != AFFS_I(inode)->mmu_private) in affs_file_release()
387 if (to > inode->i_size) { in affs_write_failed()
388 truncate_pagecache(inode, inode->i_size); in affs_write_failed()
640 to = inode->i_size & ~PAGE_MASK; in affs_readpage_ofs()
814 if (tmp > inode->i_size) in affs_write_end_ofs()
876 if (inode->i_size) { in affs_truncate()
885 loff_t isize = inode->i_size; in affs_truncate()
892 inode->i_size = AFFS_I(inode)->mmu_private; in affs_truncate()
924 if (inode->i_size) { in affs_truncate()
942 if (inode->i_size) { in affs_truncate()
[all …]
/linux/fs/ntfs3/
A Ddir.c376 loff_t i_size = i_size_read(dir); in ntfs_readdir() local
385 eod = i_size + sbi->record_size; in ntfs_readdir()
430 if (!i_size) { in ntfs_readdir()
437 if (vbo >= i_size) { in ntfs_readdir()
452 if (vbo >= i_size) { in ntfs_readdir()
496 loff_t i_size = ni->vfs_inode.i_size; in ntfs_dir_count() local
542 if (vbo >= i_size) in ntfs_dir_count()
553 if (vbo >= i_size) in ntfs_dir_count()
/linux/fs/reiserfs/
A Dinode.c1097 inode->i_size += in reiserfs_get_block()
1191 ((inode->i_size + in real_space_diff()
1201 return inode->i_size + in to_real_used_space()
1998 inode->i_size = i_size; in reiserfs_new_inode()
2082 i_size = ROUND_UP(i_size); in reiserfs_new_inode()
2085 i_size); in reiserfs_new_inode()
2276 if (inode->i_size > 0) { in reiserfs_truncate_file()
2944 inode->i_size = pos + copied; in reiserfs_write_end()
2975 if (pos + len > inode->i_size) in reiserfs_write_end()
3015 if (pos > inode->i_size) { in reiserfs_commit_write()
[all …]
/linux/fs/netfs/
A Dread_helper.c52 rreq->i_size = i_size_read(rreq->inode); in netfs_alloc_read_request()
326 rreq->i_size); in netfs_rreq_do_write_to_cache()
694 loff_t i_size) in netfs_cache_prepare_read() argument
700 return cres->ops->prepare_read(subreq, i_size); in netfs_cache_prepare_read()
701 if (subreq->start >= rreq->i_size) in netfs_cache_prepare_read()
728 if (subreq->len > rreq->i_size - subreq->start) in netfs_rreq_prepare_read()
729 subreq->len = rreq->i_size - subreq->start; in netfs_rreq_prepare_read()
807 loff_t *_start, size_t *_len, loff_t i_size) in netfs_cache_expand_readahead() argument
1023 loff_t i_size = i_size_read(inode); in netfs_skip_folio_read() local
1031 if (pos - offset >= i_size) in netfs_skip_folio_read()
[all …]
/linux/fs/isofs/
A Drock.c455 inode->i_size = symlink_len; in parse_rock_ridge_inode_internal()
460 inode->i_size += in parse_rock_ridge_inode_internal()
464 inode->i_size += 1; in parse_rock_ridge_inode_internal()
467 inode->i_size += 2; in parse_rock_ridge_inode_internal()
471 inode->i_size += 1; in parse_rock_ridge_inode_internal()
488 inode->i_size += in parse_rock_ridge_inode_internal()
499 inode->i_size += 1; in parse_rock_ridge_inode_internal()
502 symlink_len = inode->i_size; in parse_rock_ridge_inode_internal()
534 inode->i_size = reloc->i_size; in parse_rock_ridge_inode_internal()
572 inode->i_size = in parse_rock_ridge_inode_internal()
/linux/fs/iomap/
A Ddirect-io.c29 loff_t i_size; member
82 if (offset + ret > dio->i_size && in iomap_dio_complete()
84 ret = dio->i_size - offset; in iomap_dio_complete()
401 loff_t size = iomi->inode->i_size; in iomap_dio_inline_iter()
501 dio->i_size = i_size_read(inode); in __iomap_dio_rw()
512 if (iomi.pos >= dio->i_size) in __iomap_dio_rw()
554 if (iomi.pos >= dio->i_size || in __iomap_dio_rw()
555 iomi.pos + iomi.len > dio->i_size) in __iomap_dio_rw()
604 if (iov_iter_rw(iter) == READ && iomi.pos >= dio->i_size) in __iomap_dio_rw()
605 iov_iter_revert(iter, iomi.pos - dio->i_size); in __iomap_dio_rw()
/linux/fs/adfs/
A Dinode.c50 if (to > inode->i_size) in adfs_write_failed()
51 truncate_pagecache(inode, inode->i_size); in adfs_write_failed()
252 inode->i_size = obj->size; in adfs_iget()
254 inode->i_blocks = (inode->i_size + sb->s_blocksize - 1) >> in adfs_iget()
281 ADFS_I(inode)->mmu_private = inode->i_size; in adfs_iget()
366 obj.size = inode->i_size; in adfs_write_inode()
/linux/include/linux/
A Dnetfs.h167 loff_t i_size; /* Size of the file */ member
223 loff_t *_start, size_t *_len, loff_t i_size);
229 loff_t i_size);
235 loff_t *_start, size_t *_len, loff_t i_size);

Completed in 47 milliseconds

12345678910>>...13