Lines Matching refs:sb
99 static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) in ufs_nfs_get_inode() argument
101 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_nfs_get_inode()
107 inode = ufs_iget(sb, ino); in ufs_nfs_get_inode()
117 static struct dentry *ufs_fh_to_dentry(struct super_block *sb, struct fid *fid, in ufs_fh_to_dentry() argument
120 return generic_fh_to_dentry(sb, fid, fh_len, fh_type, ufs_nfs_get_inode); in ufs_fh_to_dentry()
123 static struct dentry *ufs_fh_to_parent(struct super_block *sb, struct fid *fid, in ufs_fh_to_parent() argument
126 return generic_fh_to_parent(sb, fid, fh_len, fh_type, ufs_nfs_get_inode); in ufs_fh_to_parent()
149 static void ufs_print_super_stuff(struct super_block *sb, in ufs_print_super_stuff() argument
154 u32 magic = fs32_to_cpu(sb, usb3->fs_magic); in ufs_print_super_stuff()
158 if (fs32_to_cpu(sb, usb3->fs_magic) == UFS2_MAGIC) { in ufs_print_super_stuff()
160 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size)); in ufs_print_super_stuff()
162 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize)); in ufs_print_super_stuff()
164 fs32_to_cpu(sb, usb1->fs_bsize)); in ufs_print_super_stuff()
166 fs32_to_cpu(sb, usb1->fs_fsize)); in ufs_print_super_stuff()
169 fs64_to_cpu(sb, usb2->fs_un.fs_u2.fs_sblockloc)); in ufs_print_super_stuff()
171 fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir)); in ufs_print_super_stuff()
174 fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree)); in ufs_print_super_stuff()
177 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree)); in ufs_print_super_stuff()
180 fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree)); in ufs_print_super_stuff()
182 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen)); in ufs_print_super_stuff()
184 pr_debug(" sblkno: %u\n", fs32_to_cpu(sb, usb1->fs_sblkno)); in ufs_print_super_stuff()
185 pr_debug(" cblkno: %u\n", fs32_to_cpu(sb, usb1->fs_cblkno)); in ufs_print_super_stuff()
186 pr_debug(" iblkno: %u\n", fs32_to_cpu(sb, usb1->fs_iblkno)); in ufs_print_super_stuff()
187 pr_debug(" dblkno: %u\n", fs32_to_cpu(sb, usb1->fs_dblkno)); in ufs_print_super_stuff()
189 fs32_to_cpu(sb, usb1->fs_cgoffset)); in ufs_print_super_stuff()
191 ~fs32_to_cpu(sb, usb1->fs_cgmask)); in ufs_print_super_stuff()
192 pr_debug(" size: %u\n", fs32_to_cpu(sb, usb1->fs_size)); in ufs_print_super_stuff()
193 pr_debug(" dsize: %u\n", fs32_to_cpu(sb, usb1->fs_dsize)); in ufs_print_super_stuff()
194 pr_debug(" ncg: %u\n", fs32_to_cpu(sb, usb1->fs_ncg)); in ufs_print_super_stuff()
195 pr_debug(" bsize: %u\n", fs32_to_cpu(sb, usb1->fs_bsize)); in ufs_print_super_stuff()
196 pr_debug(" fsize: %u\n", fs32_to_cpu(sb, usb1->fs_fsize)); in ufs_print_super_stuff()
197 pr_debug(" frag: %u\n", fs32_to_cpu(sb, usb1->fs_frag)); in ufs_print_super_stuff()
199 fs32_to_cpu(sb, usb1->fs_fragshift)); in ufs_print_super_stuff()
200 pr_debug(" ~fmask: %u\n", ~fs32_to_cpu(sb, usb1->fs_fmask)); in ufs_print_super_stuff()
201 pr_debug(" fshift: %u\n", fs32_to_cpu(sb, usb1->fs_fshift)); in ufs_print_super_stuff()
202 pr_debug(" sbsize: %u\n", fs32_to_cpu(sb, usb1->fs_sbsize)); in ufs_print_super_stuff()
203 pr_debug(" spc: %u\n", fs32_to_cpu(sb, usb1->fs_spc)); in ufs_print_super_stuff()
204 pr_debug(" cpg: %u\n", fs32_to_cpu(sb, usb1->fs_cpg)); in ufs_print_super_stuff()
205 pr_debug(" ipg: %u\n", fs32_to_cpu(sb, usb1->fs_ipg)); in ufs_print_super_stuff()
206 pr_debug(" fpg: %u\n", fs32_to_cpu(sb, usb1->fs_fpg)); in ufs_print_super_stuff()
207 pr_debug(" csaddr: %u\n", fs32_to_cpu(sb, usb1->fs_csaddr)); in ufs_print_super_stuff()
208 pr_debug(" cssize: %u\n", fs32_to_cpu(sb, usb1->fs_cssize)); in ufs_print_super_stuff()
209 pr_debug(" cgsize: %u\n", fs32_to_cpu(sb, usb1->fs_cgsize)); in ufs_print_super_stuff()
211 fs32_to_cpu(sb, usb1->fs_fsbtodb)); in ufs_print_super_stuff()
212 pr_debug(" nrpos: %u\n", fs32_to_cpu(sb, usb3->fs_nrpos)); in ufs_print_super_stuff()
214 fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir)); in ufs_print_super_stuff()
216 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree)); in ufs_print_super_stuff()
218 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree)); in ufs_print_super_stuff()
220 fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree)); in ufs_print_super_stuff()
228 static void ufs_print_cylinder_stuff(struct super_block *sb, in ufs_print_cylinder_stuff() argument
233 pr_debug(" magic: %x\n", fs32_to_cpu(sb, cg->cg_magic)); in ufs_print_cylinder_stuff()
234 pr_debug(" time: %u\n", fs32_to_cpu(sb, cg->cg_time)); in ufs_print_cylinder_stuff()
235 pr_debug(" cgx: %u\n", fs32_to_cpu(sb, cg->cg_cgx)); in ufs_print_cylinder_stuff()
236 pr_debug(" ncyl: %u\n", fs16_to_cpu(sb, cg->cg_ncyl)); in ufs_print_cylinder_stuff()
237 pr_debug(" niblk: %u\n", fs16_to_cpu(sb, cg->cg_niblk)); in ufs_print_cylinder_stuff()
238 pr_debug(" ndblk: %u\n", fs32_to_cpu(sb, cg->cg_ndblk)); in ufs_print_cylinder_stuff()
239 pr_debug(" cs_ndir: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_ndir)); in ufs_print_cylinder_stuff()
240 pr_debug(" cs_nbfree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nbfree)); in ufs_print_cylinder_stuff()
241 pr_debug(" cs_nifree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nifree)); in ufs_print_cylinder_stuff()
242 pr_debug(" cs_nffree: %u\n", fs32_to_cpu(sb, cg->cg_cs.cs_nffree)); in ufs_print_cylinder_stuff()
243 pr_debug(" rotor: %u\n", fs32_to_cpu(sb, cg->cg_rotor)); in ufs_print_cylinder_stuff()
244 pr_debug(" frotor: %u\n", fs32_to_cpu(sb, cg->cg_frotor)); in ufs_print_cylinder_stuff()
245 pr_debug(" irotor: %u\n", fs32_to_cpu(sb, cg->cg_irotor)); in ufs_print_cylinder_stuff()
247 fs32_to_cpu(sb, cg->cg_frsum[0]), fs32_to_cpu(sb, cg->cg_frsum[1]), in ufs_print_cylinder_stuff()
248 fs32_to_cpu(sb, cg->cg_frsum[2]), fs32_to_cpu(sb, cg->cg_frsum[3]), in ufs_print_cylinder_stuff()
249 fs32_to_cpu(sb, cg->cg_frsum[4]), fs32_to_cpu(sb, cg->cg_frsum[5]), in ufs_print_cylinder_stuff()
250 fs32_to_cpu(sb, cg->cg_frsum[6]), fs32_to_cpu(sb, cg->cg_frsum[7])); in ufs_print_cylinder_stuff()
251 pr_debug(" btotoff: %u\n", fs32_to_cpu(sb, cg->cg_btotoff)); in ufs_print_cylinder_stuff()
252 pr_debug(" boff: %u\n", fs32_to_cpu(sb, cg->cg_boff)); in ufs_print_cylinder_stuff()
253 pr_debug(" iuseoff: %u\n", fs32_to_cpu(sb, cg->cg_iusedoff)); in ufs_print_cylinder_stuff()
254 pr_debug(" freeoff: %u\n", fs32_to_cpu(sb, cg->cg_freeoff)); in ufs_print_cylinder_stuff()
255 pr_debug(" nextfreeoff: %u\n", fs32_to_cpu(sb, cg->cg_nextfreeoff)); in ufs_print_cylinder_stuff()
257 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clustersumoff)); in ufs_print_cylinder_stuff()
259 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clusteroff)); in ufs_print_cylinder_stuff()
261 fs32_to_cpu(sb, cg->cg_u.cg_44.cg_nclusterblks)); in ufs_print_cylinder_stuff()
265 # define ufs_print_super_stuff(sb, usb1, usb2, usb3) /**/ argument
266 # define ufs_print_cylinder_stuff(sb, cg) /**/ argument
271 void ufs_error (struct super_block * sb, const char * function, in ufs_error() argument
279 uspi = UFS_SB(sb)->s_uspi; in ufs_error()
282 if (!sb_rdonly(sb)) { in ufs_error()
285 ufs_mark_sb_dirty(sb); in ufs_error()
286 sb->s_flags |= SB_RDONLY; in ufs_error()
291 switch (UFS_SB(sb)->s_mount_opt & UFS_MOUNT_ONERROR) { in ufs_error()
294 sb->s_id, function, &vaf); in ufs_error()
300 sb->s_id, function, &vaf); in ufs_error()
305 void ufs_panic (struct super_block * sb, const char * function, in ufs_panic() argument
313 uspi = UFS_SB(sb)->s_uspi; in ufs_panic()
316 if (!sb_rdonly(sb)) { in ufs_panic()
319 ufs_mark_sb_dirty(sb); in ufs_panic()
324 sb->s_flags |= SB_RDONLY; in ufs_panic()
326 sb->s_id, function, &vaf); in ufs_panic()
330 void ufs_warning (struct super_block * sb, const char * function, in ufs_warning() argument
340 sb->s_id, function, &vaf); in ufs_warning()
469 static void ufs_setup_cstotal(struct super_block *sb) in ufs_setup_cstotal() argument
471 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_setup_cstotal()
487 uspi->cs_total.cs_ndir = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir); in ufs_setup_cstotal()
488 uspi->cs_total.cs_nbfree = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree); in ufs_setup_cstotal()
489 uspi->cs_total.cs_nifree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree); in ufs_setup_cstotal()
490 uspi->cs_total.cs_nffree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree); in ufs_setup_cstotal()
492 uspi->cs_total.cs_ndir = fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir); in ufs_setup_cstotal()
493 uspi->cs_total.cs_nbfree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree); in ufs_setup_cstotal()
494 uspi->cs_total.cs_nifree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree); in ufs_setup_cstotal()
495 uspi->cs_total.cs_nffree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree); in ufs_setup_cstotal()
503 static int ufs_read_cylinder_structures(struct super_block *sb) in ufs_read_cylinder_structures() argument
505 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_read_cylinder_structures()
528 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_read_cylinder_structures()
556 if (!(sbi->s_ucg[i] = sb_bread(sb, ufs_cgcmin(i)))) in ufs_read_cylinder_structures()
558 if (!ufs_cg_chkmagic (sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data)) in ufs_read_cylinder_structures()
561 ufs_print_cylinder_stuff(sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data); in ufs_read_cylinder_structures()
589 static void ufs_put_cstotal(struct super_block *sb) in ufs_put_cstotal() argument
591 unsigned mtype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; in ufs_put_cstotal()
592 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_put_cstotal()
605 cpu_to_fs64(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
607 cpu_to_fs64(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
609 cpu_to_fs64(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
611 cpu_to_fs64(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
619 cpu_to_fs64(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
621 cpu_to_fs64(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
623 cpu_to_fs64(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
625 cpu_to_fs64(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
627 usb1->fs_cstotal.cs_ndir = cpu_to_fs32(sb, uspi->cs_total.cs_ndir); in ufs_put_cstotal()
628 usb1->fs_cstotal.cs_nbfree = cpu_to_fs32(sb, uspi->cs_total.cs_nbfree); in ufs_put_cstotal()
629 usb1->fs_cstotal.cs_nifree = cpu_to_fs32(sb, uspi->cs_total.cs_nifree); in ufs_put_cstotal()
630 usb1->fs_cstotal.cs_nffree = cpu_to_fs32(sb, uspi->cs_total.cs_nffree); in ufs_put_cstotal()
633 ufs_print_super_stuff(sb, usb1, usb2, usb3); in ufs_put_cstotal()
643 static void ufs_put_super_internal(struct super_block *sb) in ufs_put_super_internal() argument
645 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_put_super_internal()
654 ufs_put_cstotal(sb); in ufs_put_super_internal()
663 ubh = ubh_bread(sb, uspi->s_csaddr + i, size); in ufs_put_super_internal()
672 ufs_put_cylinder (sb, i); in ufs_put_super_internal()
685 static int ufs_sync_fs(struct super_block *sb, int wait) in ufs_sync_fs() argument
692 mutex_lock(&UFS_SB(sb)->s_lock); in ufs_sync_fs()
696 flags = UFS_SB(sb)->s_flags; in ufs_sync_fs()
697 uspi = UFS_SB(sb)->s_uspi; in ufs_sync_fs()
701 usb1->fs_time = ufs_get_seconds(sb); in ufs_sync_fs()
705 ufs_set_fs_state(sb, usb1, usb3, in ufs_sync_fs()
706 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); in ufs_sync_fs()
707 ufs_put_cstotal(sb); in ufs_sync_fs()
710 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_sync_fs()
725 ufs_sync_fs(sbi->sb, 1); in delayed_sync_fs()
728 void ufs_mark_sb_dirty(struct super_block *sb) in ufs_mark_sb_dirty() argument
730 struct ufs_sb_info *sbi = UFS_SB(sb); in ufs_mark_sb_dirty()
742 static void ufs_put_super(struct super_block *sb) in ufs_put_super() argument
744 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_put_super()
748 if (!sb_rdonly(sb)) in ufs_put_super()
749 ufs_put_super_internal(sb); in ufs_put_super()
755 sb->s_fs_info = NULL; in ufs_put_super()
760 static u64 ufs_max_bytes(struct super_block *sb) in ufs_max_bytes() argument
762 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_max_bytes()
777 static int ufs_fill_super(struct super_block *sb, void *data, int silent) in ufs_fill_super() argument
799 if (!sb_rdonly(sb)) { in ufs_fill_super()
808 sb->s_fs_info = sbi; in ufs_fill_super()
809 sbi->sb = sb; in ufs_fill_super()
811 UFSD("flag %u\n", (int)(sb_rdonly(sb))); in ufs_fill_super()
843 sb->s_maxbytes = MAX_LFS_FILESIZE; in ufs_fill_super()
845 sb->s_time_gran = NSEC_PER_SEC; in ufs_fill_super()
846 sb->s_time_min = S32_MIN; in ufs_fill_super()
847 sb->s_time_max = S32_MAX; in ufs_fill_super()
867 sb->s_time_gran = 1; in ufs_fill_super()
868 sb->s_time_min = S64_MIN; in ufs_fill_super()
869 sb->s_time_max = S64_MAX; in ufs_fill_super()
915 if (!sb_rdonly(sb)) { in ufs_fill_super()
918 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
931 if (!sb_rdonly(sb)) { in ufs_fill_super()
934 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
947 if (!sb_rdonly(sb)) { in ufs_fill_super()
950 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
963 if (!sb_rdonly(sb)) { in ufs_fill_super()
966 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
978 if (!sb_rdonly(sb)) { in ufs_fill_super()
981 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
991 if (!sb_set_blocksize(sb, block_size)) { in ufs_fill_super()
1000 ubh = ubh_bread_uspi(uspi, sb, uspi->s_sbbase + super_block_offset/block_size, super_block_size); in ufs_fill_super()
1010 uspi->s_postblformat = fs32_to_cpu(sb, usb3->fs_postblformat); in ufs_fill_super()
1028 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1038 switch ((uspi->fs_magic = fs32_to_cpu(sb, usb3->fs_magic))) { in ufs_fill_super()
1065 uspi->s_bsize = fs32_to_cpu(sb, usb1->fs_bsize); in ufs_fill_super()
1066 uspi->s_fsize = fs32_to_cpu(sb, usb1->fs_fsize); in ufs_fill_super()
1067 uspi->s_sbsize = fs32_to_cpu(sb, usb1->fs_sbsize); in ufs_fill_super()
1068 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1069 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1111 ufs_print_super_stuff(sb, usb1, usb2, usb3); in ufs_fill_super()
1122 (ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time))))) { in ufs_fill_super()
1138 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
1142 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
1147 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
1152 sb->s_flags |= SB_RDONLY; in ufs_fill_super()
1158 sb->s_op = &ufs_super_ops; in ufs_fill_super()
1159 sb->s_export_op = &ufs_export_ops; in ufs_fill_super()
1161 sb->s_magic = fs32_to_cpu(sb, usb3->fs_magic); in ufs_fill_super()
1163 uspi->s_sblkno = fs32_to_cpu(sb, usb1->fs_sblkno); in ufs_fill_super()
1164 uspi->s_cblkno = fs32_to_cpu(sb, usb1->fs_cblkno); in ufs_fill_super()
1165 uspi->s_iblkno = fs32_to_cpu(sb, usb1->fs_iblkno); in ufs_fill_super()
1166 uspi->s_dblkno = fs32_to_cpu(sb, usb1->fs_dblkno); in ufs_fill_super()
1167 uspi->s_cgoffset = fs32_to_cpu(sb, usb1->fs_cgoffset); in ufs_fill_super()
1168 uspi->s_cgmask = fs32_to_cpu(sb, usb1->fs_cgmask); in ufs_fill_super()
1171 uspi->s_size = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size); in ufs_fill_super()
1172 uspi->s_dsize = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); in ufs_fill_super()
1174 uspi->s_size = fs32_to_cpu(sb, usb1->fs_size); in ufs_fill_super()
1175 uspi->s_dsize = fs32_to_cpu(sb, usb1->fs_dsize); in ufs_fill_super()
1178 uspi->s_ncg = fs32_to_cpu(sb, usb1->fs_ncg); in ufs_fill_super()
1181 uspi->s_fpb = fs32_to_cpu(sb, usb1->fs_frag); in ufs_fill_super()
1182 uspi->s_minfree = fs32_to_cpu(sb, usb1->fs_minfree); in ufs_fill_super()
1183 uspi->s_bmask = fs32_to_cpu(sb, usb1->fs_bmask); in ufs_fill_super()
1184 uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); in ufs_fill_super()
1185 uspi->s_bshift = fs32_to_cpu(sb, usb1->fs_bshift); in ufs_fill_super()
1186 uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); in ufs_fill_super()
1189 uspi->s_fpbshift = fs32_to_cpu(sb, usb1->fs_fragshift); in ufs_fill_super()
1190 uspi->s_fsbtodb = fs32_to_cpu(sb, usb1->fs_fsbtodb); in ufs_fill_super()
1192 uspi->s_csmask = fs32_to_cpu(sb, usb1->fs_csmask); in ufs_fill_super()
1193 uspi->s_csshift = fs32_to_cpu(sb, usb1->fs_csshift); in ufs_fill_super()
1194 uspi->s_nindir = fs32_to_cpu(sb, usb1->fs_nindir); in ufs_fill_super()
1195 uspi->s_inopb = fs32_to_cpu(sb, usb1->fs_inopb); in ufs_fill_super()
1196 uspi->s_nspf = fs32_to_cpu(sb, usb1->fs_nspf); in ufs_fill_super()
1197 uspi->s_npsect = ufs_get_fs_npsect(sb, usb1, usb3); in ufs_fill_super()
1198 uspi->s_interleave = fs32_to_cpu(sb, usb1->fs_interleave); in ufs_fill_super()
1199 uspi->s_trackskew = fs32_to_cpu(sb, usb1->fs_trackskew); in ufs_fill_super()
1202 uspi->s_csaddr = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_csaddr); in ufs_fill_super()
1204 uspi->s_csaddr = fs32_to_cpu(sb, usb1->fs_csaddr); in ufs_fill_super()
1206 uspi->s_cssize = fs32_to_cpu(sb, usb1->fs_cssize); in ufs_fill_super()
1207 uspi->s_cgsize = fs32_to_cpu(sb, usb1->fs_cgsize); in ufs_fill_super()
1208 uspi->s_ntrak = fs32_to_cpu(sb, usb1->fs_ntrak); in ufs_fill_super()
1209 uspi->s_nsect = fs32_to_cpu(sb, usb1->fs_nsect); in ufs_fill_super()
1210 uspi->s_spc = fs32_to_cpu(sb, usb1->fs_spc); in ufs_fill_super()
1211 uspi->s_ipg = fs32_to_cpu(sb, usb1->fs_ipg); in ufs_fill_super()
1212 uspi->s_fpg = fs32_to_cpu(sb, usb1->fs_fpg); in ufs_fill_super()
1213 uspi->s_cpc = fs32_to_cpu(sb, usb2->fs_un.fs_u1.fs_cpc); in ufs_fill_super()
1214 uspi->s_contigsumsize = fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_contigsumsize); in ufs_fill_super()
1215 uspi->s_qbmask = ufs_get_fs_qbmask(sb, usb3); in ufs_fill_super()
1216 uspi->s_qfmask = ufs_get_fs_qfmask(sb, usb3); in ufs_fill_super()
1217 uspi->s_nrpos = fs32_to_cpu(sb, usb3->fs_nrpos); in ufs_fill_super()
1218 uspi->s_postbloff = fs32_to_cpu(sb, usb3->fs_postbloff); in ufs_fill_super()
1219 uspi->s_rotbloff = fs32_to_cpu(sb, usb3->fs_rotbloff); in ufs_fill_super()
1226 usb1->fs_optim = cpu_to_fs32(sb, UFS_OPTSPACE); in ufs_fill_super()
1257 fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen); in ufs_fill_super()
1264 ufs_warning(sb, __func__, "ufs_read_super: excessive maximum " in ufs_fill_super()
1268 sb->s_maxbytes = ufs_max_bytes(sb); in ufs_fill_super()
1269 sb->s_max_links = UFS_LINK_MAX; in ufs_fill_super()
1271 inode = ufs_iget(sb, UFS_ROOTINO); in ufs_fill_super()
1276 sb->s_root = d_make_root(inode); in ufs_fill_super()
1277 if (!sb->s_root) { in ufs_fill_super()
1282 ufs_setup_cstotal(sb); in ufs_fill_super()
1286 if (!sb_rdonly(sb)) in ufs_fill_super()
1287 if (!ufs_read_cylinder_structures(sb)) in ufs_fill_super()
1298 sb->s_fs_info = NULL; in ufs_fill_super()
1307 static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) in ufs_remount() argument
1315 sync_filesystem(sb); in ufs_remount()
1316 mutex_lock(&UFS_SB(sb)->s_lock); in ufs_remount()
1317 uspi = UFS_SB(sb)->s_uspi; in ufs_remount()
1318 flags = UFS_SB(sb)->s_flags; in ufs_remount()
1326 ufstype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; in ufs_remount()
1330 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1337 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1341 if ((bool)(*mount_flags & SB_RDONLY) == sb_rdonly(sb)) { in ufs_remount()
1342 UFS_SB(sb)->s_mount_opt = new_mount_opt; in ufs_remount()
1343 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1351 ufs_put_super_internal(sb); in ufs_remount()
1352 usb1->fs_time = ufs_get_seconds(sb); in ufs_remount()
1356 ufs_set_fs_state(sb, usb1, usb3, in ufs_remount()
1357 UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); in ufs_remount()
1359 sb->s_flags |= SB_RDONLY; in ufs_remount()
1366 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1375 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1378 if (!ufs_read_cylinder_structures(sb)) { in ufs_remount()
1380 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1383 sb->s_flags &= ~SB_RDONLY; in ufs_remount()
1386 UFS_SB(sb)->s_mount_opt = new_mount_opt; in ufs_remount()
1387 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_remount()
1413 struct super_block *sb = dentry->d_sb; in ufs_statfs() local
1414 struct ufs_sb_private_info *uspi= UFS_SB(sb)->s_uspi; in ufs_statfs()
1415 unsigned flags = UFS_SB(sb)->s_flags; in ufs_statfs()
1416 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in ufs_statfs()
1418 mutex_lock(&UFS_SB(sb)->s_lock); in ufs_statfs()
1428 buf->f_bsize = sb->s_blocksize; in ufs_statfs()
1435 mutex_unlock(&UFS_SB(sb)->s_lock); in ufs_statfs()
1442 static struct inode *ufs_alloc_inode(struct super_block *sb) in ufs_alloc_inode() argument
1446 ei = alloc_inode_sb(sb, ufs_inode_cachep, GFP_NOFS); in ufs_alloc_inode()