Lines Matching refs:AFFS_I
25 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); in affs_file_open()
26 atomic_inc(&AFFS_I(inode)->i_opencnt); in affs_file_open()
34 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); in affs_file_release()
36 if (atomic_dec_and_test(&AFFS_I(inode)->i_opencnt)) { in affs_file_release()
38 if (inode->i_size != AFFS_I(inode)->mmu_private) in affs_file_release()
55 if (!AFFS_I(inode)->i_lc) { in affs_grow_extcache()
59 AFFS_I(inode)->i_lc = (u32 *)ptr; in affs_grow_extcache()
60 AFFS_I(inode)->i_ac = (struct affs_ext_key *)(ptr + AFFS_CACHE_SIZE / 2); in affs_grow_extcache()
63 lc_max = AFFS_LC_SIZE << AFFS_I(inode)->i_lc_shift; in affs_grow_extcache()
65 if (AFFS_I(inode)->i_extcnt > lc_max) { in affs_grow_extcache()
69 lc_shift = AFFS_I(inode)->i_lc_shift; in affs_grow_extcache()
70 tmp = (AFFS_I(inode)->i_extcnt / AFFS_LC_SIZE) >> lc_shift; in affs_grow_extcache()
76 lc_idx >>= (lc_shift - AFFS_I(inode)->i_lc_shift); in affs_grow_extcache()
77 AFFS_I(inode)->i_lc_size >>= (lc_shift - AFFS_I(inode)->i_lc_shift); in affs_grow_extcache()
80 off = 1 << (lc_shift - AFFS_I(inode)->i_lc_shift); in affs_grow_extcache()
82 AFFS_I(inode)->i_ac[i] = AFFS_I(inode)->i_ac[j]; in affs_grow_extcache()
84 AFFS_I(inode)->i_lc_shift = lc_shift; in affs_grow_extcache()
85 AFFS_I(inode)->i_lc_mask = lc_mask; in affs_grow_extcache()
89 i = AFFS_I(inode)->i_lc_size; in affs_grow_extcache()
90 AFFS_I(inode)->i_lc_size = lc_idx + 1; in affs_grow_extcache()
93 AFFS_I(inode)->i_lc[0] = inode->i_ino; in affs_grow_extcache()
96 key = AFFS_I(inode)->i_lc[i - 1]; in affs_grow_extcache()
97 j = AFFS_I(inode)->i_lc_mask + 1; in affs_grow_extcache()
107 AFFS_I(inode)->i_lc[i] = key; in affs_grow_extcache()
149 AFFS_I(inode)->i_extcnt++; in affs_alloc_extblock()
159 struct buffer_head *bh = AFFS_I(inode)->i_ext_bh; in affs_get_extblock()
160 if (ext == AFFS_I(inode)->i_ext_last) in affs_get_extblock()
178 if (ext == AFFS_I(inode)->i_ext_last + 1) { in affs_get_extblock_slow()
180 bh = AFFS_I(inode)->i_ext_bh; in affs_get_extblock_slow()
182 if (ext < AFFS_I(inode)->i_extcnt) in affs_get_extblock_slow()
184 BUG_ON(ext > AFFS_I(inode)->i_extcnt); in affs_get_extblock_slow()
197 if (ext >= AFFS_I(inode)->i_extcnt) { in affs_get_extblock_slow()
201 BUG_ON(ext > AFFS_I(inode)->i_extcnt); in affs_get_extblock_slow()
216 lc_idx = ext >> AFFS_I(inode)->i_lc_shift; in affs_get_extblock_slow()
217 lc_off = ext & AFFS_I(inode)->i_lc_mask; in affs_get_extblock_slow()
219 if (lc_idx >= AFFS_I(inode)->i_lc_size) { in affs_get_extblock_slow()
230 ext_key = AFFS_I(inode)->i_lc[lc_idx]; in affs_get_extblock_slow()
236 if (AFFS_I(inode)->i_ac[ac_idx].ext == ext) { in affs_get_extblock_slow()
237 ext_key = AFFS_I(inode)->i_ac[ac_idx].key; in affs_get_extblock_slow()
246 if (AFFS_I(inode)->i_ac[idx].ext == tmp) { in affs_get_extblock_slow()
247 ext_key = AFFS_I(inode)->i_ac[idx].key; in affs_get_extblock_slow()
253 ext_key = AFFS_I(inode)->i_lc[lc_idx]; in affs_get_extblock_slow()
269 AFFS_I(inode)->i_ac[ac_idx].ext = ext; in affs_get_extblock_slow()
270 AFFS_I(inode)->i_ac[ac_idx].key = ext_key; in affs_get_extblock_slow()
282 affs_brelse(AFFS_I(inode)->i_ext_bh); in affs_get_extblock_slow()
283 AFFS_I(inode)->i_ext_last = ext; in affs_get_extblock_slow()
284 AFFS_I(inode)->i_ext_bh = bh; in affs_get_extblock_slow()
306 if (block >= AFFS_I(inode)->i_blkcnt) { in affs_get_block()
307 if (block > AFFS_I(inode)->i_blkcnt || !create) in affs_get_block()
327 AFFS_I(inode)->mmu_private += AFFS_SB(sb)->s_data_blksize; in affs_get_block()
328 AFFS_I(inode)->i_blkcnt++; in affs_get_block()
405 if (AFFS_I(inode)->mmu_private < size) in affs_direct_IO()
424 &AFFS_I(mapping->host)->mmu_private); in affs_write_begin()
441 if (AFFS_I(inode)->i_protect & FIBF_ARCHIVED) { in affs_write_end()
442 AFFS_I(inode)->i_protect &= ~FIBF_ARCHIVED; in affs_write_end()
569 size = AFFS_I(inode)->mmu_private; in affs_extent_file_ofs()
620 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
624 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
660 if (pos > AFFS_I(inode)->mmu_private) { in affs_write_begin_ofs()
813 inode->i_size = AFFS_I(inode)->mmu_private = tmp; in affs_write_end_ofs()
816 if (AFFS_I(inode)->i_protect & FIBF_ARCHIVED) { in affs_write_end_ofs()
817 AFFS_I(inode)->i_protect &= ~FIBF_ARCHIVED; in affs_write_end_ofs()
850 while (AFFS_I(inode)->i_pa_cnt) { in affs_free_prealloc()
851 AFFS_I(inode)->i_pa_cnt--; in affs_free_prealloc()
852 affs_free_block(sb, ++AFFS_I(inode)->i_lastalloc); in affs_free_prealloc()
869 inode->i_ino, AFFS_I(inode)->mmu_private, inode->i_size); in affs_truncate()
878 if (inode->i_size > AFFS_I(inode)->mmu_private) { in affs_truncate()
889 inode->i_size = AFFS_I(inode)->mmu_private; in affs_truncate()
892 } else if (inode->i_size == AFFS_I(inode)->mmu_private) in affs_truncate()
903 if (AFFS_I(inode)->i_lc) { in affs_truncate()
905 i = (ext + 1) >> AFFS_I(inode)->i_lc_shift; in affs_truncate()
906 if (AFFS_I(inode)->i_lc_size > i) { in affs_truncate()
907 AFFS_I(inode)->i_lc_size = i; in affs_truncate()
909 AFFS_I(inode)->i_lc[i] = 0; in affs_truncate()
913 if (AFFS_I(inode)->i_ac[i].ext >= ext) in affs_truncate()
914 AFFS_I(inode)->i_ac[i].ext = 0; in affs_truncate()
918 blkcnt = AFFS_I(inode)->i_blkcnt; in affs_truncate()
940 AFFS_I(inode)->i_blkcnt = last_blk + 1; in affs_truncate()
941 AFFS_I(inode)->i_extcnt = ext + 1; in affs_truncate()
957 AFFS_I(inode)->i_blkcnt = 0; in affs_truncate()
958 AFFS_I(inode)->i_extcnt = 1; in affs_truncate()
960 AFFS_I(inode)->mmu_private = inode->i_size; in affs_truncate()