Lines Matching defs:inode
28 #include "inode.h"
202 struct inode *inode = &cache_info_to_inode(et->et_ci)->vfs_inode;
204 ocfs2_extent_map_insert_rec(inode, rec);
210 struct inode *inode = &cache_info_to_inode(et->et_ci)->vfs_inode;
212 ocfs2_extent_map_trunc(inode, clusters);
224 "Device %s, asking for sparse allocation: inode %llu, "
1134 * Add an entire tree branch to our inode. eb_bh is the extent block
5236 int ocfs2_mark_extent_written(struct inode *inode,
5245 (unsigned long long)OCFS2_I(inode)->ip_blkno,
5248 if (!ocfs2_writes_unwritten_extents(OCFS2_SB(inode->i_sb))) {
5249 ocfs2_error(inode->i_sb, "Inode %llu has unwritten extents that are being written to, but the feature bit is not set in the super block\n",
5250 (unsigned long long)OCFS2_I(inode)->ip_blkno);
5648 static int ocfs2_reserve_blocks_for_rec_trunc(struct inode *inode,
5656 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
5690 int ocfs2_remove_btree_range(struct inode *inode,
5697 u64 phys_blkno = ocfs2_clusters_to_blocks(inode->i_sb, phys_cpos);
5698 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
5699 struct inode *tl_inode = osb->osb_tl_inode;
5705 BUG_ON(!ocfs2_is_refcount_inode(inode));
5716 ret = ocfs2_prepare_refcount_change_for_del(inode,
5728 ret = ocfs2_reserve_blocks_for_rec_trunc(inode, et, 1, &meta_ac,
5760 dquot_free_space_nodirty(inode,
5761 ocfs2_clusters_to_bytes(inode->i_sb, len));
5770 ocfs2_update_inode_fsync_trans(handle, inode, 1);
5776 ret = ocfs2_decrease_refcount(inode, handle,
5843 struct inode *tl_inode = osb->osb_tl_inode;
5913 struct inode *data_alloc_inode,
5923 struct inode *tl_inode = osb->osb_tl_inode;
5989 struct inode *tl_inode = osb->osb_tl_inode;
5990 struct inode *data_alloc_inode = NULL;
6035 mlog(ML_ERROR, "Could not get bitmap inode!\n");
6066 struct inode *tl_inode = osb->osb_tl_inode;
6144 struct inode **tl_inode,
6148 struct inode *inode = NULL;
6151 inode = ocfs2_get_system_file_inode(osb,
6154 if (!inode) {
6156 mlog(ML_ERROR, "Could not get load truncate log inode!\n");
6160 status = ocfs2_read_inode_block(inode, &bh);
6162 iput(inode);
6167 *tl_inode = inode;
6182 struct inode *tl_inode = NULL;
6252 struct inode *tl_inode = osb->osb_tl_inode;
6305 struct inode *tl_inode = osb->osb_tl_inode;
6325 struct inode *tl_inode = NULL;
6356 * ocfs2_extent_block structures are a good example of this - an inode
6358 * out of their own suballoc inode.
6393 struct inode *inode;
6397 inode = ocfs2_get_system_file_inode(osb, sysfile_type, slot);
6398 if (!inode) {
6404 inode_lock(inode);
6406 ret = ocfs2_inode_lock(inode, &di_bh, 1);
6428 ret = ocfs2_free_suballoc_bits(handle, inode, di_bh,
6441 ocfs2_inode_unlock(inode, 1);
6444 inode_unlock(inode);
6445 iput(inode);
6484 struct inode *tl_inode = osb->osb_tl_inode;
6804 void ocfs2_map_and_dirty_page(struct inode *inode, handle_t *handle,
6812 ret = ocfs2_map_page_blocks(page, phys, inode, from, to, 0);
6829 else if (ocfs2_should_order_data(inode)) {
6830 ret = ocfs2_jbd2_inode_add_write(handle, inode,
6842 static void ocfs2_zero_cluster_pages(struct inode *inode, loff_t start,
6849 struct super_block *sb = inode->i_sb;
6867 ocfs2_map_and_dirty_page(inode, handle, from, to, page, 1,
6877 int ocfs2_grab_pages(struct inode *inode, loff_t start, loff_t end,
6881 struct address_space *mapping = inode->i_mapping;
6914 static int ocfs2_grab_eof_pages(struct inode *inode, loff_t start, loff_t end,
6917 struct super_block *sb = inode->i_sb;
6922 return ocfs2_grab_pages(inode, start, end, pages, num);
6929 * We need to call this before i_size is updated on the inode because
6933 int ocfs2_zero_range_for_truncate(struct inode *inode, handle_t *handle,
6940 struct super_block *sb = inode->i_sb;
6954 range_end = min_t(u64, range_end, i_size_read(inode));
6966 ret = ocfs2_extent_map_get_blocks(inode,
6981 ret = ocfs2_grab_eof_pages(inode, range_start, range_end, pages,
6988 ocfs2_zero_cluster_pages(inode, range_start, range_end, pages,
6996 ret = filemap_fdatawrite_range(inode->i_mapping, range_start,
7007 static void ocfs2_zero_dinode_id2_with_xattr(struct inode *inode,
7010 unsigned int blocksize = 1 << inode->i_sb->s_blocksize_bits;
7022 void ocfs2_dinode_new_extent_list(struct inode *inode,
7025 ocfs2_zero_dinode_id2_with_xattr(inode, di);
7029 ocfs2_extent_recs_per_inode_with_xattr(inode->i_sb, di));
7032 void ocfs2_set_inode_data_inline(struct inode *inode, struct ocfs2_dinode *di)
7034 struct ocfs2_inode_info *oi = OCFS2_I(inode);
7046 ocfs2_zero_dinode_id2_with_xattr(inode, di);
7049 ocfs2_max_inline_data_with_xattr(inode->i_sb, di));
7052 int ocfs2_convert_inline_data_to_extents(struct inode *inode,
7060 struct ocfs2_inode_info *oi = OCFS2_I(inode);
7061 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
7068 has_data = i_size_read(inode) ? 1 : 0;
7086 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
7098 ret = dquot_alloc_space_nodirty(inode,
7117 block = phys = ocfs2_clusters_to_blocks(inode->i_sb, bit_off);
7119 ret = ocfs2_grab_eof_pages(inode, 0, page_end, &page,
7131 ret = ocfs2_read_inline_data(inode, page, di_bh);
7138 ocfs2_map_and_dirty_page(inode, handle, 0, page_end, page, 0,
7147 ocfs2_update_inode_fsync_trans(handle, inode, 1);
7148 ocfs2_dinode_new_extent_list(inode, di);
7156 * the in-inode data from our pages.
7158 ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
7166 inode->i_blocks = ocfs2_inode_sector_count(inode);
7175 dquot_free_space_nodirty(inode,
7200 * inode->i_size and fe->i_size have been adjusted.
7205 struct inode *inode,
7221 ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
7225 i_size_read(inode));
7235 ocfs2_extent_map_trunc(inode, new_highest_cpos);
7241 if (OCFS2_I(inode)->ip_clusters == 0) {
7249 status = ocfs2_find_path(INODE_CACHE(inode), path, UINT_MAX);
7256 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7258 OCFS2_I(inode)->ip_clusters,
7274 ocfs2_error(inode->i_sb,
7276 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7294 "extent record, depth %u\n", inode->i_ino,
7326 ocfs2_clusters_to_blocks(inode->i_sb, coff);
7335 phys_cpos = ocfs2_blocks_to_clusters(inode->i_sb, blkno);
7346 status = ocfs2_remove_btree_range(inode, &et, trunc_cpos,
7378 int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
7384 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
7389 if (start >= i_size_read(inode))
7392 if (end > i_size_read(inode))
7393 end = i_size_read(inode);
7397 if (!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) ||
7400 ocfs2_error(inode->i_sb,
7401 "Inline data flags for inode %llu don't agree! Disk: 0x%x, Memory: 0x%x, Superblock: 0x%x\n",
7402 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7404 OCFS2_I(inode)->ip_dyn_features,
7417 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
7434 i_size_write(inode, start);
7438 inode->i_blocks = ocfs2_inode_sector_count(inode);
7439 inode->i_mtime = inode_set_ctime_current(inode);
7441 di->i_ctime = di->i_mtime = cpu_to_le64(inode_get_ctime(inode).tv_sec);
7442 di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode_get_ctime(inode).tv_nsec);
7444 ocfs2_update_inode_fsync_trans(handle, inode, 1);
7533 struct inode *main_bm_inode = NULL;