Lines Matching defs:inode
30 #include "inode.h"
204 struct inode *inode = &cache_info_to_inode(et->et_ci)->vfs_inode;
206 ocfs2_extent_map_insert_rec(inode, rec);
212 struct inode *inode = &cache_info_to_inode(et->et_ci)->vfs_inode;
214 ocfs2_extent_map_trunc(inode, clusters);
226 "Device %s, asking for sparse allocation: inode %llu, "
1136 * Add an entire tree branch to our inode. eb_bh is the extent block
5238 int ocfs2_mark_extent_written(struct inode *inode,
5247 (unsigned long long)OCFS2_I(inode)->ip_blkno,
5250 if (!ocfs2_writes_unwritten_extents(OCFS2_SB(inode->i_sb))) {
5251 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",
5252 (unsigned long long)OCFS2_I(inode)->ip_blkno);
5650 static int ocfs2_reserve_blocks_for_rec_trunc(struct inode *inode,
5658 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
5692 int ocfs2_remove_btree_range(struct inode *inode,
5699 u64 phys_blkno = ocfs2_clusters_to_blocks(inode->i_sb, phys_cpos);
5700 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
5701 struct inode *tl_inode = osb->osb_tl_inode;
5707 BUG_ON(!ocfs2_is_refcount_inode(inode));
5718 ret = ocfs2_prepare_refcount_change_for_del(inode,
5730 ret = ocfs2_reserve_blocks_for_rec_trunc(inode, et, 1, &meta_ac,
5762 dquot_free_space_nodirty(inode,
5763 ocfs2_clusters_to_bytes(inode->i_sb, len));
5772 ocfs2_update_inode_fsync_trans(handle, inode, 1);
5778 ret = ocfs2_decrease_refcount(inode, handle,
5845 struct inode *tl_inode = osb->osb_tl_inode;
5915 struct inode *data_alloc_inode,
5925 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);
6930 * We need to call this before i_size is updated on the inode because
6934 int ocfs2_zero_range_for_truncate(struct inode *inode, handle_t *handle,
6941 struct super_block *sb = inode->i_sb;
6961 ret = ocfs2_extent_map_get_blocks(inode,
6976 ret = ocfs2_grab_eof_pages(inode, range_start, range_end, pages,
6983 ocfs2_zero_cluster_pages(inode, range_start, range_end, pages,
6991 ret = filemap_fdatawrite_range(inode->i_mapping, range_start,
7002 static void ocfs2_zero_dinode_id2_with_xattr(struct inode *inode,
7005 unsigned int blocksize = 1 << inode->i_sb->s_blocksize_bits;
7017 void ocfs2_dinode_new_extent_list(struct inode *inode,
7020 ocfs2_zero_dinode_id2_with_xattr(inode, di);
7024 ocfs2_extent_recs_per_inode_with_xattr(inode->i_sb, di));
7027 void ocfs2_set_inode_data_inline(struct inode *inode, struct ocfs2_dinode *di)
7029 struct ocfs2_inode_info *oi = OCFS2_I(inode);
7041 ocfs2_zero_dinode_id2_with_xattr(inode, di);
7044 ocfs2_max_inline_data_with_xattr(inode->i_sb, di));
7047 int ocfs2_convert_inline_data_to_extents(struct inode *inode,
7055 struct ocfs2_inode_info *oi = OCFS2_I(inode);
7056 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
7063 has_data = i_size_read(inode) ? 1 : 0;
7081 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
7093 ret = dquot_alloc_space_nodirty(inode,
7112 block = phys = ocfs2_clusters_to_blocks(inode->i_sb, bit_off);
7114 ret = ocfs2_grab_eof_pages(inode, 0, page_end, &page,
7126 ret = ocfs2_read_inline_data(inode, page, di_bh);
7133 ocfs2_map_and_dirty_page(inode, handle, 0, page_end, page, 0,
7142 ocfs2_update_inode_fsync_trans(handle, inode, 1);
7143 ocfs2_dinode_new_extent_list(inode, di);
7151 * the in-inode data from our pages.
7153 ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
7161 inode->i_blocks = ocfs2_inode_sector_count(inode);
7170 dquot_free_space_nodirty(inode,
7195 * inode->i_size and fe->i_size have been adjusted.
7200 struct inode *inode,
7216 ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
7220 i_size_read(inode));
7230 ocfs2_extent_map_trunc(inode, new_highest_cpos);
7236 if (OCFS2_I(inode)->ip_clusters == 0) {
7244 status = ocfs2_find_path(INODE_CACHE(inode), path, UINT_MAX);
7251 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7253 OCFS2_I(inode)->ip_clusters,
7269 ocfs2_error(inode->i_sb,
7271 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7289 "extent record, depth %u\n", inode->i_ino,
7321 ocfs2_clusters_to_blocks(inode->i_sb, coff);
7330 phys_cpos = ocfs2_blocks_to_clusters(inode->i_sb, blkno);
7341 status = ocfs2_remove_btree_range(inode, &et, trunc_cpos,
7373 int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
7379 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
7384 if (start >= i_size_read(inode))
7387 if (end > i_size_read(inode))
7388 end = i_size_read(inode);
7392 if (!(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) ||
7395 ocfs2_error(inode->i_sb,
7396 "Inline data flags for inode %llu don't agree! Disk: 0x%x, Memory: 0x%x, Superblock: 0x%x\n",
7397 (unsigned long long)OCFS2_I(inode)->ip_blkno,
7399 OCFS2_I(inode)->ip_dyn_features,
7412 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
7429 i_size_write(inode, start);
7433 inode->i_blocks = ocfs2_inode_sector_count(inode);
7434 inode->i_ctime = inode->i_mtime = current_time(inode);
7436 di->i_ctime = di->i_mtime = cpu_to_le64(inode->i_ctime.tv_sec);
7437 di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
7439 ocfs2_update_inode_fsync_trans(handle, inode, 1);
7528 struct inode *main_bm_inode = NULL;