Home
last modified time | relevance | path

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

12345678910>>...14

/linux-6.6.21/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.6.21/fs/udf/
Dtruncate.c74 inode->i_size == iinfo->i_lenExtents) in udf_truncate_tail_extent()
91 if (lbcount > inode->i_size) { in udf_truncate_tail_extent()
92 if (lbcount - inode->i_size >= inode->i_sb->s_blocksize) in udf_truncate_tail_extent()
96 (long long)inode->i_size, in udf_truncate_tail_extent()
100 nelen = elen - (lbcount - inode->i_size); in udf_truncate_tail_extent()
113 iinfo->i_lenExtents = inode->i_size; in udf_truncate_tail_extent()
129 ALIGN(inode->i_size, bsize) == ALIGN(iinfo->i_lenExtents, bsize)) in udf_discard_prealloc()
187 sector_t first_block = inode->i_size >> sb->s_blocksize_bits, offset; in udf_truncate_extents()
201 (inode->i_size & (sb->s_blocksize - 1)); in udf_truncate_extents()
264 iinfo->i_lenExtents = inode->i_size; in udf_truncate_extents()
/linux-6.6.21/fs/ubifs/
Ddir.c119 inode->i_size = ui->ui_size = UBIFS_INO_NODE_SZ; in ubifs_new_inode()
325 dir->i_size += sz_change; in ubifs_create()
326 dir_ui->ui_size = dir->i_size; in ubifs_create()
340 dir->i_size -= sz_change; in ubifs_create()
341 dir_ui->ui_size = dir->i_size; in ubifs_create()
768 dir->i_size += sz_change; in ubifs_link()
769 dir_ui->ui_size = dir->i_size; in ubifs_link()
782 dir->i_size -= sz_change; in ubifs_link()
783 dir_ui->ui_size = dir->i_size; in ubifs_link()
842 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.6.21/fs/afs/
Ddir_edit.c215 loff_t i_size; in afs_edit_dir_add() local
220 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_add()
221 if (i_size > AFS_DIR_BLOCK_SIZE * AFS_DIR_MAX_BLOCKS || in afs_edit_dir_add()
222 (i_size & (AFS_DIR_BLOCK_SIZE - 1))) { in afs_edit_dir_add()
237 if (i_size == 0) in afs_edit_dir_add()
239 nr_blocks = i_size / AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add()
307 i_size = AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add()
308 afs_set_i_size(vnode, i_size); in afs_edit_dir_add()
382 loff_t i_size; in afs_edit_dir_remove() local
387 i_size = i_size_read(&vnode->netfs.inode); in afs_edit_dir_remove()
[all …]
Dwrite.c23 loff_t i_size, bool caching);
162 loff_t i_size, write_end_pos; in afs_write_end() local
181 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end()
182 if (write_end_pos > i_size) { in afs_write_end()
184 i_size = i_size_read(&vnode->netfs.inode); in afs_write_end()
185 if (write_end_pos > i_size) in afs_write_end()
426 op->store.i_size = max(pos + size, vnode->netfs.remote_i_size); in afs_store_data()
590 loff_t i_size = i_size_read(&vnode->netfs.inode); in afs_write_back_from_locked_folio() local
616 if (start < i_size) { in afs_write_back_from_locked_folio()
622 max_len = min_t(unsigned long long, max_len, i_size - start); in afs_write_back_from_locked_folio()
[all …]
/linux-6.6.21/fs/9p/
Dvfs_addr.c156 loff_t i_size = i_size_read(inode); in v9fs_vfs_write_folio_locked() local
164 if (start >= i_size) in v9fs_vfs_write_folio_locked()
167 len = min_t(loff_t, i_size - start, len); in v9fs_vfs_write_folio_locked()
189 folio_mapping(folio), start, len, i_size, in v9fs_vfs_write_folio_locked()
264 loff_t i_size = i_size_read(inode); in v9fs_direct_IO() local
266 if (pos + n > i_size) in v9fs_direct_IO()
267 inode_add_bytes(inode, pos + n - i_size); in v9fs_direct_IO()
320 if (last_pos > inode->i_size) { in v9fs_write_end()
321 inode_add_bytes(inode, last_pos - inode->i_size); in v9fs_write_end()
Dv9fs_vfs.h76 static inline void v9fs_i_size_write(struct inode *inode, loff_t i_size) in v9fs_i_size_write() argument
83 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write()
85 i_size_write(inode, i_size); in v9fs_i_size_write()
86 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write()
/linux-6.6.21/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.6.21/fs/erofs/
Dinode.c111 inode->i_size = le64_to_cpu(die->i_size); in erofs_read_inode()
153 inode->i_size = le32_to_cpu(dic->i_size); in erofs_read_inode()
188 inode->i_blocks = round_up(inode->i_size, sb->s_blocksize) >> 9; in erofs_read_inode()
213 inode->i_size >= bsz || inode->i_size < 0) { in erofs_fill_symlink()
218 lnk = kmalloc(inode->i_size + 1, GFP_KERNEL); in erofs_fill_symlink()
224 if (m_pofs + inode->i_size > bsz) { in erofs_fill_symlink()
232 memcpy(lnk, kaddr + m_pofs, inode->i_size); in erofs_fill_symlink()
233 lnk[inode->i_size] = '\0'; in erofs_fill_symlink()
/linux-6.6.21/fs/jffs2/
Dfile.c144 if (pos > inode->i_size) { in jffs2_write_begin()
151 (unsigned int)inode->i_size, (uint32_t)pos); in jffs2_write_begin()
173 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin()
174 ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size); in jffs2_write_begin()
204 inode->i_size = pos; in jffs2_write_begin()
294 ri->isize = cpu_to_je32((uint32_t)inode->i_size); in jffs2_write_end()
316 if (inode->i_size < pos + writtenlen) { in jffs2_write_end()
317 inode->i_size = pos + writtenlen; in jffs2_write_end()
318 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.6.21/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.6.21/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.6.21/fs/ceph/
Dcache.c60 loff_t i_size = i_size_read(inode); in ceph_fscache_unuse_cookie() local
63 &ci->i_version, &i_size); in ceph_fscache_unuse_cookie()
72 loff_t i_size = i_size_read(inode); in ceph_fscache_update() local
74 fscache_update_cookie(ceph_fscache_cookie(ci), &ci->i_version, &i_size); in ceph_fscache_update()
/linux-6.6.21/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()
287 if (to > inode->i_size) { in jfs_write_failed()
288 truncate_pagecache(inode, inode->i_size); in jfs_write_failed()
407 jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); in jfs_truncate()
409 block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); in jfs_truncate()
412 jfs_truncate_nolock(ip, ip->i_size); in jfs_truncate()
/linux-6.6.21/fs/netfs/
Dbuffered_read.c108 loff_t *_start, size_t *_len, loff_t i_size) in netfs_cache_expand_readahead() argument
113 cres->ops->expand_readahead(cres, _start, _len, i_size); in netfs_cache_expand_readahead()
122 netfs_cache_expand_readahead(rreq, &rreq->start, &rreq->len, rreq->i_size); in netfs_rreq_expand()
278 loff_t i_size = i_size_read(inode); in netfs_skip_folio_read() local
283 if (pos - offset + len <= i_size) in netfs_skip_folio_read()
295 if (pos - offset >= i_size) in netfs_skip_folio_read()
299 if (offset == 0 && (pos + len) >= i_size) in netfs_skip_folio_read()
/linux-6.6.21/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.6.21/include/linux/
Dnetfs.h191 loff_t i_size; /* Size of the file */ member
256 loff_t *_start, size_t *_len, loff_t i_size);
262 loff_t i_size);
268 loff_t *_start, size_t *_len, loff_t i_size,
276 loff_t i_size,
/linux-6.6.21/fs/affs/
Dfile.c40 if (inode->i_size != AFFS_I(inode)->mmu_private) in affs_file_release()
389 if (to > inode->i_size) { in affs_write_failed()
390 truncate_pagecache(inode, inode->i_size); in affs_write_failed()
621 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
625 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
637 if (folio_pos(folio) + to > inode->i_size) { in affs_read_folio_ofs()
638 to = inode->i_size - folio_pos(folio); in affs_read_folio_ofs()
814 if (tmp > inode->i_size) in affs_write_end_ofs()
815 inode->i_size = AFFS_I(inode)->mmu_private = tmp; in affs_write_end_ofs()
874 inode->i_ino, AFFS_I(inode)->mmu_private, inode->i_size); in affs_truncate()
[all …]
/linux-6.6.21/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.6.21/fs/iomap/
Ddirect-io.c33 loff_t i_size; member
96 if (offset + ret > dio->i_size && in iomap_dio_complete()
98 ret = dio->i_size - offset; in iomap_dio_complete()
468 loff_t size = iomi->inode->i_size; in iomap_dio_inline_iter()
570 dio->i_size = i_size_read(inode); in __iomap_dio_rw()
586 if (iomi.pos >= dio->i_size) in __iomap_dio_rw()
610 if (iomi.pos >= dio->i_size || in __iomap_dio_rw()
611 iomi.pos + iomi.len > dio->i_size) in __iomap_dio_rw()
674 if (iov_iter_rw(iter) == READ && iomi.pos >= dio->i_size) in __iomap_dio_rw()
675 iov_iter_revert(iter, iomi.pos - dio->i_size); in __iomap_dio_rw()
/linux-6.6.21/fs/isofs/
Drock.c453 inode->i_size = symlink_len; in parse_rock_ridge_inode_internal()
458 inode->i_size += in parse_rock_ridge_inode_internal()
462 inode->i_size += 1; in parse_rock_ridge_inode_internal()
465 inode->i_size += 2; in parse_rock_ridge_inode_internal()
469 inode->i_size += 1; in parse_rock_ridge_inode_internal()
486 inode->i_size += in parse_rock_ridge_inode_internal()
497 inode->i_size += 1; in parse_rock_ridge_inode_internal()
500 symlink_len = inode->i_size; in parse_rock_ridge_inode_internal()
532 inode->i_size = reloc->i_size; in parse_rock_ridge_inode_internal()
570 inode->i_size = in parse_rock_ridge_inode_internal()
/linux-6.6.21/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>>...14