Lines Matching refs:su
305 struct nilfs_segment_usage *su; in nilfs_sufile_alloc() local
356 su = nilfs_sufile_block_get_segment_usage( in nilfs_sufile_alloc()
361 for (j = 0; j < nsus; j++, su = (void *)su + susz, segnum++) { in nilfs_sufile_alloc()
362 if (!nilfs_segment_usage_clean(su)) in nilfs_sufile_alloc()
365 nilfs_segment_usage_set_dirty(su); in nilfs_sufile_alloc()
406 struct nilfs_segment_usage *su; in nilfs_sufile_do_cancel_free() local
410 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); in nilfs_sufile_do_cancel_free()
411 if (unlikely(!nilfs_segment_usage_clean(su))) { in nilfs_sufile_do_cancel_free()
417 nilfs_segment_usage_set_dirty(su); in nilfs_sufile_do_cancel_free()
431 struct nilfs_segment_usage *su; in nilfs_sufile_do_scrap() local
436 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); in nilfs_sufile_do_scrap()
437 if (su->su_flags == cpu_to_le32(BIT(NILFS_SEGMENT_USAGE_DIRTY)) && in nilfs_sufile_do_scrap()
438 su->su_nblocks == cpu_to_le32(0)) { in nilfs_sufile_do_scrap()
442 clean = nilfs_segment_usage_clean(su); in nilfs_sufile_do_scrap()
443 dirty = nilfs_segment_usage_dirty(su); in nilfs_sufile_do_scrap()
446 su->su_lastmod = cpu_to_le64(0); in nilfs_sufile_do_scrap()
447 su->su_nblocks = cpu_to_le32(0); in nilfs_sufile_do_scrap()
448 su->su_flags = cpu_to_le32(BIT(NILFS_SEGMENT_USAGE_DIRTY)); in nilfs_sufile_do_scrap()
462 struct nilfs_segment_usage *su; in nilfs_sufile_do_free() local
467 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); in nilfs_sufile_do_free()
468 if (nilfs_segment_usage_clean(su)) { in nilfs_sufile_do_free()
474 WARN_ON(nilfs_segment_usage_error(su)); in nilfs_sufile_do_free()
475 WARN_ON(!nilfs_segment_usage_dirty(su)); in nilfs_sufile_do_free()
477 sudirty = nilfs_segment_usage_dirty(su); in nilfs_sufile_do_free()
478 nilfs_segment_usage_set_clean(su); in nilfs_sufile_do_free()
520 struct nilfs_segment_usage *su; in nilfs_sufile_set_segment_usage() local
530 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr); in nilfs_sufile_set_segment_usage()
531 WARN_ON(nilfs_segment_usage_error(su)); in nilfs_sufile_set_segment_usage()
533 su->su_lastmod = cpu_to_le64(modtime); in nilfs_sufile_set_segment_usage()
534 su->su_nblocks = cpu_to_le32(nblocks); in nilfs_sufile_set_segment_usage()
598 struct nilfs_segment_usage *su; in nilfs_sufile_do_set_error() local
603 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); in nilfs_sufile_do_set_error()
604 if (nilfs_segment_usage_error(su)) { in nilfs_sufile_do_set_error()
608 suclean = nilfs_segment_usage_clean(su); in nilfs_sufile_do_set_error()
609 nilfs_segment_usage_set_error(su); in nilfs_sufile_do_set_error()
643 struct nilfs_segment_usage *su, *su2; in nilfs_sufile_truncate_range() local
680 su = nilfs_sufile_block_get_segment_usage( in nilfs_sufile_truncate_range()
682 su2 = su; in nilfs_sufile_truncate_range()
683 for (j = 0; j < n; j++, su = (void *)su + susz) { in nilfs_sufile_truncate_range()
684 if ((le32_to_cpu(su->su_flags) & in nilfs_sufile_truncate_range()
694 for (su = su2, j = 0; j < n; j++, su = (void *)su + susz) { in nilfs_sufile_truncate_range()
695 if (nilfs_segment_usage_error(su)) { in nilfs_sufile_truncate_range()
696 nilfs_segment_usage_set_clean(su); in nilfs_sufile_truncate_range()
813 struct nilfs_segment_usage *su; in nilfs_sufile_get_suinfo() local
845 su = nilfs_sufile_block_get_segment_usage( in nilfs_sufile_get_suinfo()
848 j++, su = (void *)su + susz, si = (void *)si + sisz) { in nilfs_sufile_get_suinfo()
849 si->sui_lastmod = le64_to_cpu(su->su_lastmod); in nilfs_sufile_get_suinfo()
850 si->sui_nblocks = le32_to_cpu(su->su_nblocks); in nilfs_sufile_get_suinfo()
851 si->sui_flags = le32_to_cpu(su->su_flags) & in nilfs_sufile_get_suinfo()
893 struct nilfs_segment_usage *su; in nilfs_sufile_set_suinfo() local
927 su = nilfs_sufile_block_get_segment_usage( in nilfs_sufile_set_suinfo()
931 su->su_lastmod = cpu_to_le64(sup->sup_sui.sui_lastmod); in nilfs_sufile_set_suinfo()
934 su->su_nblocks = cpu_to_le32(sup->sup_sui.sui_nblocks); in nilfs_sufile_set_suinfo()
946 cleansu = nilfs_segment_usage_clean(su); in nilfs_sufile_set_suinfo()
948 dirtysu = nilfs_segment_usage_dirty(su); in nilfs_sufile_set_suinfo()
960 su->su_flags = cpu_to_le32(sup->sup_sui.sui_flags); in nilfs_sufile_set_suinfo()
1018 struct nilfs_segment_usage *su; in nilfs_sufile_trim_fs() local
1069 su = nilfs_sufile_block_get_segment_usage(sufile, segnum, in nilfs_sufile_trim_fs()
1071 for (i = 0; i < n; ++i, ++segnum, su = (void *)su + susz) { in nilfs_sufile_trim_fs()
1072 if (!nilfs_segment_usage_clean(su)) in nilfs_sufile_trim_fs()
1111 su = nilfs_sufile_block_get_segment_usage( in nilfs_sufile_trim_fs()