• Home
  • Raw
  • Download

Lines Matching refs:sbp

84 	struct nilfs_super_block **sbp;  in nilfs_set_error()  local
89 sbp = nilfs_prepare_super(sb, 0); in nilfs_set_error()
90 if (likely(sbp)) { in nilfs_set_error()
91 sbp[0]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error()
92 if (sbp[1]) in nilfs_set_error()
93 sbp[1]->s_state |= cpu_to_le16(NILFS_ERROR_FS); in nilfs_set_error()
194 struct nilfs_super_block *sbp = nilfs->ns_sbp[0]; in nilfs_sync_super() local
213 sbp = nilfs->ns_sbp[1]; in nilfs_sync_super()
217 nilfs->ns_prot_seq = le64_to_cpu(sbp->s_last_seq); in nilfs_sync_super()
224 void nilfs_set_log_cursor(struct nilfs_super_block *sbp, in nilfs_set_log_cursor() argument
231 sbp->s_free_blocks_count = cpu_to_le64(nfreeblocks); in nilfs_set_log_cursor()
234 sbp->s_last_seq = cpu_to_le64(nilfs->ns_last_seq); in nilfs_set_log_cursor()
235 sbp->s_last_pseg = cpu_to_le64(nilfs->ns_last_pseg); in nilfs_set_log_cursor()
236 sbp->s_last_cno = cpu_to_le64(nilfs->ns_last_cno); in nilfs_set_log_cursor()
244 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_prepare_super() local
247 if (sbp[0]->s_magic != cpu_to_le16(NILFS_SUPER_MAGIC)) { in nilfs_prepare_super()
248 if (sbp[1] && in nilfs_prepare_super()
249 sbp[1]->s_magic == cpu_to_le16(NILFS_SUPER_MAGIC)) { in nilfs_prepare_super()
250 memcpy(sbp[0], sbp[1], nilfs->ns_sbsize); in nilfs_prepare_super()
255 } else if (sbp[1] && in nilfs_prepare_super()
256 sbp[1]->s_magic != cpu_to_le16(NILFS_SUPER_MAGIC)) { in nilfs_prepare_super()
257 memcpy(sbp[1], sbp[0], nilfs->ns_sbsize); in nilfs_prepare_super()
260 if (flip && sbp[1]) in nilfs_prepare_super()
263 return sbp; in nilfs_prepare_super()
269 struct nilfs_super_block **sbp = nilfs->ns_sbp; in nilfs_commit_super() local
275 sbp[0]->s_wtime = cpu_to_le64(t); in nilfs_commit_super()
276 sbp[0]->s_sum = 0; in nilfs_commit_super()
277 sbp[0]->s_sum = cpu_to_le32(crc32_le(nilfs->ns_crc_seed, in nilfs_commit_super()
278 (unsigned char *)sbp[0], in nilfs_commit_super()
280 if (flag == NILFS_SB_COMMIT_ALL && sbp[1]) { in nilfs_commit_super()
281 sbp[1]->s_wtime = sbp[0]->s_wtime; in nilfs_commit_super()
282 sbp[1]->s_sum = 0; in nilfs_commit_super()
283 sbp[1]->s_sum = cpu_to_le32(crc32_le(nilfs->ns_crc_seed, in nilfs_commit_super()
284 (unsigned char *)sbp[1], in nilfs_commit_super()
305 struct nilfs_super_block **sbp; in nilfs_cleanup_super() local
309 sbp = nilfs_prepare_super(sb, 0); in nilfs_cleanup_super()
310 if (sbp) { in nilfs_cleanup_super()
311 sbp[0]->s_state = cpu_to_le16(nilfs->ns_mount_state); in nilfs_cleanup_super()
312 nilfs_set_log_cursor(sbp[0], nilfs); in nilfs_cleanup_super()
313 if (sbp[1] && sbp[0]->s_last_cno == sbp[1]->s_last_cno) { in nilfs_cleanup_super()
319 sbp[1]->s_state = sbp[0]->s_state; in nilfs_cleanup_super()
395 struct nilfs_super_block **sbp; in nilfs_resize_fs() local
428 sbp = nilfs_prepare_super(sb, 0); in nilfs_resize_fs()
429 if (likely(sbp)) { in nilfs_resize_fs()
430 nilfs_set_log_cursor(sbp[0], nilfs); in nilfs_resize_fs()
436 sbp[0]->s_state = cpu_to_le16(le16_to_cpu(sbp[0]->s_state) & in nilfs_resize_fs()
438 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
439 sbp[0]->s_nsegments = cpu_to_le64(nilfs->ns_nsegments); in nilfs_resize_fs()
440 if (sbp[1]) in nilfs_resize_fs()
441 memcpy(sbp[1], sbp[0], nilfs->ns_sbsize); in nilfs_resize_fs()
481 struct nilfs_super_block **sbp; in nilfs_sync_fs() local
490 sbp = nilfs_prepare_super(sb, nilfs_sb_will_flip(nilfs)); in nilfs_sync_fs()
491 if (likely(sbp)) { in nilfs_sync_fs()
492 nilfs_set_log_cursor(sbp[0], nilfs); in nilfs_sync_fs()
784 struct nilfs_super_block *sbp) in nilfs_set_default_options() argument
795 struct nilfs_super_block **sbp; in nilfs_setup_super() local
800 sbp = nilfs_prepare_super(sb, 0); in nilfs_setup_super()
801 if (!sbp) in nilfs_setup_super()
807 max_mnt_count = le16_to_cpu(sbp[0]->s_max_mnt_count); in nilfs_setup_super()
808 mnt_count = le16_to_cpu(sbp[0]->s_mnt_count); in nilfs_setup_super()
818 sbp[0]->s_max_mnt_count = cpu_to_le16(NILFS_DFL_MAX_MNT_COUNT); in nilfs_setup_super()
820 sbp[0]->s_mnt_count = cpu_to_le16(mnt_count + 1); in nilfs_setup_super()
821 sbp[0]->s_mtime = cpu_to_le64(ktime_get_real_seconds()); in nilfs_setup_super()
824 sbp[0]->s_state = in nilfs_setup_super()
825 cpu_to_le16(le16_to_cpu(sbp[0]->s_state) & ~NILFS_VALID_FS); in nilfs_setup_super()
827 if (sbp[1]) in nilfs_setup_super()
828 memcpy(sbp[1], sbp[0], nilfs->ns_sbsize); in nilfs_setup_super()
847 struct nilfs_super_block *sbp, in nilfs_store_magic_and_option() argument
852 sb->s_magic = le16_to_cpu(sbp->s_magic); in nilfs_store_magic_and_option()
859 nilfs_set_default_options(sb, sbp); in nilfs_store_magic_and_option()
861 nilfs->ns_resuid = le16_to_cpu(sbp->s_def_resuid); in nilfs_store_magic_and_option()
862 nilfs->ns_resgid = le16_to_cpu(sbp->s_def_resgid); in nilfs_store_magic_and_option()
863 nilfs->ns_interval = le32_to_cpu(sbp->s_c_interval); in nilfs_store_magic_and_option()
864 nilfs->ns_watermark = le32_to_cpu(sbp->s_c_block_max); in nilfs_store_magic_and_option()
870 struct nilfs_super_block *sbp) in nilfs_check_feature_compatibility() argument
874 features = le64_to_cpu(sbp->s_feature_incompat) & in nilfs_check_feature_compatibility()
882 features = le64_to_cpu(sbp->s_feature_compat_ro) & in nilfs_check_feature_compatibility()