/openbmc/linux/fs/ |
H A D | kernel_read_file.c | 39 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 …]
|
H A D | stack.c | 13 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()
|
/openbmc/linux/fs/udf/ |
H A D | truncate.c | 74 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()
|
/openbmc/linux/fs/ubifs/ |
H A D | dir.c | 325 dir->i_size += sz_change; in ubifs_create() 340 dir->i_size -= sz_change; in ubifs_create() 768 dir->i_size += sz_change; in ubifs_link() 782 dir->i_size -= sz_change; in ubifs_link() 842 dir->i_size -= sz_change; in ubifs_unlink() 861 dir->i_size += sz_change; in ubifs_unlink() 945 dir->i_size -= sz_change; in ubifs_rmdir() 964 dir->i_size += sz_change; in ubifs_rmdir() 1019 dir->i_size += sz_change; in ubifs_mkdir() 1035 dir->i_size -= sz_change; in ubifs_mkdir() [all …]
|
H A D | file.c | 107 loff_t i_size = i_size_read(inode); in do_readpage() local 228 inode->i_ino, pos, len, inode->i_size); in write_begin_slow() 605 loff_t i_size = i_size_read(inode); in populate_page() local 615 end_index = (i_size - 1) >> PAGE_SHIFT; in populate_page() 616 if (!i_size || page->index > end_index) { in populate_page() 674 int len = i_size & (PAGE_SIZE - 1); in populate_page() 1007 pgoff_t end_index = i_size >> PAGE_SHIFT; in ubifs_writepage() 1008 int err, len = i_size & (PAGE_SIZE - 1); in ubifs_writepage() 1055 if (i_size > synced_i_size) { in ubifs_writepage() 1188 ui->ui_size = inode->i_size; in do_truncation() [all …]
|
/openbmc/linux/fs/9p/ |
H A D | vfs_addr.c | 156 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()
|
H A D | v9fs_vfs.h | 76 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()
|
/openbmc/linux/fs/afs/ |
H A D | dir_edit.c | 215 loff_t i_size; in afs_edit_dir_add() local 220 i_size = i_size_read(&vnode->netfs.inode); 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() 388 if (i_size < AFS_DIR_BLOCK_SIZE || in afs_edit_dir_remove() [all …]
|
H A D | write.c | 23 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() 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() 638 if (start < i_size) { in afs_write_back_from_locked_folio() 644 afs_write_to_cache(vnode, start, len, i_size, caching); in afs_write_back_from_locked_folio() [all …]
|
/openbmc/linux/fs/ntfs/ |
H A D | aops.c | 59 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() 381 loff_t i_size; in ntfs_read_folio() local 485 attr_len = i_size; in ntfs_read_folio() 536 loff_t i_size; in ntfs_write_block() local 1340 loff_t i_size; in ntfs_writepage() local 1473 attr_len = i_size; in ntfs_writepage() [all …]
|
/openbmc/linux/fs/erofs/ |
H A D | inode.c | 111 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 if (vi->datalayout != EROFS_INODE_FLAT_INLINE || inode->i_size < 0 || in erofs_fill_symlink() 214 check_add_overflow(m_pofs, inode->i_size, &off) || in erofs_fill_symlink() 220 lnk = kmalloc(inode->i_size + 1, GFP_KERNEL); in erofs_fill_symlink() 224 memcpy(lnk, kaddr + m_pofs, inode->i_size); in erofs_fill_symlink() 225 lnk[inode->i_size] = '\0'; in erofs_fill_symlink()
|
/openbmc/linux/fs/jffs2/ |
H A D | file.c | 144 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()
|
H A D | fs.c | 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() 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 …]
|
/openbmc/linux/fs/ceph/ |
H A D | cache.c | 60 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()
|
/openbmc/linux/security/integrity/ima/ |
H A D | ima_crypto.c | 333 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() 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() 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() 475 if (i_size == 0) in ima_calc_file_hash_tfm() 482 while (offset < i_size) { in ima_calc_file_hash_tfm() 538 loff_t i_size; in ima_calc_file_hash() local [all …]
|
/openbmc/linux/fs/hpfs/ |
H A D | inode.c | 22 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()
|
/openbmc/linux/fs/squashfs/ |
H A D | inode.c | 69 inode->i_size = 0; in squashfs_new_inode() 158 inode->i_size = le32_to_cpu(sqsh_ino->file_size); in squashfs_read_inode() 161 inode->i_blocks = ((inode->i_size - 1) >> 9) + 1; in squashfs_read_inode() 202 inode->i_size = le64_to_cpu(sqsh_ino->file_size); in squashfs_read_inode() 206 inode->i_blocks = (inode->i_size - in squashfs_read_inode() 231 inode->i_size = le16_to_cpu(sqsh_ino->file_size); in squashfs_read_inode() 256 inode->i_size = le32_to_cpu(sqsh_ino->file_size); in squashfs_read_inode() 282 inode->i_size = le32_to_cpu(sqsh_ino->symlink_size); in squashfs_read_inode() 283 if (inode->i_size > PAGE_SIZE) { in squashfs_read_inode() 300 &offset, inode->i_size); in squashfs_read_inode()
|
/openbmc/linux/fs/jfs/ |
H A D | inode.c | 49 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()
|
/openbmc/linux/fs/netfs/ |
H A D | buffered_read.c | 108 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()
|
/openbmc/linux/include/linux/ |
H A D | netfs.h | 191 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,
|
/openbmc/linux/fs/affs/ |
H A D | file.c | 40 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() 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() 878 if (inode->i_size) { in affs_truncate() 887 loff_t isize = inode->i_size; in affs_truncate() 926 if (inode->i_size) { in affs_truncate() 944 if (inode->i_size) { in affs_truncate() [all …]
|
/openbmc/linux/fs/adfs/ |
H A D | inode.c | 50 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()
|
/openbmc/openpower-hw-diags/attn/ |
H A D | attn_logging.cpp | 47 util::FFDCFile createFFDCRawFile(void* i_buffer, size_t i_size) in createFFDCRawFile() argument 53 size_t numBytes = write(fd, static_cast<char*>(i_buffer), i_size); in createFFDCRawFile() 54 if (i_size != numBytes) in createFFDCRawFile() 57 numBytes, i_size); in createFFDCRawFile() 75 createFFDCFiles(char* i_buffer = nullptr, size_t i_size = 0) in createFFDCFiles() argument 80 if ((nullptr != i_buffer) && (0 != i_size)) in createFFDCFiles() 82 files.emplace_back(createFFDCRawFile(i_buffer, i_size)); in createFFDCFiles()
|
/openbmc/linux/fs/iomap/ |
H A D | direct-io.c | 33 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()
|
/openbmc/linux/fs/isofs/ |
H A D | rock.c | 453 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()
|