Home
last modified time | relevance | path

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

12345678910>>...13

/linux-6.1.9/fs/
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 > SSIZE_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 …]
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-6.1.9/fs/udf/
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()
133 ALIGN(inode->i_size, bsize) == ALIGN(iinfo->i_lenExtents, bsize)) in udf_discard_prealloc()
191 sector_t first_block = inode->i_size >> sb->s_blocksize_bits, offset; in udf_truncate_extents()
205 (inode->i_size & (sb->s_blocksize - 1)); in udf_truncate_extents()
268 iinfo->i_lenExtents = inode->i_size; in udf_truncate_extents()
/linux-6.1.9/fs/ubifs/
Ddir.c120 inode->i_size = ui->ui_size = UBIFS_INO_NODE_SZ; in ubifs_new_inode()
326 dir->i_size += sz_change; in ubifs_create()
327 dir_ui->ui_size = dir->i_size; in ubifs_create()
341 dir->i_size -= sz_change; in ubifs_create()
342 dir_ui->ui_size = dir->i_size; in ubifs_create()
774 dir->i_size += sz_change; in ubifs_link()
775 dir_ui->ui_size = dir->i_size; in ubifs_link()
788 dir->i_size -= sz_change; in ubifs_link()
789 dir_ui->ui_size = dir->i_size; in ubifs_link()
848 dir->i_size -= sz_change; in ubifs_unlink()
[all …]
Dfile.c107 loff_t i_size = i_size_read(inode); in do_readpage() local
110 inode->i_ino, page->index, i_size, page->flags); in do_readpage()
117 beyond = (i_size + UBIFS_BLOCK_SIZE - 1) >> UBIFS_BLOCK_SHIFT; in do_readpage()
147 int ilen = i_size & (UBIFS_BLOCK_SIZE - 1); in do_readpage()
224 int err, appending = !!(pos + len > inode->i_size); in write_begin_slow()
228 inode->i_ino, pos, len, inode->i_size); in write_begin_slow()
428 int err, appending = !!(pos + len > inode->i_size); in ubifs_write_begin()
432 ubifs_assert(c, ubifs_inode(inode)->ui_size == inode->i_size); in ubifs_write_begin()
543 int appending = !!(end_pos > inode->i_size); in ubifs_write_end()
546 inode->i_ino, pos, page->index, len, copied, inode->i_size); in ubifs_write_end()
[all …]
/linux-6.1.9/fs/afs/
Ddir_edit.c214 loff_t i_size; in afs_edit_dir_add() local
219 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_add()
220 if (i_size > AFS_DIR_BLOCK_SIZE * AFS_DIR_MAX_BLOCKS || 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->netfs.inode); in afs_edit_dir_remove()
[all …]
Dwrite.c18 loff_t i_size, bool caching);
130 loff_t i_size, write_end_pos; in afs_write_end() local
149 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end()
150 if (write_end_pos > i_size) { in afs_write_end()
152 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end()
153 if (write_end_pos > i_size) in afs_write_end()
387 op->store.i_size = max(pos + size, vnode->netfs.remote_i_size); in afs_store_data()
556 loff_t i_size = i_size_read(&vnode->netfs.inode); in afs_write_back_from_locked_folio() local
582 if (start < i_size) { in afs_write_back_from_locked_folio()
588 max_len = min_t(unsigned long long, max_len, i_size - start); in afs_write_back_from_locked_folio()
[all …]
/linux-6.1.9/fs/ntfs/
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()
70 if (unlikely(init_size > i_size)) { 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
216 i_size = i_size_read(vi); in ntfs_read_block()
218 if (unlikely(init_size > i_size)) { in ntfs_read_block()
220 init_size = i_size; in ntfs_read_block()
381 loff_t i_size; in ntfs_read_folio() local
394 i_size = i_size_read(vi); in ntfs_read_folio()
[all …]
/linux-6.1.9/fs/9p/
Dvfs_addr.c165 loff_t i_size = i_size_read(inode); in v9fs_vfs_write_folio_locked() local
170 if (start >= i_size) in v9fs_vfs_write_folio_locked()
173 len = min_t(loff_t, i_size - start, len); in v9fs_vfs_write_folio_locked()
190 folio_mapping(folio), start, len, i_size, in v9fs_vfs_write_folio_locked()
262 loff_t i_size = i_size_read(inode); in v9fs_direct_IO() local
264 if (pos + n > i_size) in v9fs_direct_IO()
265 inode_add_bytes(inode, pos + n - i_size); in v9fs_direct_IO()
321 if (last_pos > inode->i_size) { in v9fs_write_end()
322 inode_add_bytes(inode, last_pos - inode->i_size); in v9fs_write_end()
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-6.1.9/fs/jffs2/
Dfile.c145 if (pageofs > inode->i_size) { in jffs2_write_begin()
152 (unsigned int)inode->i_size, pageofs); in jffs2_write_begin()
172 ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs)); in jffs2_write_begin()
174 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin()
175 ri.dsize = cpu_to_je32(pageofs - inode->i_size); in jffs2_write_begin()
205 inode->i_size = pageofs; in jffs2_write_begin()
295 ri->isize = cpu_to_je32((uint32_t)inode->i_size); in jffs2_write_end()
317 if (inode->i_size < pos + writtenlen) { in jffs2_write_end()
318 inode->i_size = pos + writtenlen; in jffs2_write_end()
319 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_write_end()
Dfs.c115 ri->isize = cpu_to_je32((ivalid & ATTR_SIZE)?iattr->ia_size:inode->i_size); in jffs2_do_setattr()
123 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()
185 if (ivalid & ATTR_SIZE && inode->i_size > iattr->ia_size) { in jffs2_do_setattr()
187 inode->i_blocks = (inode->i_size + 511) >> 9; in jffs2_do_setattr()
[all …]
/linux-6.1.9/fs/erofs/
Dinode.c114 inode->i_size = le64_to_cpu(die->i_size); in erofs_read_inode()
157 inode->i_size = le32_to_cpu(dic->i_size); in erofs_read_inode()
193 inode->i_blocks = roundup(inode->i_size, EROFS_BLKSIZ) >> 9; in erofs_read_inode()
217 inode->i_size >= EROFS_BLKSIZ || inode->i_size < 0) { in erofs_fill_symlink()
222 lnk = kmalloc(inode->i_size + 1, GFP_KERNEL); in erofs_fill_symlink()
228 if (m_pofs + inode->i_size > EROFS_BLKSIZ) { in erofs_fill_symlink()
236 memcpy(lnk, kaddr + m_pofs, inode->i_size); in erofs_fill_symlink()
237 lnk[inode->i_size] = '\0'; in erofs_fill_symlink()
/linux-6.1.9/security/integrity/ima/
Dima_crypto.c333 loff_t i_size, offset; in ima_calc_file_hash_atfm() local
356 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_atfm()
358 if (i_size == 0) in ima_calc_file_hash_atfm()
365 rbuf[0] = ima_alloc_pages(i_size, &rbuf_size[0], 1); in ima_calc_file_hash_atfm()
372 if (i_size > rbuf_size[0]) { in ima_calc_file_hash_atfm()
378 rbuf[1] = ima_alloc_pages(i_size - rbuf_size[0], in ima_calc_file_hash_atfm()
382 for (offset = 0; offset < i_size; offset += rbuf_len) { in ima_calc_file_hash_atfm()
393 rbuf_len = min_t(loff_t, i_size - offset, rbuf_size[active]); in ima_calc_file_hash_atfm()
460 loff_t i_size, offset = 0; in ima_calc_file_hash_tfm() local
473 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_tfm()
[all …]
/linux-6.1.9/fs/hpfs/
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-6.1.9/fs/ceph/
Dcache.c58 loff_t i_size = i_size_read(inode); in ceph_fscache_unuse_cookie() local
61 &ci->i_version, &i_size); in ceph_fscache_unuse_cookie()
70 loff_t i_size = i_size_read(inode); in ceph_fscache_update() local
72 fscache_update_cookie(ceph_fscache_cookie(ci), &ci->i_version, &i_size); in ceph_fscache_update()
/linux-6.1.9/fs/jfs/
Dinode.c49 if (inode->i_size >= IDATASIZE) { in jfs_iget()
60 inode->i_link[inode->i_size] = '\0'; in jfs_iget()
217 if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && in jfs_get_block()
292 if (to > inode->i_size) { in jfs_write_failed()
293 truncate_pagecache(inode, inode->i_size); in jfs_write_failed()
412 jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); in jfs_truncate()
414 block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); in jfs_truncate()
417 jfs_truncate_nolock(ip, ip->i_size); in jfs_truncate()
/linux-6.1.9/fs/netfs/
Dbuffered_read.c104 loff_t *_start, size_t *_len, loff_t i_size) in netfs_cache_expand_readahead() argument
109 cres->ops->expand_readahead(cres, _start, _len, i_size); in netfs_cache_expand_readahead()
118 netfs_cache_expand_readahead(rreq, &rreq->start, &rreq->len, rreq->i_size); in netfs_rreq_expand()
274 loff_t i_size = i_size_read(inode); in netfs_skip_folio_read() local
279 if (pos - offset + len <= i_size) in netfs_skip_folio_read()
291 if (pos - offset >= i_size) in netfs_skip_folio_read()
295 if (offset == 0 && (pos + len) >= i_size) in netfs_skip_folio_read()
/linux-6.1.9/fs/squashfs/
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-6.1.9/fs/ntfs3/
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-6.1.9/fs/affs/
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()
619 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
623 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
637 if (((page->index + 1) << PAGE_SHIFT) > inode->i_size) { in affs_read_folio_ofs()
638 to = inode->i_size & ~PAGE_MASK; in affs_read_folio_ofs()
812 if (tmp > inode->i_size) in affs_write_end_ofs()
813 inode->i_size = AFFS_I(inode)->mmu_private = tmp; in affs_write_end_ofs()
871 inode->i_ino, AFFS_I(inode)->mmu_private, inode->i_size); in affs_truncate()
[all …]
/linux-6.1.9/fs/adfs/
Dinode.c50 if (to > inode->i_size) in adfs_write_failed()
51 truncate_pagecache(inode, inode->i_size); in adfs_write_failed()
253 inode->i_size = obj->size; in adfs_iget()
255 inode->i_blocks = (inode->i_size + sb->s_blocksize - 1) >> in adfs_iget()
282 ADFS_I(inode)->mmu_private = inode->i_size; in adfs_iget()
366 obj.size = inode->i_size; in adfs_write_inode()
/linux-6.1.9/fs/iomap/
Ddirect-io.c31 loff_t i_size; member
94 if (offset + ret > dio->i_size && in iomap_dio_complete()
96 ret = dio->i_size - offset; in iomap_dio_complete()
412 loff_t size = iomi->inode->i_size; in iomap_dio_inline_iter()
513 dio->i_size = i_size_read(inode); in __iomap_dio_rw()
524 if (iomi.pos >= dio->i_size) in __iomap_dio_rw()
567 if (iomi.pos >= dio->i_size || in __iomap_dio_rw()
568 iomi.pos + iomi.len > dio->i_size) in __iomap_dio_rw()
617 if (iov_iter_rw(iter) == READ && iomi.pos >= dio->i_size) in __iomap_dio_rw()
618 iov_iter_revert(iter, iomi.pos - dio->i_size); in __iomap_dio_rw()
/linux-6.1.9/fs/isofs/
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-6.1.9/fs/reiserfs/
Dinode.c406 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) in _get_block_create_0()
408 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) { in _get_block_create_0()
410 inode->i_size - (le_ih_k_offset(ih) - 1) - in _get_block_create_0()
715 && inode->i_size < i_block_size(inode) * 4) in reiserfs_get_block()
717 && inode->i_size < i_block_size(inode))) in reiserfs_get_block()
722 if ((new_offset + inode->i_sb->s_blocksize - 1) > inode->i_size) { in reiserfs_get_block()
1089 inode->i_size += in reiserfs_get_block()
1183 ((inode->i_size + in real_space_diff()
1193 return inode->i_size + in to_real_used_space()
1259 inode->i_size = sd_v1_size(sd); in init_inode()
[all …]

12345678910>>...13