/Linux-v6.1/fs/ufs/ |
D | super.c | 101 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_nfs_get_inode() local 104 if (ino < UFS_ROOTINO || ino > (u64)uspi->s_ncg * uspi->s_ipg) in ufs_nfs_get_inode() 274 struct ufs_sb_private_info * uspi; in ufs_error() local 279 uspi = UFS_SB(sb)->s_uspi; in ufs_error() 280 usb1 = ubh_get_usb_first(uspi); in ufs_error() 284 ubh_mark_buffer_dirty(USPI_UBH(uspi)); in ufs_error() 308 struct ufs_sb_private_info * uspi; in ufs_panic() local 313 uspi = UFS_SB(sb)->s_uspi; in ufs_panic() 314 usb1 = ubh_get_usb_first(uspi); in ufs_panic() 318 ubh_mark_buffer_dirty(USPI_UBH(uspi)); in ufs_panic() [all …]
|
D | balloc.c | 42 struct ufs_sb_private_info * uspi; in ufs_free_fragments() local 49 uspi = UFS_SB(sb)->s_uspi; in ufs_free_fragments() 54 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments() 59 cgno = ufs_dtog(uspi, fragment); in ufs_free_fragments() 60 bit = ufs_dtogd(uspi, fragment); in ufs_free_fragments() 61 if (cgno >= uspi->s_ncg) { in ufs_free_fragments() 87 inode_sub_bytes(inode, count << uspi->s_fshift); in ufs_free_fragments() 89 uspi->cs_total.cs_nffree += count; in ufs_free_fragments() 99 fs32_sub(sb, &ucg->cg_cs.cs_nffree, uspi->s_fpb); in ufs_free_fragments() 100 uspi->cs_total.cs_nffree -= uspi->s_fpb; in ufs_free_fragments() [all …]
|
D | util.h | 266 #define ubh_bread(sb,fragment,size) _ubh_bread_(uspi,sb,fragment,size) 276 #define ubh_ubhcpymem(mem,ubh,size) _ubh_ubhcpymem_(uspi,mem,ubh,size) 278 #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) 295 static inline void *get_usb_offset(struct ufs_sb_private_info *uspi, in get_usb_offset() argument 300 index = offset >> uspi->s_fshift; in get_usb_offset() 301 offset &= ~uspi->s_fmask; in get_usb_offset() 302 return uspi->s_ubh.bh[index]->b_data + offset; in get_usb_offset() 305 #define ubh_get_usb_first(uspi) \ argument 306 ((struct ufs_super_block_first *)get_usb_offset((uspi), 0)) 308 #define ubh_get_usb_second(uspi) \ argument [all …]
|
D | util.c | 19 struct ufs_buffer_head * _ubh_bread_ (struct ufs_sb_private_info * uspi, in _ubh_bread_() argument 25 if (size & ~uspi->s_fmask) in _ubh_bread_() 27 count = size >> uspi->s_fshift; in _ubh_bread_() 48 struct ufs_buffer_head * ubh_bread_uspi (struct ufs_sb_private_info * uspi, in ubh_bread_uspi() argument 53 if (size & ~uspi->s_fmask) in ubh_bread_uspi() 55 count = size >> uspi->s_fshift; in ubh_bread_uspi() 58 USPI_UBH(uspi)->fragment = fragment; in ubh_bread_uspi() 59 USPI_UBH(uspi)->count = count; in ubh_bread_uspi() 61 if (!(USPI_UBH(uspi)->bh[i] = sb_bread(sb, fragment + i))) in ubh_bread_uspi() 64 USPI_UBH(uspi)->bh[i] = NULL; in ubh_bread_uspi() [all …]
|
D | ialloc.c | 60 struct ufs_sb_private_info * uspi; in ufs_free_inode() local 69 uspi = UFS_SB(sb)->s_uspi; in ufs_free_inode() 75 if (!((ino > 1) && (ino < (uspi->s_ncg * uspi->s_ipg )))) { in ufs_free_inode() 103 uspi->cs_total.cs_nifree++; in ufs_free_inode() 108 uspi->cs_total.cs_ndir--; in ufs_free_inode() 113 ubh_mark_buffer_dirty (USPI_UBH(uspi)); in ufs_free_inode() 134 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs2_init_inodes_chunk() local 135 sector_t beg = uspi->s_sbbase + in ufs2_init_inodes_chunk() 136 ufs_inotofsba(ucpi->c_cgx * uspi->s_ipg + in ufs2_init_inodes_chunk() 138 sector_t end = beg + uspi->s_fpb; in ufs2_init_inodes_chunk() [all …]
|
D | ufs_fs.h | 134 #define UFS_NDIR_FRAGMENT (UFS_NDADDR << uspi->s_fpbshift) 135 #define UFS_IND_FRAGMENT (UFS_IND_BLOCK << uspi->s_fpbshift) 136 #define UFS_DIND_FRAGMENT (UFS_DIND_BLOCK << uspi->s_fpbshift) 137 #define UFS_TIND_FRAGMENT (UFS_TIND_BLOCK << uspi->s_fpbshift) 208 #define ufs_fsbtodb(uspi, b) ((b) << (uspi)->s_fsbtodb) argument 209 #define ufs_dbtofsb(uspi, b) ((b) >> (uspi)->s_fsbtodb) argument 215 #define ufs_cgbase(c) (uspi->s_fpg * (c)) 216 #define ufs_cgstart(c) ((uspi)->fs_magic == UFS2_MAGIC ? ufs_cgbase(c) : \ 217 (ufs_cgbase(c) + uspi->s_cgoffset * ((c) & ~uspi->s_cgmask))) 218 #define ufs_cgsblock(c) (ufs_cgstart(c) + uspi->s_sblkno) /* super blk */ [all …]
|
D | inode.c | 48 struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; in ufs_block_to_path() local 49 int ptrs = uspi->s_apb; in ufs_block_to_path() 50 int ptrs_bits = uspi->s_apbshift; in ufs_block_to_path() 128 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_frag_map() local 129 u64 mask = (u64) uspi->s_apbmask>>uspi->s_fpbshift; in ufs_frag_map() 130 int shift = uspi->s_apbshift-uspi->s_fpbshift; in ufs_frag_map() 137 uspi->s_fpbshift, uspi->s_apbmask, in ufs_frag_map() 158 bh = sb_bread(sb, uspi->s_sbbase + in ufs_frag_map() 182 bh = sb_bread(sb, uspi->s_sbbase + in ufs_frag_map() 194 res += uspi->s_sbbase; in ufs_frag_map() [all …]
|
D | cylinder.c | 33 struct ufs_sb_private_info * uspi; in ufs_read_cylinder() local 39 uspi = sbi->s_uspi; in ufs_read_cylinder() 44 UCPI_UBH(ucpi)->count = uspi->s_cgsize >> sb->s_blocksize_bits; in ufs_read_cylinder() 86 struct ufs_sb_private_info * uspi; in ufs_put_cylinder() local 93 uspi = sbi->s_uspi; in ufs_put_cylinder() 101 if (uspi->s_ncg > UFS_MAX_GROUP_LOADED && bitmap_nr >= sbi->s_cg_loaded) { in ufs_put_cylinder() 131 struct ufs_sb_private_info * uspi; in ufs_load_cylinder() local 137 uspi = sbi->s_uspi; in ufs_load_cylinder() 138 if (cgno >= uspi->s_ncg) { in ufs_load_cylinder() 152 if (uspi->s_ncg <= UFS_MAX_GROUP_LOADED) { in ufs_load_cylinder()
|
D | ufs.h | 156 static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b) in ufs_dtog() argument 158 do_div(b, uspi->s_fpg); in ufs_dtog() 162 static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b) in ufs_dtogd() argument 164 return do_div(b, uspi->s_fpg); in ufs_dtogd()
|