Lines Matching refs:ip
86 extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) in extAlloc() argument
88 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); in extAlloc()
94 txBeginAnon(ip->i_sb); in extAlloc()
97 mutex_lock(&JFS_IP(ip)->commit_mutex); in extAlloc()
138 if ((rc = extBalloc(ip, hint ? hint : INOHINT(ip), &nxlen, &nxaddr))) { in extAlloc()
139 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc()
144 rc = dquot_alloc_block(ip, nxlen); in extAlloc()
146 dbFree(ip, nxaddr, (s64) nxlen); in extAlloc()
147 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc()
159 rc = xtExtend(0, ip, xoff, (int) nxlen, 0); in extAlloc()
161 rc = xtInsert(0, ip, xflag, xoff, (int) nxlen, &nxaddr, 0); in extAlloc()
167 dbFree(ip, nxaddr, nxlen); in extAlloc()
168 dquot_free_block(ip, nxlen); in extAlloc()
169 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc()
179 mark_inode_dirty(ip); in extAlloc()
181 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc()
187 if (test_and_clear_cflag(COMMIT_Synclist,ip)) in extAlloc()
188 jfs_commit_inode(ip, 0); in extAlloc()
215 int extRealloc(struct inode *ip, s64 nxlen, xad_t * xp, bool abnr) in extRealloc() argument
217 struct super_block *sb = ip->i_sb; in extRealloc()
224 txBeginAnon(ip->i_sb); in extRealloc()
226 mutex_lock(&JFS_IP(ip)->commit_mutex); in extRealloc()
244 if ((rc = xtUpdate(0, ip, xp))) in extRealloc()
256 if ((rc = extBrealloc(ip, xaddr, xlen, &nxlen, &nxaddr))) in extRealloc()
260 rc = dquot_alloc_block(ip, nxlen); in extRealloc()
262 dbFree(ip, nxaddr, (s64) nxlen); in extRealloc()
263 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extRealloc()
300 if ((rc = xtExtend(0, ip, xoff + xlen, (int) nextend, 0))) { in extRealloc()
301 dbFree(ip, xaddr + xlen, delta); in extRealloc()
302 dquot_free_block(ip, nxlen); in extRealloc()
311 if ((rc = xtTailgate(0, ip, xoff, (int) ntail, nxaddr, 0))) { in extRealloc()
312 dbFree(ip, nxaddr, nxlen); in extRealloc()
313 dquot_free_block(ip, nxlen); in extRealloc()
326 if (xtInsert (0, ip, xflag, xoff + ntail, (int) ninsert, in extRealloc()
328 dbFree(ip, xaddr, (s64) ninsert); in extRealloc()
341 mark_inode_dirty(ip); in extRealloc()
343 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extRealloc()
364 int extHint(struct inode *ip, s64 offset, xad_t * xp) in extHint() argument
366 struct super_block *sb = ip->i_sb; in extHint()
387 rc = xtLookup(ip, prev, nbperpage, &xflag, &xaddr, &xlen, 0); in extHint()
391 jfs_error(ip->i_sb, "corrupt xtree\n"); in extHint()
424 int extRecord(struct inode *ip, xad_t * xp) in extRecord() argument
428 txBeginAnon(ip->i_sb); in extRecord()
430 mutex_lock(&JFS_IP(ip)->commit_mutex); in extRecord()
433 rc = xtUpdate(0, ip, xp); in extRecord()
435 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extRecord()
456 int extFill(struct inode *ip, xad_t * xp) in extFill() argument
458 int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage; in extFill()
459 s64 blkno = offsetXAD(xp) >> ip->i_blkbits; in extFill()
467 if ((rc = extAlloc(ip, nbperpage, blkno, xp, false))) in extFill()
509 extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) in extBalloc() argument
511 struct jfs_inode_info *ji = JFS_IP(ip); in extBalloc()
512 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); in extBalloc()
531 while ((rc = dbAlloc(ip, hint, nb, &daddr)) != 0) { in extBalloc()
549 if (S_ISREG(ip->i_mode) && (ji->fileset == FILESYSTEM_I)) { in extBalloc()
602 extBrealloc(struct inode *ip, in extBrealloc() argument
608 if ((rc = dbExtend(ip, blkno, nblks, *newnblks - nblks)) == 0) { in extBrealloc()
619 return (extBalloc(ip, blkno, newnblks, newblkno)); in extBrealloc()