Lines Matching refs:ip

90 extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr)  in extAlloc()  argument
92 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); in extAlloc()
98 txBeginAnon(ip->i_sb); in extAlloc()
101 down(&JFS_IP(ip)->commit_sem); in extAlloc()
142 if ((rc = extBalloc(ip, hint ? hint : INOHINT(ip), &nxlen, &nxaddr))) { in extAlloc()
143 up(&JFS_IP(ip)->commit_sem); in extAlloc()
155 rc = xtExtend(0, ip, xoff, (int) nxlen, 0); in extAlloc()
157 rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0); in extAlloc()
163 dbFree(ip, nxaddr, nxlen); in extAlloc()
164 up(&JFS_IP(ip)->commit_sem); in extAlloc()
169 ip->i_blocks += LBLK2PBLK(ip->i_sb, nxlen); in extAlloc()
177 mark_inode_dirty(ip); in extAlloc()
178 set_cflag(COMMIT_Syncdata, ip); in extAlloc()
180 up(&JFS_IP(ip)->commit_sem); in extAlloc()
186 if (test_and_clear_cflag(COMMIT_Synclist,ip)) in extAlloc()
187 jfs_commit_inode(ip, 0); in extAlloc()
214 int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, boolean_t abnr) in extRealloc() argument
216 struct super_block *sb = ip->i_sb; in extRealloc()
223 txBeginAnon(ip->i_sb); in extRealloc()
225 down(&JFS_IP(ip)->commit_sem); in extRealloc()
243 if ((rc = xtUpdate(0, ip, xp))) in extRealloc()
255 if ((rc = extBrealloc(ip, xaddr, xlen, &nxlen, &nxaddr))) in extRealloc()
291 if ((rc = xtExtend(0, ip, xoff + xlen, (int) nextend, 0))) { in extRealloc()
292 dbFree(ip, xaddr + xlen, delta); in extRealloc()
301 if ((rc = xtTailgate(0, ip, xoff, (int) ntail, nxaddr, 0))) { in extRealloc()
302 dbFree(ip, nxaddr, nxlen); in extRealloc()
315 if (xtInsert (0, ip, xflag, xoff + ntail, (int) ninsert, in extRealloc()
317 dbFree(ip, xaddr, (s64) ninsert); in extRealloc()
325 ip->i_blocks += LBLK2PBLK(sb, delta); in extRealloc()
333 mark_inode_dirty(ip); in extRealloc()
335 up(&JFS_IP(ip)->commit_sem); in extRealloc()
356 int extHint(struct inode *ip, s64 offset, xad_t * xp) in extHint() argument
358 struct super_block *sb = ip->i_sb; in extHint()
391 if ((rc = xtLookupList(ip, &lxdl, &xadl, 0))) in extHint()
408 jfs_error(ip->i_sb, "extHint: corrupt xtree"); in extHint()
430 int extRecord(struct inode *ip, xad_t * xp) in extRecord() argument
434 txBeginAnon(ip->i_sb); in extRecord()
436 down(&JFS_IP(ip)->commit_sem); in extRecord()
439 rc = xtUpdate(0, ip, xp); in extRecord()
441 up(&JFS_IP(ip)->commit_sem); in extRecord()
462 int extFill(struct inode *ip, xad_t * xp) in extFill() argument
464 int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage; in extFill()
465 s64 blkno = offsetXAD(xp) >> ip->i_blksize; in extFill()
473 if ((rc = extAlloc(ip, nbperpage, blkno, xp, FALSE))) in extFill()
515 extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) in extBalloc() argument
517 struct jfs_inode_info *ji = JFS_IP(ip); in extBalloc()
518 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); in extBalloc()
537 while ((rc = dbAlloc(ip, hint, nb, &daddr))) { in extBalloc()
555 if (S_ISREG(ip->i_mode) && (ji->fileset == FILESYSTEM_I)) { in extBalloc()
608 extBrealloc(struct inode *ip, in extBrealloc() argument
614 if ((rc = dbExtend(ip, blkno, nblks, *newnblks - nblks)) == 0) { in extBrealloc()
625 return (extBalloc(ip, blkno, newnblks, newblkno)); in extBrealloc()