/fs/ |
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 > 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 …]
|
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()
|
/fs/ubifs/ |
D | dir.c | 117 inode->i_size = ui->ui_size = UBIFS_INO_NODE_SZ; in ubifs_new_inode() 323 dir->i_size += sz_change; in ubifs_create() 324 dir_ui->ui_size = dir->i_size; in ubifs_create() 338 dir->i_size -= sz_change; in ubifs_create() 339 dir_ui->ui_size = dir->i_size; in ubifs_create() 743 dir->i_size += sz_change; in ubifs_link() 744 dir_ui->ui_size = dir->i_size; in ubifs_link() 757 dir->i_size -= sz_change; in ubifs_link() 758 dir_ui->ui_size = dir->i_size; in ubifs_link() 817 dir->i_size -= sz_change; in ubifs_unlink() [all …]
|
D | file.c | 107 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() 225 int err, appending = !!(pos + len > inode->i_size); in write_begin_slow() 229 inode->i_ino, pos, len, inode->i_size); in write_begin_slow() 429 int err, appending = !!(pos + len > inode->i_size); in ubifs_write_begin() 433 ubifs_assert(c, ubifs_inode(inode)->ui_size == inode->i_size); in ubifs_write_begin() 544 int appending = !!(end_pos > inode->i_size); in ubifs_write_end() 547 inode->i_ino, pos, page->index, len, copied, inode->i_size); in ubifs_write_end() [all …]
|
D | recovery.c | 1232 loff_t i_size; member 1246 static int add_ino(struct ubifs_info *c, ino_t inum, loff_t i_size, in add_ino() argument 1266 e->i_size = i_size; in add_ino() 1368 e->i_size = new_size; in ubifs_recover_size_accum() 1408 loff_t i_size; in fix_size_in_place() local 1420 i_size = le64_to_cpu(ino->size); in fix_size_in_place() 1421 if (i_size >= e->d_size) in fix_size_in_place() 1444 (unsigned long)e->inum, lnum, offs, i_size, e->d_size); in fix_size_in_place() 1449 (unsigned long)e->inum, e->i_size, e->d_size, err); in fix_size_in_place() 1475 if (inode->i_size >= e->d_size) { in inode_fix_size() [all …]
|
/fs/udf/ |
D | truncate.c | 78 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()
|
/fs/ntfs/ |
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() 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() 380 loff_t i_size; in ntfs_readpage() local 393 i_size = i_size_read(vi); in ntfs_readpage() [all …]
|
D | compress.c | 106 const loff_t i_size, const s64 initialized_size) in handle_bounds_compressed_page() argument 109 (initialized_size < i_size)) in handle_bounds_compressed_page() 155 u8 *const cb_start, const u32 cb_size, const loff_t i_size, in ntfs_decompress() argument 215 handle_bounds_compressed_page(dp, i_size, in ntfs_decompress() 464 loff_t i_size; in ntfs_read_compressed_block() local 543 i_size = i_size_read(VFS_I(ni)); in ntfs_read_compressed_block() 546 max_page = ((i_size + PAGE_SIZE - 1) >> PAGE_SHIFT) - in ntfs_read_compressed_block() 823 handle_bounds_compressed_page(page, i_size, in ntfs_read_compressed_block() 848 i_size, initialized_size); in ntfs_read_compressed_block()
|
/fs/afs/ |
D | dir_edit.c | 196 loff_t i_size; in afs_edit_dir_add() local 202 i_size = i_size_read(&vnode->vfs_inode); in afs_edit_dir_add() 203 if (i_size > AFS_DIR_BLOCK_SIZE * AFS_DIR_MAX_BLOCKS || in afs_edit_dir_add() 204 (i_size & (AFS_DIR_BLOCK_SIZE - 1))) { in afs_edit_dir_add() 223 if (i_size == 0) in afs_edit_dir_add() 225 nr_blocks = i_size / AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add() 299 i_size = AFS_DIR_BLOCK_SIZE; in afs_edit_dir_add() 300 afs_set_i_size(vnode, i_size); in afs_edit_dir_add() 374 loff_t i_size; in afs_edit_dir_remove() local 379 i_size = i_size_read(&vnode->vfs_inode); in afs_edit_dir_remove() [all …]
|
/fs/jffs2/ |
D | file.c | 145 if (pos > inode->i_size) { in jffs2_write_begin() 152 (unsigned int)inode->i_size, (uint32_t)pos); in jffs2_write_begin() 174 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin() 175 ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size); in jffs2_write_begin() 205 inode->i_size = pos; 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()
|
D | fs.c | 115 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 …]
|
/fs/hpfs/ |
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() 274 if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) in hpfs_setattr()
|
D | file.c | 71 i->i_blocks = 1 + ((i->i_size + 511) >> 9); in hpfs_truncate() 72 hpfs_i(i)->mmu_private = i->i_size; in hpfs_truncate() 73 hpfs_truncate_btree(i->i_sb, i->i_ino, 1, ((i->i_size + 511) >> 9)); in hpfs_truncate() 146 if (to > inode->i_size) { in hpfs_write_failed() 147 truncate_pagecache(inode, inode->i_size); in hpfs_write_failed()
|
/fs/erofs/ |
D | inode.c | 121 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()
|
/fs/jfs/ |
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() 310 if (to > inode->i_size) { in jfs_write_failed() 311 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()
|
/fs/9p/ |
D | v9fs_vfs.h | 77 static inline void v9fs_i_size_write(struct inode *inode, loff_t i_size) in v9fs_i_size_write() argument 84 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write() 86 i_size_write(inode, i_size); in v9fs_i_size_write() 87 if (sizeof(i_size) > sizeof(long)) in v9fs_i_size_write()
|
D | vfs_addr.c | 245 loff_t i_size = i_size_read(inode); in v9fs_direct_IO() local 246 if (pos + n > i_size) in v9fs_direct_IO() 247 inode_add_bytes(inode, pos + n - i_size); in v9fs_direct_IO() 312 if (last_pos > inode->i_size) { in v9fs_write_end() 313 inode_add_bytes(inode, last_pos - inode->i_size); in v9fs_write_end()
|
/fs/squashfs/ |
D | inode.c | 66 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()
|
/fs/affs/ |
D | file.c | 39 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() 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() 638 if (((page->index + 1) << PAGE_SHIFT) > inode->i_size) { in affs_readpage_ofs() 639 to = inode->i_size & ~PAGE_MASK; in affs_readpage_ofs() 813 if (tmp > inode->i_size) in affs_write_end_ofs() 814 inode->i_size = AFFS_I(inode)->mmu_private = tmp; in affs_write_end_ofs() 870 inode->i_ino, AFFS_I(inode)->mmu_private, inode->i_size); in affs_truncate() [all …]
|
/fs/reiserfs/ |
D | inode.c | 414 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) in _get_block_create_0() 416 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) { in _get_block_create_0() 418 inode->i_size - (le_ih_k_offset(ih) - 1) - in _get_block_create_0() 723 && inode->i_size < i_block_size(inode) * 4) in reiserfs_get_block() 725 && inode->i_size < i_block_size(inode))) in reiserfs_get_block() 730 if ((new_offset + inode->i_sb->s_blocksize - 1) > inode->i_size) { in reiserfs_get_block() 1097 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() 1267 inode->i_size = sd_v1_size(sd); in init_inode() [all …]
|
/fs/isofs/ |
D | rock.c | 455 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()
|
/fs/adfs/ |
D | inode.c | 50 if (to > inode->i_size) in adfs_write_failed() 51 truncate_pagecache(inode, inode->i_size); in adfs_write_failed() 251 inode->i_size = obj->size; in adfs_iget() 253 inode->i_blocks = (inode->i_size + sb->s_blocksize - 1) >> in adfs_iget() 280 ADFS_I(inode)->mmu_private = inode->i_size; in adfs_iget() 364 obj.size = inode->i_size; in adfs_write_inode()
|
/fs/hfsplus/ |
D | inode.c | 39 if (to > inode->i_size) { in hfsplus_write_failed() 40 truncate_pagecache(inode, inode->i_size); in hfsplus_write_failed() 256 if (attr->ia_size > inode->i_size) { in hfsplus_setattr() 402 inode->i_size = 2; in hfsplus_new_inode() 439 inode->i_size = 0; in hfsplus_delete_inode() 443 inode->i_size = 0; in hfsplus_delete_inode() 466 hip->phys_size = inode->i_size = be64_to_cpu(fork->total_size); in hfsplus_inode_read_fork() 468 (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits; in hfsplus_inode_read_fork() 484 fork->total_size = cpu_to_be64(inode->i_size); in hfsplus_inode_write_fork() 509 inode->i_size = 2 + be32_to_cpu(folder->valence); in hfsplus_cat_read_inode() [all …]
|
/fs/minix/ |
D | inode.c | 32 inode->i_size = 0; in minix_evict_inode() 419 if (to > inode->i_size) { in minix_write_failed() 420 truncate_pagecache(inode, inode->i_size); in minix_write_failed() 502 inode->i_size = raw_inode->i_size; in V1_minix_iget() 542 inode->i_size = raw_inode->i_size; in V2_minix_iget() 594 raw_inode->i_size = inode->i_size; in V1_minix_update_inode() 621 raw_inode->i_size = inode->i_size; in V2_minix_update_inode()
|
/fs/cramfs/ |
D | inode.c | 131 inode->i_size = cramfs_inode->size; in get_cramfs_inode() 212 devsize = mapping->host->i_size >> PAGE_SHIFT; in cramfs_blkdev_read() 344 partial = offset_in_page(inode->i_size); in cramfs_last_page_is_shared() 347 last_page = inode->i_size >> PAGE_SHIFT; in cramfs_last_page_is_shared() 378 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_mmap() 464 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_get_unmapped_area() 709 if (ctx->pos >= inode->i_size) in cramfs_readdir() 720 while (offset < inode->i_size) { in cramfs_readdir() 772 while (offset < dir->i_size) { in cramfs_lookup() 826 maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_readpage() [all …]
|