Lines Matching refs:ipbmap
165 int dbMount(struct inode *ipbmap) in dbMount() argument
181 mp = read_metapage(ipbmap, in dbMount()
182 BMAPBLKNO << JFS_SBI(ipbmap->i_sb)->l2nbperpage, in dbMount()
212 bmp->db_ipbmap = ipbmap; in dbMount()
213 JFS_SBI(ipbmap->i_sb)->bmap = bmp; in dbMount()
242 int dbUnmount(struct inode *ipbmap, int mounterror) in dbUnmount() argument
244 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbUnmount()
246 if (!(mounterror || isReadOnly(ipbmap))) in dbUnmount()
247 dbSync(ipbmap); in dbUnmount()
252 truncate_inode_pages(ipbmap->i_mapping, 0); in dbUnmount()
263 int dbSync(struct inode *ipbmap) in dbSync() argument
266 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbSync()
274 mp = read_metapage(ipbmap, in dbSync()
275 BMAPBLKNO << JFS_SBI(ipbmap->i_sb)->l2nbperpage, in dbSync()
306 filemap_write_and_wait(ipbmap->i_mapping); in dbSync()
308 diWriteSpecial(ipbmap, 0); in dbSync()
337 struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; in dbFree() local
339 struct super_block *sb = ipbmap->i_sb; in dbFree()
341 IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); in dbFree()
345 IREAD_UNLOCK(ipbmap); in dbFree()
358 jfs_issue_discard(ipbmap, blkno, nblocks); in dbFree()
372 mp = read_metapage(ipbmap, lblkno, PSIZE, 0); in dbFree()
374 IREAD_UNLOCK(ipbmap); in dbFree()
388 IREAD_UNLOCK(ipbmap); in dbFree()
396 IREAD_UNLOCK(ipbmap); in dbFree()
424 dbUpdatePMap(struct inode *ipbmap, in dbUpdatePMap() argument
429 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbUpdatePMap()
443 jfs_error(ipbmap->i_sb, "blocks are outside the map\n"); in dbUpdatePMap()
603 int dbNextAG(struct inode *ipbmap) in dbNextAG() argument
610 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbNextAG()
703 struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; in dbAlloc() local
735 IWRITE_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAlloc()
776 IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAlloc()
782 mp = read_metapage(ipbmap, lblkno, PSIZE, 0); in dbAlloc()
810 IREAD_UNLOCK(ipbmap); in dbAlloc()
840 IREAD_UNLOCK(ipbmap); in dbAlloc()
846 IWRITE_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAlloc()
850 IWRITE_UNLOCK(ipbmap); in dbAlloc()
857 agno = dbNextAG(ipbmap); in dbAlloc()
858 IWRITE_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAlloc()
867 IWRITE_UNLOCK(ipbmap); in dbAlloc()
872 IREAD_UNLOCK(ipbmap); in dbAlloc()
896 struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; in dbAllocExact() local
902 IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAllocExact()
912 IREAD_UNLOCK(ipbmap); in dbAllocExact()
918 IREAD_UNLOCK(ipbmap); in dbAllocExact()
924 mp = read_metapage(ipbmap, lblkno, PSIZE, 0); in dbAllocExact()
926 IREAD_UNLOCK(ipbmap); in dbAllocExact()
934 IREAD_UNLOCK(ipbmap); in dbAllocExact()
1034 struct inode *ipbmap = sbi->ipbmap; in dbExtend() local
1052 IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); in dbExtend()
1057 IREAD_UNLOCK(ipbmap); in dbExtend()
1072 IREAD_UNLOCK(ipbmap); in dbExtend()
1080 mp = read_metapage(ipbmap, lblkno, PSIZE, 0); in dbExtend()
1082 IREAD_UNLOCK(ipbmap); in dbExtend()
1093 IREAD_UNLOCK(ipbmap); in dbExtend()
1621 struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; in dbDiscardAG() local
1626 struct super_block *sb = ipbmap->i_sb; in dbDiscardAG()
1638 IWRITE_LOCK(ipbmap, RDWRLOCK_DMAP); in dbDiscardAG()
1647 IWRITE_UNLOCK(ipbmap); in dbDiscardAG()
1683 IWRITE_UNLOCK(ipbmap); in dbDiscardAG()
3214 struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap; in dbAllocBottomUp() local
3217 IREAD_LOCK(ipbmap, RDWRLOCK_DMAP); in dbAllocBottomUp()
3234 mp = read_metapage(ipbmap, lblkno, PSIZE, 0); in dbAllocBottomUp()
3236 IREAD_UNLOCK(ipbmap); in dbAllocBottomUp()
3249 IREAD_UNLOCK(ipbmap); in dbAllocBottomUp()
3257 IREAD_UNLOCK(ipbmap); in dbAllocBottomUp()
3384 int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) in dbExtendFS() argument
3386 struct jfs_sb_info *sbi = JFS_SBI(ipbmap->i_sb); in dbExtendFS()
3468 l2mp = read_metapage(ipbmap, p, PSIZE, 0); in dbExtendFS()
3470 jfs_error(ipbmap->i_sb, "L2 page could not be read\n"); in dbExtendFS()
3487 l1mp = read_metapage(ipbmap, p, PSIZE, 0); in dbExtendFS()
3499 l1mp = get_metapage(ipbmap, p, PSIZE, 0); in dbExtendFS()
3519 l0mp = read_metapage(ipbmap, p, PSIZE, 0); in dbExtendFS()
3533 l0mp = get_metapage(ipbmap, p, PSIZE, 0); in dbExtendFS()
3555 mp = read_metapage(ipbmap, p, in dbExtendFS()
3562 mp = read_metapage(ipbmap, p, in dbExtendFS()
3635 jfs_error(ipbmap->i_sb, "function has not returned as expected\n"); in dbExtendFS()
3656 void dbFinalizeBmap(struct inode *ipbmap) in dbFinalizeBmap() argument
3658 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbFinalizeBmap()
3704 jfs_error(ipbmap->i_sb, in dbFinalizeBmap()
4052 s64 dbMapFileSizeToMapSize(struct inode * ipbmap) in dbMapFileSizeToMapSize() argument
4054 struct super_block *sb = ipbmap->i_sb; in dbMapFileSizeToMapSize()
4060 nblocks = ipbmap->i_size >> JFS_SBI(sb)->l2bsize; in dbMapFileSizeToMapSize()