Lines Matching refs:AFFS_INODE

67 	pr_debug("AFFS: open(%d)\n", AFFS_INODE->i_opencnt);  in affs_file_open()
68 AFFS_INODE->i_opencnt++; in affs_file_open()
77 pr_debug("AFFS: release(%d)\n", AFFS_INODE->i_opencnt); in affs_file_release()
78 AFFS_INODE->i_opencnt--; in affs_file_release()
79 if (!AFFS_INODE->i_opencnt) in affs_file_release()
93 if (!AFFS_INODE->i_lc) { in affs_grow_extcache()
97 AFFS_INODE->i_lc = (u32 *)ptr; in affs_grow_extcache()
98 AFFS_INODE->i_ac = (struct affs_ext_key *)(ptr + AFFS_CACHE_SIZE / 2); in affs_grow_extcache()
101 lc_max = AFFS_LC_SIZE << AFFS_INODE->i_lc_shift; in affs_grow_extcache()
103 if (AFFS_INODE->i_extcnt > lc_max) { in affs_grow_extcache()
107 lc_shift = AFFS_INODE->i_lc_shift; in affs_grow_extcache()
108 tmp = (AFFS_INODE->i_extcnt / AFFS_LC_SIZE) >> lc_shift; in affs_grow_extcache()
114 lc_idx >>= (lc_shift - AFFS_INODE->i_lc_shift); in affs_grow_extcache()
115 AFFS_INODE->i_lc_size >>= (lc_shift - AFFS_INODE->i_lc_shift); in affs_grow_extcache()
118 off = 1 << (lc_shift - AFFS_INODE->i_lc_shift); in affs_grow_extcache()
120 AFFS_INODE->i_ac[i] = AFFS_INODE->i_ac[j]; in affs_grow_extcache()
122 AFFS_INODE->i_lc_shift = lc_shift; in affs_grow_extcache()
123 AFFS_INODE->i_lc_mask = lc_mask; in affs_grow_extcache()
127 i = AFFS_INODE->i_lc_size; in affs_grow_extcache()
128 AFFS_INODE->i_lc_size = lc_idx + 1; in affs_grow_extcache()
131 AFFS_INODE->i_lc[0] = inode->i_ino; in affs_grow_extcache()
134 key = AFFS_INODE->i_lc[i - 1]; in affs_grow_extcache()
135 j = AFFS_INODE->i_lc_mask + 1; in affs_grow_extcache()
145 AFFS_INODE->i_lc[i] = key; in affs_grow_extcache()
187 AFFS_INODE->i_extcnt++; in affs_alloc_extblock()
197 struct buffer_head *bh = AFFS_INODE->i_ext_bh; in affs_get_extblock()
198 if (ext == AFFS_INODE->i_ext_last) in affs_get_extblock()
216 if (ext == AFFS_INODE->i_ext_last + 1) { in affs_get_extblock_slow()
218 bh = AFFS_INODE->i_ext_bh; in affs_get_extblock_slow()
220 if (ext < AFFS_INODE->i_extcnt) in affs_get_extblock_slow()
222 if (ext > AFFS_INODE->i_extcnt) in affs_get_extblock_slow()
236 if (ext >= AFFS_INODE->i_extcnt) { in affs_get_extblock_slow()
240 if (ext > AFFS_INODE->i_extcnt) in affs_get_extblock_slow()
256 lc_idx = ext >> AFFS_INODE->i_lc_shift; in affs_get_extblock_slow()
257 lc_off = ext & AFFS_INODE->i_lc_mask; in affs_get_extblock_slow()
259 if (lc_idx >= AFFS_INODE->i_lc_size) { in affs_get_extblock_slow()
270 ext_key = AFFS_INODE->i_lc[lc_idx]; in affs_get_extblock_slow()
276 if (AFFS_INODE->i_ac[ac_idx].ext == ext) { in affs_get_extblock_slow()
277 ext_key = AFFS_INODE->i_ac[ac_idx].key; in affs_get_extblock_slow()
286 if (AFFS_INODE->i_ac[idx].ext == tmp) { in affs_get_extblock_slow()
287 ext_key = AFFS_INODE->i_ac[idx].key; in affs_get_extblock_slow()
293 ext_key = AFFS_INODE->i_lc[lc_idx]; in affs_get_extblock_slow()
309 AFFS_INODE->i_ac[ac_idx].ext = ext; in affs_get_extblock_slow()
310 AFFS_INODE->i_ac[ac_idx].key = ext_key; in affs_get_extblock_slow()
322 affs_brelse(AFFS_INODE->i_ext_bh); in affs_get_extblock_slow()
323 AFFS_INODE->i_ext_last = ext; in affs_get_extblock_slow()
324 AFFS_INODE->i_ext_bh = bh; in affs_get_extblock_slow()
346 if (block >= AFFS_INODE->i_blkcnt) { in affs_get_block()
347 if (block > AFFS_INODE->i_blkcnt || !create) in affs_get_block()
369 AFFS_INODE->mmu_private += AFFS_SB->s_data_blksize; in affs_get_block()
370 AFFS_INODE->i_blkcnt++; in affs_get_block()
557 size = AFFS_INODE->mmu_private; in affs_extent_file_ofs()
607 inode->i_size = AFFS_INODE->mmu_private = newsize; in affs_extent_file_ofs()
611 inode->i_size = AFFS_INODE->mmu_private = size; in affs_extent_file_ofs()
645 if (offset + from > AFFS_INODE->mmu_private) { in affs_prepare_write_ofs()
779 inode->i_size = AFFS_INODE->mmu_private = tmp; in affs_commit_write_ofs()
826 (u32)inode->i_ino, (u32)AFFS_INODE->mmu_private, (u32)inode->i_size); in affs_truncate()
835 if (inode->i_size > AFFS_INODE->mmu_private) { in affs_truncate()
852 } else if (inode->i_size == AFFS_INODE->mmu_private) in affs_truncate()
862 if (AFFS_INODE->i_lc) { in affs_truncate()
864 i = (ext + 1) >> AFFS_INODE->i_lc_shift; in affs_truncate()
865 if (AFFS_INODE->i_lc_size > i) { in affs_truncate()
866 AFFS_INODE->i_lc_size = i; in affs_truncate()
868 AFFS_INODE->i_lc[i] = 0; in affs_truncate()
872 if (AFFS_INODE->i_ac[i].ext >= ext) in affs_truncate()
873 AFFS_INODE->i_ac[i].ext = 0; in affs_truncate()
877 blkcnt = AFFS_INODE->i_blkcnt; in affs_truncate()
898 AFFS_INODE->i_blkcnt = last_blk + 1; in affs_truncate()
899 AFFS_INODE->i_extcnt = ext + 1; in affs_truncate()
914 AFFS_INODE->i_blkcnt = 0; in affs_truncate()
915 AFFS_INODE->i_extcnt = 1; in affs_truncate()
917 AFFS_INODE->mmu_private = inode->i_size; in affs_truncate()