• Home
  • Raw
  • Download

Lines Matching refs:sb

97 void lock_ufs(struct super_block *sb)  in lock_ufs()  argument
100 struct ufs_sb_info *sbi = UFS_SB(sb); in lock_ufs()
107 void unlock_ufs(struct super_block *sb) in unlock_ufs() argument
110 struct ufs_sb_info *sbi = UFS_SB(sb); in unlock_ufs()
117 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) in ufs_nfs_get_inode() argument
119 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_nfs_get_inode()
125 inode = ufs_iget(sb, ino); in ufs_nfs_get_inode()
135 static struct dentry *ufs_fh_to_dentry(struct super_block *sb, struct fid *fid, in ufs_fh_to_dentry() argument
138 return generic_fh_to_dentry(sb, fid, fh_len, fh_type, ufs_nfs_get_inode); in ufs_fh_to_dentry()
141 static struct dentry *ufs_fh_to_parent(struct super_block *sb, struct fid *fid, in ufs_fh_to_parent() argument
144 return generic_fh_to_parent(sb, fid, fh_len, fh_type, ufs_nfs_get_inode); in ufs_fh_to_parent()
168 static void ufs_print_super_stuff(struct super_block *sb, in ufs_print_super_stuff() argument
173 u32 magic = fs32_to_cpu(sb, usb3->fs_magic); in ufs_print_super_stuff()
177 if (fs32_to_cpu(sb, usb3->fs_magic) == UFS2_MAGIC) { in ufs_print_super_stuff()
179 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size)); in ufs_print_super_stuff()
181 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize)); in ufs_print_super_stuff()
183 fs32_to_cpu(sb, usb1->fs_bsize)); in ufs_print_super_stuff()
185 fs32_to_cpu(sb, usb1->fs_fsize)); in ufs_print_super_stuff()
188 fs64_to_cpu(sb, usb2->fs_un.fs_u2.fs_sblockloc)); in ufs_print_super_stuff()
190 fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir)); in ufs_print_super_stuff()
193 fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree)); in ufs_print_super_stuff()
196 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree)); in ufs_print_super_stuff()
199 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree)); in ufs_print_super_stuff()
201 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen)); in ufs_print_super_stuff()
203 printk(" sblkno: %u\n", fs32_to_cpu(sb, usb1->fs_sblkno)); in ufs_print_super_stuff()
204 printk(" cblkno: %u\n", fs32_to_cpu(sb, usb1->fs_cblkno)); in ufs_print_super_stuff()
205 printk(" iblkno: %u\n", fs32_to_cpu(sb, usb1->fs_iblkno)); in ufs_print_super_stuff()
206 printk(" dblkno: %u\n", fs32_to_cpu(sb, usb1->fs_dblkno)); in ufs_print_super_stuff()
208 fs32_to_cpu(sb, usb1->fs_cgoffset)); in ufs_print_super_stuff()
210 ~fs32_to_cpu(sb, usb1->fs_cgmask)); in ufs_print_super_stuff()
211 printk(" size: %u\n", fs32_to_cpu(sb, usb1->fs_size)); in ufs_print_super_stuff()
212 printk(" dsize: %u\n", fs32_to_cpu(sb, usb1->fs_dsize)); in ufs_print_super_stuff()
213 printk(" ncg: %u\n", fs32_to_cpu(sb, usb1->fs_ncg)); in ufs_print_super_stuff()
214 printk(" bsize: %u\n", fs32_to_cpu(sb, usb1->fs_bsize)); in ufs_print_super_stuff()
215 printk(" fsize: %u\n", fs32_to_cpu(sb, usb1->fs_fsize)); in ufs_print_super_stuff()
216 printk(" frag: %u\n", fs32_to_cpu(sb, usb1->fs_frag)); in ufs_print_super_stuff()
218 fs32_to_cpu(sb, usb1->fs_fragshift)); in ufs_print_super_stuff()
219 printk(" ~fmask: %u\n", ~fs32_to_cpu(sb, usb1->fs_fmask)); in ufs_print_super_stuff()
220 printk(" fshift: %u\n", fs32_to_cpu(sb, usb1->fs_fshift)); in ufs_print_super_stuff()
221 printk(" sbsize: %u\n", fs32_to_cpu(sb, usb1->fs_sbsize)); in ufs_print_super_stuff()
222 printk(" spc: %u\n", fs32_to_cpu(sb, usb1->fs_spc)); in ufs_print_super_stuff()
223 printk(" cpg: %u\n", fs32_to_cpu(sb, usb1->fs_cpg)); in ufs_print_super_stuff()
224 printk(" ipg: %u\n", fs32_to_cpu(sb, usb1->fs_ipg)); in ufs_print_super_stuff()
225 printk(" fpg: %u\n", fs32_to_cpu(sb, usb1->fs_fpg)); in ufs_print_super_stuff()
226 printk(" csaddr: %u\n", fs32_to_cpu(sb, usb1->fs_csaddr)); in ufs_print_super_stuff()
227 printk(" cssize: %u\n", fs32_to_cpu(sb, usb1->fs_cssize)); in ufs_print_super_stuff()
228 printk(" cgsize: %u\n", fs32_to_cpu(sb, usb1->fs_cgsize)); in ufs_print_super_stuff()
230 fs32_to_cpu(sb, usb1->fs_fsbtodb)); in ufs_print_super_stuff()
231 printk(" nrpos: %u\n", fs32_to_cpu(sb, usb3->fs_nrpos)); in ufs_print_super_stuff()
233 fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir)); in ufs_print_super_stuff()
235 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree)); in ufs_print_super_stuff()
237 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree)); in ufs_print_super_stuff()
239 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree)); in ufs_print_super_stuff()
247 static void ufs_print_cylinder_stuff(struct super_block *sb, in ufs_print_cylinder_stuff() argument
252 printk(" magic: %x\n", fs32_to_cpu(sb, cg->cg_magic)); in ufs_print_cylinder_stuff()
253 printk(" time: %u\n", fs32_to_cpu(sb, cg->cg_time)); in ufs_print_cylinder_stuff()
254 printk(" cgx: %u\n", fs32_to_cpu(sb, cg->cg_cgx)); in ufs_print_cylinder_stuff()
255 printk(" ncyl: %u\n", fs16_to_cpu(sb, cg->cg_ncyl)); in ufs_print_cylinder_stuff()
256 printk(" niblk: %u\n", fs16_to_cpu(sb, cg->cg_niblk)); in ufs_print_cylinder_stuff()
257 printk(" ndblk: %u\n", fs32_to_cpu(sb, cg->cg_ndblk)); in ufs_print_cylinder_stuff()
258 printk(" cs_ndir: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_ndir)); in ufs_print_cylinder_stuff()
259 printk(" cs_nbfree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nbfree)); in ufs_print_cylinder_stuff()
260 printk(" cs_nifree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nifree)); in ufs_print_cylinder_stuff()
261 printk(" cs_nffree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nffree)); in ufs_print_cylinder_stuff()
262 printk(" rotor: %u\n", fs32_to_cpu(sb, cg->cg_rotor)); in ufs_print_cylinder_stuff()
263 printk(" frotor: %u\n", fs32_to_cpu(sb, cg->cg_frotor)); in ufs_print_cylinder_stuff()
264 printk(" irotor: %u\n", fs32_to_cpu(sb, cg->cg_irotor)); in ufs_print_cylinder_stuff()
266 fs32_to_cpu(sb, cg->cg_frsum[0]), fs32_to_cpu(sb, cg->cg_frsum[1]), in ufs_print_cylinder_stuff()
267 fs32_to_cpu(sb, cg->cg_frsum[2]), fs32_to_cpu(sb, cg->cg_frsum[3]), in ufs_print_cylinder_stuff()
268 fs32_to_cpu(sb, cg->cg_frsum[4]), fs32_to_cpu(sb, cg->cg_frsum[5]), in ufs_print_cylinder_stuff()
269 fs32_to_cpu(sb, cg->cg_frsum[6]), fs32_to_cpu(sb, cg->cg_frsum[7])); in ufs_print_cylinder_stuff()
270 printk(" btotoff: %u\n", fs32_to_cpu(sb, cg->cg_btotoff)); in ufs_print_cylinder_stuff()
271 printk(" boff: %u\n", fs32_to_cpu(sb, cg->cg_boff)); in ufs_print_cylinder_stuff()
272 printk(" iuseoff: %u\n", fs32_to_cpu(sb, cg->cg_iusedoff)); in ufs_print_cylinder_stuff()
273 printk(" freeoff: %u\n", fs32_to_cpu(sb, cg->cg_freeoff)); in ufs_print_cylinder_stuff()
274 printk(" nextfreeoff: %u\n", fs32_to_cpu(sb, cg->cg_nextfreeoff)); in ufs_print_cylinder_stuff()
276 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clustersumoff)); in ufs_print_cylinder_stuff()
278 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clusteroff)); in ufs_print_cylinder_stuff()
280 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_nclusterblks)); in ufs_print_cylinder_stuff()
284 # define ufs_print_super_stuff(sb, usb1, usb2, usb3) /**/ argument
285 # define ufs_print_cylinder_stuff(sb, cg) /**/ argument
292 void ufs_error (struct super_block * sb, const char * function, in ufs_error() argument
299 uspi = UFS_SB(sb)->s_uspi; in ufs_error()
302 if (!(sb->s_flags & MS_RDONLY)) { in ufs_error()
305 ufs_mark_sb_dirty(sb); in ufs_error()
306 sb->s_flags |= MS_RDONLY; in ufs_error()
311 switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) { in ufs_error()
314 sb->s_id, function, error_buf); in ufs_error()
320 sb->s_id, function, error_buf); in ufs_error()
324 void ufs_panic (struct super_block * sb, const char * function, in ufs_panic() argument
331 uspi = UFS_SB(sb)->s_uspi; in ufs_panic()
334 if (!(sb->s_flags & MS_RDONLY)) { in ufs_panic()
337 ufs_mark_sb_dirty(sb); in ufs_panic()
342 sb->s_flags |= MS_RDONLY; in ufs_panic()
344 sb->s_id, function, error_buf); in ufs_panic()
347 void ufs_warning (struct super_block * sb, const char * function, in ufs_warning() argument
356 sb->s_id, function, error_buf); in ufs_warning()
486 static void ufs_setup_cstotal(struct super_block *sb) in ufs_setup_cstotal() argument
488 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_setup_cstotal()
504 uspi->cs_total.cs_ndir = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir); in ufs_setup_cstotal()
505 uspi->cs_total.cs_nbfree = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree); in ufs_setup_cstotal()
506 uspi->cs_total.cs_nifree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree); in ufs_setup_cstotal()
507 uspi->cs_total.cs_nffree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree); in ufs_setup_cstotal()
509 uspi->cs_total.cs_ndir = fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir); in ufs_setup_cstotal()
510 uspi->cs_total.cs_nbfree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree); in ufs_setup_cstotal()
511 uspi->cs_total.cs_nifree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree); in ufs_setup_cstotal()
512 uspi->cs_total.cs_nffree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree); in ufs_setup_cstotal()
520 static int ufs_read_cylinder_structures(struct super_block *sb) in ufs_read_cylinder_structures() argument
522 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_read_cylinder_structures()
547 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_read_cylinder_structures()
573 if (!(sbi->s_ucg[i] = sb_bread(sb, ufs_cgcmin(i)))) in ufs_read_cylinder_structures()
575 if (!ufs_cg_chkmagic (sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data)) in ufs_read_cylinder_structures()
578 ufs_print_cylinder_stuff(sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data); in ufs_read_cylinder_structures()
606 static void ufs_put_cstotal(struct super_block *sb) in ufs_put_cstotal() argument
608 unsigned mtype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; in ufs_put_cstotal()
609 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_put_cstotal()
624 cpu_to_fs64(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
626 cpu_to_fs64(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
628 cpu_to_fs64(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
630 cpu_to_fs64(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
633 cpu_to_fs32(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
635 cpu_to_fs32(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
637 cpu_to_fs32(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
639 cpu_to_fs32(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
642 ufs_print_super_stuff(sb, usb1, usb2, usb3); in ufs_put_cstotal()
652 static void ufs_put_super_internal(struct super_block *sb) in ufs_put_super_internal() argument
654 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_put_super_internal()
663 ufs_put_cstotal(sb); in ufs_put_super_internal()
672 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_put_super_internal()
681 ufs_put_cylinder (sb, i); in ufs_put_super_internal()
694 static int ufs_sync_fs(struct super_block *sb, int wait) in ufs_sync_fs() argument
701 lock_ufs(sb); in ufs_sync_fs()
702 mutex_lock(&UFS_SB(sb)->s_lock); in ufs_sync_fs()
706 flags = UFS_SB(sb)->s_flags; in ufs_sync_fs()
707 uspi = UFS_SB(sb)->s_uspi; in ufs_sync_fs()
711 usb1->fs_time = cpu_to_fs32(sb, get_seconds()); in ufs_sync_fs()
715 ufs_set_fs_state(sb, usb1, usb3, in ufs_sync_fs()
716 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); in ufs_sync_fs()
717 ufs_put_cstotal(sb); in ufs_sync_fs()
720 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_sync_fs()
721 unlock_ufs(sb); in ufs_sync_fs()
736 ufs_sync_fs(sbi->sb, 1); in delayed_sync_fs()
739 void ufs_mark_sb_dirty(struct super_block *sb) in ufs_mark_sb_dirty() argument
741 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_mark_sb_dirty()
753 static void ufs_put_super(struct super_block *sb) in ufs_put_super() argument
755 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_put_super()
759 if (!(sb->s_flags & MS_RDONLY)) in ufs_put_super()
760 ufs_put_super_internal(sb); in ufs_put_super()
766 sb->s_fs_info = NULL; in ufs_put_super()
771 static int ufs_fill_super(struct super_block *sb, void *data, int silent) in ufs_fill_super() argument
795 sb->s_fs_info = sbi; in ufs_fill_super()
796 sbi->sb = sb; in ufs_fill_super()
798 UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY)); in ufs_fill_super()
801 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
904 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
907 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
920 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
923 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
936 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
939 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
952 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
955 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
967 if (!(sb->s_flags & MS_RDONLY)) { in ufs_fill_super()
970 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
980 if (!sb_set_blocksize(sb, block_size)) { in ufs_fill_super()
989 ubh = ubh_bread_uspi(uspi, sb, uspi->s_sbbase + super_block_offset/block_size, super_block_size); in ufs_fill_super()
999 uspi->s_postblformat = fs32_to_cpu(sb, usb3->fs_postblformat); in ufs_fill_super()
1010 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1020 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1047 uspi->s_bsize = fs32_to_cpu(sb, usb1->fs_bsize); in ufs_fill_super()
1048 uspi->s_fsize = fs32_to_cpu(sb, usb1->fs_fsize); in ufs_fill_super()
1049 uspi->s_sbsize = fs32_to_cpu(sb, usb1->fs_sbsize); in ufs_fill_super()
1050 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1051 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1093 ufs_print_super_stuff(sb, usb1, usb2, usb3); in ufs_fill_super()
1104 (ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time))))) { in ufs_fill_super()
1120 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
1124 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
1128 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
1133 sb->s_flags |= MS_RDONLY; in ufs_fill_super()
1139 sb->s_op = &ufs_super_ops; in ufs_fill_super()
1140 sb->s_export_op = &ufs_export_ops; in ufs_fill_super()
1142 sb->s_magic = fs32_to_cpu(sb, usb3->fs_magic); in ufs_fill_super()
1144 uspi->s_sblkno = fs32_to_cpu(sb, usb1->fs_sblkno); in ufs_fill_super()
1145 uspi->s_cblkno = fs32_to_cpu(sb, usb1->fs_cblkno); in ufs_fill_super()
1146 uspi->s_iblkno = fs32_to_cpu(sb, usb1->fs_iblkno); in ufs_fill_super()
1147 uspi->s_dblkno = fs32_to_cpu(sb, usb1->fs_dblkno); in ufs_fill_super()
1148 uspi->s_cgoffset = fs32_to_cpu(sb, usb1->fs_cgoffset); in ufs_fill_super()
1149 uspi->s_cgmask = fs32_to_cpu(sb, usb1->fs_cgmask); in ufs_fill_super()
1152 uspi->s_u2_size = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size); in ufs_fill_super()
1153 uspi->s_u2_dsize = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); in ufs_fill_super()
1155 uspi->s_size = fs32_to_cpu(sb, usb1->fs_size); in ufs_fill_super()
1156 uspi->s_dsize = fs32_to_cpu(sb, usb1->fs_dsize); in ufs_fill_super()
1159 uspi->s_ncg = fs32_to_cpu(sb, usb1->fs_ncg); in ufs_fill_super()
1162 uspi->s_fpb = fs32_to_cpu(sb, usb1->fs_frag); in ufs_fill_super()
1163 uspi->s_minfree = fs32_to_cpu(sb, usb1->fs_minfree); in ufs_fill_super()
1164 uspi->s_bmask = fs32_to_cpu(sb, usb1->fs_bmask); in ufs_fill_super()
1165 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1166 uspi->s_bshift = fs32_to_cpu(sb, usb1->fs_bshift); in ufs_fill_super()
1167 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1170 uspi->s_fpbshift = fs32_to_cpu(sb, usb1->fs_fragshift); in ufs_fill_super()
1171 uspi->s_fsbtodb = fs32_to_cpu(sb, usb1->fs_fsbtodb); in ufs_fill_super()
1173 uspi->s_csmask = fs32_to_cpu(sb, usb1->fs_csmask); in ufs_fill_super()
1174 uspi->s_csshift = fs32_to_cpu(sb, usb1->fs_csshift); in ufs_fill_super()
1175 uspi->s_nindir = fs32_to_cpu(sb, usb1->fs_nindir); in ufs_fill_super()
1176 uspi->s_inopb = fs32_to_cpu(sb, usb1->fs_inopb); in ufs_fill_super()
1177 uspi->s_nspf = fs32_to_cpu(sb, usb1->fs_nspf); in ufs_fill_super()
1178 uspi->s_npsect = ufs_get_fs_npsect(sb, usb1, usb3); in ufs_fill_super()
1179 uspi->s_interleave = fs32_to_cpu(sb, usb1->fs_interleave); in ufs_fill_super()
1180 uspi->s_trackskew = fs32_to_cpu(sb, usb1->fs_trackskew); in ufs_fill_super()
1183 uspi->s_csaddr = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_csaddr); in ufs_fill_super()
1185 uspi->s_csaddr = fs32_to_cpu(sb, usb1->fs_csaddr); in ufs_fill_super()
1187 uspi->s_cssize = fs32_to_cpu(sb, usb1->fs_cssize); in ufs_fill_super()
1188 uspi->s_cgsize = fs32_to_cpu(sb, usb1->fs_cgsize); in ufs_fill_super()
1189 uspi->s_ntrak = fs32_to_cpu(sb, usb1->fs_ntrak); in ufs_fill_super()
1190 uspi->s_nsect = fs32_to_cpu(sb, usb1->fs_nsect); in ufs_fill_super()
1191 uspi->s_spc = fs32_to_cpu(sb, usb1->fs_spc); in ufs_fill_super()
1192 uspi->s_ipg = fs32_to_cpu(sb, usb1->fs_ipg); in ufs_fill_super()
1193 uspi->s_fpg = fs32_to_cpu(sb, usb1->fs_fpg); in ufs_fill_super()
1194 uspi->s_cpc = fs32_to_cpu(sb, usb2->fs_un.fs_u1.fs_cpc); in ufs_fill_super()
1195 uspi->s_contigsumsize = fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_contigsumsize); in ufs_fill_super()
1196 uspi->s_qbmask = ufs_get_fs_qbmask(sb, usb3); in ufs_fill_super()
1197 uspi->s_qfmask = ufs_get_fs_qfmask(sb, usb3); in ufs_fill_super()
1198 uspi->s_nrpos = fs32_to_cpu(sb, usb3->fs_nrpos); in ufs_fill_super()
1199 uspi->s_postbloff = fs32_to_cpu(sb, usb3->fs_postbloff); in ufs_fill_super()
1200 uspi->s_rotbloff = fs32_to_cpu(sb, usb3->fs_rotbloff); in ufs_fill_super()
1226 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen); in ufs_fill_super()
1233 ufs_warning(sb, __func__, "ufs_read_super: excessive maximum " in ufs_fill_super()
1237 sb->s_max_links = UFS_LINK_MAX; in ufs_fill_super()
1239 inode = ufs_iget(sb, UFS_ROOTINO); in ufs_fill_super()
1244 sb->s_root = d_make_root(inode); in ufs_fill_super()
1245 if (!sb->s_root) { in ufs_fill_super()
1250 ufs_setup_cstotal(sb); in ufs_fill_super()
1254 if (!(sb->s_flags & MS_RDONLY)) in ufs_fill_super()
1255 if (!ufs_read_cylinder_structures(sb)) in ufs_fill_super()
1266 sb->s_fs_info = NULL; in ufs_fill_super()
1275 static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) in ufs_remount() argument
1283 sync_filesystem(sb); in ufs_remount()
1284 lock_ufs(sb); in ufs_remount()
1285 mutex_lock(&UFS_SB(sb)->s_lock); in ufs_remount()
1286 uspi = UFS_SB(sb)->s_uspi; in ufs_remount()
1287 flags = UFS_SB(sb)->s_flags; in ufs_remount()
1295 ufstype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; in ufs_remount()
1299 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1300 unlock_ufs(sb); in ufs_remount()
1307 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1308 unlock_ufs(sb); in ufs_remount()
1312 if ((*mount_flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) { in ufs_remount()
1313 UFS_SB(sb)->s_mount_opt = new_mount_opt; in ufs_remount()
1314 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1315 unlock_ufs(sb); in ufs_remount()
1323 ufs_put_super_internal(sb); in ufs_remount()
1324 usb1->fs_time = cpu_to_fs32(sb, get_seconds()); in ufs_remount()
1328 ufs_set_fs_state(sb, usb1, usb3, in ufs_remount()
1329 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); in ufs_remount()
1331 sb->s_flags |= MS_RDONLY; in ufs_remount()
1339 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1340 unlock_ufs(sb); in ufs_remount()
1349 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1350 unlock_ufs(sb); in ufs_remount()
1353 if (!ufs_read_cylinder_structures(sb)) { in ufs_remount()
1355 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1356 unlock_ufs(sb); in ufs_remount()
1359 sb->s_flags &= ~MS_RDONLY; in ufs_remount()
1362 UFS_SB(sb)->s_mount_opt = new_mount_opt; in ufs_remount()
1363 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1364 unlock_ufs(sb); in ufs_remount()
1390 struct super_block *sb = dentry->d_sb; in ufs_statfs() local
1391 struct ufs_sb_private_info *uspi= UFS_SB(sb)->s_uspi; in ufs_statfs()
1392 unsigned flags = UFS_SB(sb)->s_flags; in ufs_statfs()
1396 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in ufs_statfs()
1398 lock_ufs(sb); in ufs_statfs()
1406 buf->f_blocks = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); in ufs_statfs()
1414 buf->f_bsize = sb->s_blocksize; in ufs_statfs()
1422 unlock_ufs(sb); in ufs_statfs()
1429 static struct inode *ufs_alloc_inode(struct super_block *sb) in ufs_alloc_inode() argument