Lines Matching refs:ipimap
94 int diMount(struct inode *ipimap) in diMount() argument
111 mp = read_metapage(ipimap, in diMount()
112 IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage, in diMount()
155 imap->im_ipimap = ipimap; in diMount()
156 JFS_IP(ipimap)->i_imap = imap; in diMount()
176 int diUnmount(struct inode *ipimap, int mounterror) in diUnmount() argument
178 struct inomap *imap = JFS_IP(ipimap)->i_imap; in diUnmount()
184 if (!(mounterror || isReadOnly(ipimap))) in diUnmount()
185 diSync(ipimap); in diUnmount()
190 truncate_inode_pages(ipimap->i_mapping, 0); in diUnmount()
204 int diSync(struct inode *ipimap) in diSync() argument
207 struct inomap *imp = JFS_IP(ipimap)->i_imap; in diSync()
215 mp = get_metapage(ipimap, in diSync()
216 IMAPBLKNO << JFS_SBI(ipimap->i_sb)->l2nbperpage, in diSync()
248 filemap_write_and_wait(ipimap->i_mapping); in diSync()
250 diWriteSpecial(ipimap, 0); in diSync()
293 struct inode *ipimap; in diRead() local
306 ipimap = sbi->ipimap; in diRead()
307 JFS_IP(ip)->ipimap = ipimap; in diRead()
313 imap = JFS_IP(ipimap)->i_imap; in diRead()
314 IREAD_LOCK(ipimap, RDWRLOCK_IMAP); in diRead()
316 IREAD_UNLOCK(ipimap); in diRead()
363 mp = read_metapage(ipimap, pageno << sbi->l2nbperpage, PSIZE, 1); in diRead()
430 JFS_IP(ip)->ipimap = sbi->ipaimap2; in diReadSpecial()
433 JFS_IP(ip)->ipimap = sbi->ipaimap; in diReadSpecial()
471 if ((inum == FILESYSTEM_I) && (JFS_IP(ip)->ipimap == sbi->ipaimap)) { in diReadSpecial()
591 struct inode *ipimap; in diWrite() local
599 ipimap = jfs_ip->ipimap; in diWrite()
605 JFS_IP(ipimap)->i_imap->im_nbperiext)) { in diWrite()
635 mp = read_metapage(ipimap, pageno << sbi->l2nbperpage, PSIZE, 1); in diWrite()
650 txLock(tid, ipimap, mp, tlckINODE | tlckENTRY)) == NULL) in diWrite()
850 struct inode *ipimap = JFS_SBI(ip->i_sb)->ipimap; in diFree() local
851 struct inomap *imap = JFS_IP(ipimap)->i_imap; in diFree()
890 IREAD_LOCK(ipimap, RDWRLOCK_IMAP); in diFree()
895 IREAD_UNLOCK(ipimap); in diFree()
915 IREAD_UNLOCK(ipimap); in diFree()
927 IREAD_UNLOCK(ipimap); in diFree()
956 IREAD_UNLOCK(ipimap); in diFree()
978 IREAD_UNLOCK(ipimap); in diFree()
1111 IREAD_UNLOCK(ipimap); in diFree()
1227 tid = txBegin(ipimap->i_sb, COMMIT_FORCE); in diFree()
1228 mutex_lock(&JFS_IP(ipimap)->commit_mutex); in diFree()
1237 tlck = txLock(tid, ipimap, mp, tlckINODE | tlckFREE); in diFree()
1245 iplist[0] = ipimap; in diFree()
1261 mutex_unlock(&JFS_IP(ipimap)->commit_mutex); in diFree()
1269 IREAD_UNLOCK(ipimap); in diFree()
1324 struct inode *ipimap; in diAlloc() local
1333 ipimap = JFS_SBI(pip->i_sb)->ipimap; in diAlloc()
1334 imap = JFS_IP(ipimap)->i_imap; in diAlloc()
1335 JFS_IP(ip)->ipimap = ipimap; in diAlloc()
1381 IREAD_LOCK(ipimap, RDWRLOCK_IMAP); in diAlloc()
1386 IREAD_UNLOCK(ipimap); in diAlloc()
1424 IREAD_UNLOCK(ipimap); in diAlloc()
1493 IREAD_UNLOCK(ipimap); in diAlloc()
1507 IREAD_UNLOCK(ipimap); in diAlloc()
1561 IREAD_UNLOCK(ipimap); in diAlloc()
1574 IREAD_UNLOCK(ipimap); in diAlloc()
2153 struct inode *ipimap; in diNewExt() local
2170 ipimap = imap->im_ipimap; in diNewExt()
2171 sbi = JFS_SBI(ipimap->i_sb); in diNewExt()
2251 if ((rc = dbAlloc(ipimap, hint, (s64) imap->im_nbperiext, &blkno))) in diNewExt()
2265 dmp = get_metapage(ipimap, blkno + i, PSIZE, 1); in diNewExt()
2434 struct inode *ipimap; in diNewIAG() local
2445 ipimap = imap->im_ipimap; in diNewIAG()
2446 sb = ipimap->i_sb; in diNewIAG()
2467 IWRITE_LOCK(ipimap, RDWRLOCK_IMAP); in diNewIAG()
2469 if (ipimap->i_size >> L2PSIZE != imap->im_nextiag + 1) { in diNewIAG()
2470 IWRITE_UNLOCK(ipimap); in diNewIAG()
2486 IWRITE_UNLOCK(ipimap); in diNewIAG()
2500 if ((rc = dbAlloc(ipimap, 0, (s64) xlen, &xaddr))) { in diNewIAG()
2502 IWRITE_UNLOCK(ipimap); in diNewIAG()
2512 mutex_lock(&JFS_IP(ipimap)->commit_mutex); in diNewIAG()
2516 xtInsert(tid, ipimap, 0, blkno, xlen, &xaddr, 0))) { in diNewIAG()
2518 mutex_unlock(&JFS_IP(ipimap)->commit_mutex); in diNewIAG()
2522 dbFree(ipimap, xaddr, (s64) xlen); in diNewIAG()
2525 IWRITE_UNLOCK(ipimap); in diNewIAG()
2531 ipimap->i_size += PSIZE; in diNewIAG()
2532 inode_add_bytes(ipimap, PSIZE); in diNewIAG()
2535 mp = get_metapage(ipimap, blkno, PSIZE, 0); in diNewIAG()
2541 xtTruncate(tid, ipimap, ipimap->i_size - PSIZE, in diNewIAG()
2546 mutex_unlock(&JFS_IP(ipimap)->commit_mutex); in diNewIAG()
2549 IWRITE_UNLOCK(ipimap); in diNewIAG()
2581 iplist[0] = ipimap; in diNewIAG()
2585 mutex_unlock(&JFS_IP(ipimap)->commit_mutex); in diNewIAG()
2600 diSync(ipimap); in diNewIAG()
2603 IWRITE_UNLOCK(ipimap); in diNewIAG()
2607 IREAD_LOCK(ipimap, RDWRLOCK_IMAP); in diNewIAG()
2611 IREAD_UNLOCK(ipimap); in diNewIAG()
2655 struct inode *ipimap = imap->im_ipimap; in diIAGRead() local
2659 blkno = IAGTOLBLK(iagno, JFS_SBI(ipimap->i_sb)->l2nbperpage); in diIAGRead()
2662 *mpp = read_metapage(ipimap, blkno, PSIZE, 0); in diIAGRead()
2715 diUpdatePMap(struct inode *ipimap, in diUpdatePMap() argument
2728 imap = JFS_IP(ipimap)->i_imap; in diUpdatePMap()
2733 jfs_error(ipimap->i_sb, "the iag is outside the map\n"); in diUpdatePMap()
2737 IREAD_LOCK(ipimap, RDWRLOCK_IMAP); in diUpdatePMap()
2739 IREAD_UNLOCK(ipimap); in diUpdatePMap()
2761 jfs_error(ipimap->i_sb, in diUpdatePMap()
2766 jfs_error(ipimap->i_sb, in diUpdatePMap()
2782 jfs_error(ipimap->i_sb, in diUpdatePMap()
2788 jfs_error(ipimap->i_sb, in diUpdatePMap()
2837 int diExtendFS(struct inode *ipimap, struct inode *ipbmap) in diExtendFS() argument
2840 struct inomap *imap = JFS_IP(ipimap)->i_imap; in diExtendFS()
2881 jfs_error(ipimap->i_sb, "unexpected value of iagnum\n"); in diExtendFS()
2957 jfs_error(ipimap->i_sb, "numinos or numfree incorrect\n"); in diExtendFS()