• Home
  • Raw
  • Download

Lines Matching refs:uspi

99 	struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;  in ufs_nfs_get_inode()  local
102 if (ino < UFS_ROOTINO || ino > (u64)uspi->s_ncg * uspi->s_ipg) in ufs_nfs_get_inode()
273 struct ufs_sb_private_info * uspi; in ufs_error() local
278 uspi = UFS_SB(sb)->s_uspi; in ufs_error()
279 usb1 = ubh_get_usb_first(uspi); in ufs_error()
283 ubh_mark_buffer_dirty(USPI_UBH(uspi)); in ufs_error()
307 struct ufs_sb_private_info * uspi; in ufs_panic() local
312 uspi = UFS_SB(sb)->s_uspi; in ufs_panic()
313 usb1 = ubh_get_usb_first(uspi); in ufs_panic()
317 ubh_mark_buffer_dirty(USPI_UBH(uspi)); in ufs_panic()
471 struct ufs_sb_private_info *uspi = sbi->s_uspi; in ufs_setup_cstotal() local
478 usb1 = ubh_get_usb_first(uspi); in ufs_setup_cstotal()
479 usb2 = ubh_get_usb_second(uspi); in ufs_setup_cstotal()
480 usb3 = ubh_get_usb_third(uspi); in ufs_setup_cstotal()
486 uspi->cs_total.cs_ndir = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir); in ufs_setup_cstotal()
487 uspi->cs_total.cs_nbfree = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree); in ufs_setup_cstotal()
488 uspi->cs_total.cs_nifree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree); in ufs_setup_cstotal()
489 uspi->cs_total.cs_nffree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree); in ufs_setup_cstotal()
491 uspi->cs_total.cs_ndir = fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir); in ufs_setup_cstotal()
492 uspi->cs_total.cs_nbfree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree); in ufs_setup_cstotal()
493 uspi->cs_total.cs_nifree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree); in ufs_setup_cstotal()
494 uspi->cs_total.cs_nffree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree); in ufs_setup_cstotal()
505 struct ufs_sb_private_info *uspi = sbi->s_uspi; in ufs_read_cylinder_structures() local
516 size = uspi->s_cssize; in ufs_read_cylinder_structures()
517 blks = (size + uspi->s_fsize - 1) >> uspi->s_fshift; in ufs_read_cylinder_structures()
522 for (i = 0; i < blks; i += uspi->s_fpb) { in ufs_read_cylinder_structures()
523 size = uspi->s_bsize; in ufs_read_cylinder_structures()
524 if (i + uspi->s_fpb > blks) in ufs_read_cylinder_structures()
525 size = (blks - i) * uspi->s_fsize; in ufs_read_cylinder_structures()
527 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_read_cylinder_structures()
543 if (!(sbi->s_ucg = kmalloc (sizeof(struct buffer_head *) * uspi->s_ncg, GFP_NOFS))) in ufs_read_cylinder_structures()
545 for (i = 0; i < uspi->s_ncg; i++) in ufs_read_cylinder_structures()
551 for (i = 0; i < uspi->s_ncg; i++) { in ufs_read_cylinder_structures()
572 for (i = 0; i < uspi->s_ncg; i++) in ufs_read_cylinder_structures()
589 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_put_cstotal() local
595 usb1 = ubh_get_usb_first(uspi); in ufs_put_cstotal()
596 usb2 = ubh_get_usb_second(uspi); in ufs_put_cstotal()
597 usb3 = ubh_get_usb_third(uspi); in ufs_put_cstotal()
604 cpu_to_fs64(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
606 cpu_to_fs64(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
608 cpu_to_fs64(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
610 cpu_to_fs64(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
613 cpu_to_fs32(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
615 cpu_to_fs32(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
617 cpu_to_fs32(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
619 cpu_to_fs32(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
621 ubh_mark_buffer_dirty(USPI_UBH(uspi)); in ufs_put_cstotal()
635 struct ufs_sb_private_info *uspi = sbi->s_uspi; in ufs_put_super_internal() local
644 size = uspi->s_cssize; in ufs_put_super_internal()
645 blks = (size + uspi->s_fsize - 1) >> uspi->s_fshift; in ufs_put_super_internal()
647 for (i = 0; i < blks; i += uspi->s_fpb) { in ufs_put_super_internal()
648 size = uspi->s_bsize; in ufs_put_super_internal()
649 if (i + uspi->s_fpb > blks) in ufs_put_super_internal()
650 size = (blks - i) * uspi->s_fsize; in ufs_put_super_internal()
652 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_put_super_internal()
666 for (i = 0; i < uspi->s_ncg; i++) in ufs_put_super_internal()
676 struct ufs_sb_private_info * uspi; in ufs_sync_fs() local
686 uspi = UFS_SB(sb)->s_uspi; in ufs_sync_fs()
687 usb1 = ubh_get_usb_first(uspi); in ufs_sync_fs()
688 usb3 = ubh_get_usb_third(uspi); in ufs_sync_fs()
751 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_max_bytes() local
752 int bits = uspi->s_apbshift; in ufs_max_bytes()
761 if (res >= (MAX_LFS_FILESIZE >> uspi->s_bshift)) in ufs_max_bytes()
763 return res << uspi->s_bshift; in ufs_max_bytes()
769 struct ufs_sb_private_info * uspi; in ufs_fill_super() local
781 uspi = NULL; in ufs_fill_super()
825 uspi = kzalloc(sizeof(struct ufs_sb_private_info), GFP_KERNEL); in ufs_fill_super()
826 sbi->s_uspi = uspi; in ufs_fill_super()
827 if (!uspi) in ufs_fill_super()
829 uspi->s_dirblksize = UFS_SECTOR_SIZE; in ufs_fill_super()
838 uspi->s_fsize = block_size = 512; in ufs_fill_super()
839 uspi->s_fmask = ~(512 - 1); in ufs_fill_super()
840 uspi->s_fshift = 9; in ufs_fill_super()
841 uspi->s_sbsize = super_block_size = 1536; in ufs_fill_super()
842 uspi->s_sbbase = 0; in ufs_fill_super()
848 uspi->s_fsize = block_size = 512; in ufs_fill_super()
849 uspi->s_fmask = ~(512 - 1); in ufs_fill_super()
850 uspi->s_fshift = 9; in ufs_fill_super()
851 uspi->s_sbsize = super_block_size = 1536; in ufs_fill_super()
852 uspi->s_sbbase = 0; in ufs_fill_super()
858 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
859 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
860 uspi->s_fshift = 10; in ufs_fill_super()
861 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
862 uspi->s_sbbase = 0; in ufs_fill_super()
863 uspi->s_maxsymlinklen = 0; /* Not supported on disk */ in ufs_fill_super()
869 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
870 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
871 uspi->s_fshift = 10; in ufs_fill_super()
872 uspi->s_sbsize = 2048; in ufs_fill_super()
874 uspi->s_sbbase = 0; in ufs_fill_super()
875 uspi->s_maxsymlinklen = 0; /* Not supported on disk */ in ufs_fill_super()
881 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
882 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
883 uspi->s_fshift = 10; in ufs_fill_super()
884 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
885 uspi->s_sbbase = 0; in ufs_fill_super()
886 uspi->s_maxsymlinklen = 0; /* Not supported on disk */ in ufs_fill_super()
892 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
893 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
894 uspi->s_fshift = 10; in ufs_fill_super()
895 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
896 uspi->s_sbbase = 0; in ufs_fill_super()
907 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
908 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
909 uspi->s_fshift = 10; in ufs_fill_super()
910 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
911 uspi->s_sbbase = 0; in ufs_fill_super()
912 uspi->s_dirblksize = 1024; in ufs_fill_super()
923 uspi->s_fsize = block_size = 2048; in ufs_fill_super()
924 uspi->s_fmask = ~(2048 - 1); in ufs_fill_super()
925 uspi->s_fshift = 11; in ufs_fill_super()
926 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
927 uspi->s_sbbase = 0; in ufs_fill_super()
928 uspi->s_dirblksize = 1024; in ufs_fill_super()
939 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
940 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
941 uspi->s_fshift = 10; in ufs_fill_super()
942 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
943 uspi->s_sbbase = 0; in ufs_fill_super()
944 uspi->s_dirblksize = 1024; in ufs_fill_super()
955 uspi->s_fsize = block_size = 1024; in ufs_fill_super()
956 uspi->s_fmask = ~(1024 - 1); in ufs_fill_super()
957 uspi->s_fshift = 10; in ufs_fill_super()
958 uspi->s_sbsize = super_block_size = 2048; in ufs_fill_super()
959 uspi->s_sbbase = 0; in ufs_fill_super()
983 ubh = ubh_bread_uspi(uspi, sb, uspi->s_sbbase + super_block_offset/block_size, super_block_size); in ufs_fill_super()
988 usb1 = ubh_get_usb_first(uspi); in ufs_fill_super()
989 usb2 = ubh_get_usb_second(uspi); in ufs_fill_super()
990 usb3 = ubh_get_usb_third(uspi); in ufs_fill_super()
993 uspi->s_postblformat = fs32_to_cpu(sb, usb3->fs_postblformat); in ufs_fill_super()
995 (uspi->s_postblformat != UFS_42POSTBLFMT)) { in ufs_fill_super()
1004 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1014 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1027 && uspi->s_sbbase < 256) { in ufs_fill_super()
1028 ubh_brelse_uspi(uspi); in ufs_fill_super()
1030 uspi->s_sbbase += 8; in ufs_fill_super()
1041 uspi->s_bsize = fs32_to_cpu(sb, usb1->fs_bsize); in ufs_fill_super()
1042 uspi->s_fsize = fs32_to_cpu(sb, usb1->fs_fsize); in ufs_fill_super()
1043 uspi->s_sbsize = fs32_to_cpu(sb, usb1->fs_sbsize); in ufs_fill_super()
1044 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1045 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1047 if (!is_power_of_2(uspi->s_fsize)) { in ufs_fill_super()
1049 __func__, uspi->s_fsize); in ufs_fill_super()
1052 if (uspi->s_fsize < 512) { in ufs_fill_super()
1054 __func__, uspi->s_fsize); in ufs_fill_super()
1057 if (uspi->s_fsize > 4096) { in ufs_fill_super()
1059 __func__, uspi->s_fsize); in ufs_fill_super()
1062 if (!is_power_of_2(uspi->s_bsize)) { in ufs_fill_super()
1064 __func__, uspi->s_bsize); in ufs_fill_super()
1067 if (uspi->s_bsize < 4096) { in ufs_fill_super()
1069 __func__, uspi->s_bsize); in ufs_fill_super()
1072 if (uspi->s_bsize / uspi->s_fsize > 8) { in ufs_fill_super()
1074 __func__, uspi->s_bsize / uspi->s_fsize); in ufs_fill_super()
1077 if (uspi->s_fsize != block_size || uspi->s_sbsize != super_block_size) { in ufs_fill_super()
1078 ubh_brelse_uspi(uspi); in ufs_fill_super()
1080 block_size = uspi->s_fsize; in ufs_fill_super()
1081 super_block_size = uspi->s_sbsize; in ufs_fill_super()
1139 uspi->s_sblkno = fs32_to_cpu(sb, usb1->fs_sblkno); in ufs_fill_super()
1140 uspi->s_cblkno = fs32_to_cpu(sb, usb1->fs_cblkno); in ufs_fill_super()
1141 uspi->s_iblkno = fs32_to_cpu(sb, usb1->fs_iblkno); in ufs_fill_super()
1142 uspi->s_dblkno = fs32_to_cpu(sb, usb1->fs_dblkno); in ufs_fill_super()
1143 uspi->s_cgoffset = fs32_to_cpu(sb, usb1->fs_cgoffset); in ufs_fill_super()
1144 uspi->s_cgmask = fs32_to_cpu(sb, usb1->fs_cgmask); in ufs_fill_super()
1147 uspi->s_u2_size = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size); in ufs_fill_super()
1148 uspi->s_u2_dsize = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); in ufs_fill_super()
1150 uspi->s_size = fs32_to_cpu(sb, usb1->fs_size); in ufs_fill_super()
1151 uspi->s_dsize = fs32_to_cpu(sb, usb1->fs_dsize); in ufs_fill_super()
1154 uspi->s_ncg = fs32_to_cpu(sb, usb1->fs_ncg); in ufs_fill_super()
1157 uspi->s_fpb = fs32_to_cpu(sb, usb1->fs_frag); in ufs_fill_super()
1158 uspi->s_minfree = fs32_to_cpu(sb, usb1->fs_minfree); in ufs_fill_super()
1159 uspi->s_bmask = fs32_to_cpu(sb, usb1->fs_bmask); in ufs_fill_super()
1160 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1161 uspi->s_bshift = fs32_to_cpu(sb, usb1->fs_bshift); in ufs_fill_super()
1162 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1163 UFSD("uspi->s_bshift = %d,uspi->s_fshift = %d", uspi->s_bshift, in ufs_fill_super()
1164 uspi->s_fshift); in ufs_fill_super()
1165 uspi->s_fpbshift = fs32_to_cpu(sb, usb1->fs_fragshift); in ufs_fill_super()
1166 uspi->s_fsbtodb = fs32_to_cpu(sb, usb1->fs_fsbtodb); in ufs_fill_super()
1168 uspi->s_csmask = fs32_to_cpu(sb, usb1->fs_csmask); in ufs_fill_super()
1169 uspi->s_csshift = fs32_to_cpu(sb, usb1->fs_csshift); in ufs_fill_super()
1170 uspi->s_nindir = fs32_to_cpu(sb, usb1->fs_nindir); in ufs_fill_super()
1171 uspi->s_inopb = fs32_to_cpu(sb, usb1->fs_inopb); in ufs_fill_super()
1172 uspi->s_nspf = fs32_to_cpu(sb, usb1->fs_nspf); in ufs_fill_super()
1173 uspi->s_npsect = ufs_get_fs_npsect(sb, usb1, usb3); in ufs_fill_super()
1174 uspi->s_interleave = fs32_to_cpu(sb, usb1->fs_interleave); in ufs_fill_super()
1175 uspi->s_trackskew = fs32_to_cpu(sb, usb1->fs_trackskew); in ufs_fill_super()
1177 if (uspi->fs_magic == UFS2_MAGIC) in ufs_fill_super()
1178 uspi->s_csaddr = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_csaddr); in ufs_fill_super()
1180 uspi->s_csaddr = fs32_to_cpu(sb, usb1->fs_csaddr); in ufs_fill_super()
1182 uspi->s_cssize = fs32_to_cpu(sb, usb1->fs_cssize); in ufs_fill_super()
1183 uspi->s_cgsize = fs32_to_cpu(sb, usb1->fs_cgsize); in ufs_fill_super()
1184 uspi->s_ntrak = fs32_to_cpu(sb, usb1->fs_ntrak); in ufs_fill_super()
1185 uspi->s_nsect = fs32_to_cpu(sb, usb1->fs_nsect); in ufs_fill_super()
1186 uspi->s_spc = fs32_to_cpu(sb, usb1->fs_spc); in ufs_fill_super()
1187 uspi->s_ipg = fs32_to_cpu(sb, usb1->fs_ipg); in ufs_fill_super()
1188 uspi->s_fpg = fs32_to_cpu(sb, usb1->fs_fpg); in ufs_fill_super()
1189 uspi->s_cpc = fs32_to_cpu(sb, usb2->fs_un.fs_u1.fs_cpc); in ufs_fill_super()
1190 uspi->s_contigsumsize = fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_contigsumsize); in ufs_fill_super()
1191 uspi->s_qbmask = ufs_get_fs_qbmask(sb, usb3); in ufs_fill_super()
1192 uspi->s_qfmask = ufs_get_fs_qfmask(sb, usb3); in ufs_fill_super()
1193 uspi->s_nrpos = fs32_to_cpu(sb, usb3->fs_nrpos); in ufs_fill_super()
1194 uspi->s_postbloff = fs32_to_cpu(sb, usb3->fs_postbloff); in ufs_fill_super()
1195 uspi->s_rotbloff = fs32_to_cpu(sb, usb3->fs_rotbloff); in ufs_fill_super()
1200 uspi->s_fpbmask = uspi->s_fpb - 1; in ufs_fill_super()
1202 uspi->s_apbshift = uspi->s_bshift - 3; in ufs_fill_super()
1204 uspi->s_apbshift = uspi->s_bshift - 2; in ufs_fill_super()
1206 uspi->s_2apbshift = uspi->s_apbshift * 2; in ufs_fill_super()
1207 uspi->s_3apbshift = uspi->s_apbshift * 3; in ufs_fill_super()
1208 uspi->s_apb = 1 << uspi->s_apbshift; in ufs_fill_super()
1209 uspi->s_2apb = 1 << uspi->s_2apbshift; in ufs_fill_super()
1210 uspi->s_3apb = 1 << uspi->s_3apbshift; in ufs_fill_super()
1211 uspi->s_apbmask = uspi->s_apb - 1; in ufs_fill_super()
1212 uspi->s_nspfshift = uspi->s_fshift - UFS_SECTOR_BITS; in ufs_fill_super()
1213 uspi->s_nspb = uspi->s_nspf << uspi->s_fpbshift; in ufs_fill_super()
1214 uspi->s_inopf = uspi->s_inopb >> uspi->s_fpbshift; in ufs_fill_super()
1215 uspi->s_bpf = uspi->s_fsize << 3; in ufs_fill_super()
1216 uspi->s_bpfshift = uspi->s_fshift + 3; in ufs_fill_super()
1217 uspi->s_bpfmask = uspi->s_bpf - 1; in ufs_fill_super()
1220 uspi->s_maxsymlinklen = in ufs_fill_super()
1223 if (uspi->fs_magic == UFS2_MAGIC) in ufs_fill_super()
1227 if (uspi->s_maxsymlinklen > maxsymlen) { in ufs_fill_super()
1229 "fast symlink size (%u)\n", uspi->s_maxsymlinklen); in ufs_fill_super()
1230 uspi->s_maxsymlinklen = maxsymlen; in ufs_fill_super()
1259 ubh_brelse_uspi (uspi); in ufs_fill_super()
1260 kfree (uspi); in ufs_fill_super()
1273 struct ufs_sb_private_info * uspi; in ufs_remount() local
1281 uspi = UFS_SB(sb)->s_uspi; in ufs_remount()
1283 usb1 = ubh_get_usb_first(uspi); in ufs_remount()
1284 usb3 = ubh_get_usb_third(uspi); in ufs_remount()
1322 ubh_mark_buffer_dirty (USPI_UBH(uspi)); in ufs_remount()
1378 struct ufs_sb_private_info *uspi= UFS_SB(sb)->s_uspi; in ufs_statfs() local
1384 usb3 = ubh_get_usb_third(uspi); in ufs_statfs()
1391 buf->f_blocks = uspi->s_dsize; in ufs_statfs()
1393 buf->f_bfree = ufs_blkstofrags(uspi->cs_total.cs_nbfree) + in ufs_statfs()
1394 uspi->cs_total.cs_nffree; in ufs_statfs()
1395 buf->f_ffree = uspi->cs_total.cs_nifree; in ufs_statfs()
1397 buf->f_bavail = (buf->f_bfree > (((long)buf->f_blocks / 100) * uspi->s_minfree)) in ufs_statfs()
1398 ? (buf->f_bfree - (((long)buf->f_blocks / 100) * uspi->s_minfree)) : 0; in ufs_statfs()
1399 buf->f_files = uspi->s_ncg * uspi->s_ipg; in ufs_statfs()