sufile 421 fs/nilfs2/recovery.c struct inode *sufile = nilfs->ns_sufile; sufile 435 fs/nilfs2/recovery.c err = nilfs_sufile_free(sufile, segnum[1]); sufile 451 fs/nilfs2/recovery.c err = nilfs_sufile_scrap(sufile, ent->segnum); sufile 460 fs/nilfs2/recovery.c err = nilfs_sufile_alloc(sufile, &segnum[0]); sufile 1337 fs/nilfs2/segment.c struct inode *sufile = nilfs->ns_sufile; sufile 1349 fs/nilfs2/segment.c err = nilfs_sufile_mark_dirty(sufile, prev->sb_nextnum); sufile 1365 fs/nilfs2/segment.c err = nilfs_sufile_alloc(sufile, &nextnextnum); sufile 1382 fs/nilfs2/segment.c ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum); sufile 1393 fs/nilfs2/segment.c struct inode *sufile = nilfs->ns_sufile; sufile 1398 fs/nilfs2/segment.c ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum); sufile 1417 fs/nilfs2/segment.c ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum); sufile 1423 fs/nilfs2/segment.c nilfs_sufile_set_error(sufile, segbuf->sb_segnum); sufile 1429 fs/nilfs2/segment.c struct inode *sufile) sufile 1438 fs/nilfs2/segment.c ret = nilfs_sufile_set_segment_usage(sufile, segbuf->sb_segnum, sufile 1445 fs/nilfs2/segment.c static void nilfs_cancel_segusage(struct list_head *logs, struct inode *sufile) sufile 1451 fs/nilfs2/segment.c ret = nilfs_sufile_set_segment_usage(sufile, segbuf->sb_segnum, sufile 1457 fs/nilfs2/segment.c ret = nilfs_sufile_set_segment_usage(sufile, segbuf->sb_segnum, sufile 1465 fs/nilfs2/segment.c struct inode *sufile) sufile 1472 fs/nilfs2/segment.c ret = nilfs_sufile_free(sufile, segbuf->sb_nextnum); sufile 35 fs/nilfs2/sufile.c static inline struct nilfs_sufile_info *NILFS_SUI(struct inode *sufile) sufile 37 fs/nilfs2/sufile.c return (struct nilfs_sufile_info *)NILFS_MDT(sufile); sufile 41 fs/nilfs2/sufile.c nilfs_sufile_segment_usages_per_block(const struct inode *sufile) sufile 43 fs/nilfs2/sufile.c return NILFS_MDT(sufile)->mi_entries_per_block; sufile 47 fs/nilfs2/sufile.c nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum) sufile 49 fs/nilfs2/sufile.c __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; sufile 51 fs/nilfs2/sufile.c do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); sufile 56 fs/nilfs2/sufile.c nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum) sufile 58 fs/nilfs2/sufile.c __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; sufile 60 fs/nilfs2/sufile.c return do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); sufile 64 fs/nilfs2/sufile.c nilfs_sufile_segment_usages_in_block(const struct inode *sufile, __u64 curr, sufile 68 fs/nilfs2/sufile.c nilfs_sufile_segment_usages_per_block(sufile) - sufile 69 fs/nilfs2/sufile.c nilfs_sufile_get_offset(sufile, curr), sufile 74 fs/nilfs2/sufile.c nilfs_sufile_block_get_segment_usage(const struct inode *sufile, __u64 segnum, sufile 78 fs/nilfs2/sufile.c nilfs_sufile_get_offset(sufile, segnum) * sufile 79 fs/nilfs2/sufile.c NILFS_MDT(sufile)->mi_entry_size; sufile 82 fs/nilfs2/sufile.c static inline int nilfs_sufile_get_header_block(struct inode *sufile, sufile 85 fs/nilfs2/sufile.c return nilfs_mdt_get_block(sufile, 0, 0, NULL, bhp); sufile 89 fs/nilfs2/sufile.c nilfs_sufile_get_segment_usage_block(struct inode *sufile, __u64 segnum, sufile 92 fs/nilfs2/sufile.c return nilfs_mdt_get_block(sufile, sufile 93 fs/nilfs2/sufile.c nilfs_sufile_get_blkoff(sufile, segnum), sufile 97 fs/nilfs2/sufile.c static int nilfs_sufile_delete_segment_usage_block(struct inode *sufile, sufile 100 fs/nilfs2/sufile.c return nilfs_mdt_delete_block(sufile, sufile 101 fs/nilfs2/sufile.c nilfs_sufile_get_blkoff(sufile, segnum)); sufile 123 fs/nilfs2/sufile.c unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile) sufile 125 fs/nilfs2/sufile.c return NILFS_SUI(sufile)->ncleansegs; sufile 156 fs/nilfs2/sufile.c int nilfs_sufile_updatev(struct inode *sufile, __u64 *segnumv, size_t nsegs, sufile 171 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 173 fs/nilfs2/sufile.c if (unlikely(*seg >= nilfs_sufile_get_nsegments(sufile))) { sufile 174 fs/nilfs2/sufile.c nilfs_msg(sufile->i_sb, KERN_WARNING, sufile 185 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 190 fs/nilfs2/sufile.c blkoff = nilfs_sufile_get_blkoff(sufile, *seg); sufile 191 fs/nilfs2/sufile.c ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); sufile 196 fs/nilfs2/sufile.c dofunc(sufile, *seg, header_bh, bh); sufile 201 fs/nilfs2/sufile.c blkoff = nilfs_sufile_get_blkoff(sufile, *seg); sufile 207 fs/nilfs2/sufile.c ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); sufile 217 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 224 fs/nilfs2/sufile.c int nilfs_sufile_update(struct inode *sufile, __u64 segnum, int create, sufile 232 fs/nilfs2/sufile.c if (unlikely(segnum >= nilfs_sufile_get_nsegments(sufile))) { sufile 233 fs/nilfs2/sufile.c nilfs_msg(sufile->i_sb, KERN_WARNING, sufile 238 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 240 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 244 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, create, &bh); sufile 246 fs/nilfs2/sufile.c dofunc(sufile, segnum, header_bh, bh); sufile 252 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 267 fs/nilfs2/sufile.c int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end) sufile 269 fs/nilfs2/sufile.c struct nilfs_sufile_info *sui = NILFS_SUI(sufile); sufile 273 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 274 fs/nilfs2/sufile.c nsegs = nilfs_sufile_get_nsegments(sufile); sufile 281 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 302 fs/nilfs2/sufile.c int nilfs_sufile_alloc(struct inode *sufile, __u64 *segnump) sufile 307 fs/nilfs2/sufile.c struct nilfs_sufile_info *sui = NILFS_SUI(sufile); sufile 308 fs/nilfs2/sufile.c size_t susz = NILFS_MDT(sufile)->mi_entry_size; sufile 314 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 316 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 324 fs/nilfs2/sufile.c nsegments = nilfs_sufile_get_nsegments(sufile); sufile 351 fs/nilfs2/sufile.c trace_nilfs2_segment_usage_check(sufile, segnum, cnt); sufile 352 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 1, sufile 358 fs/nilfs2/sufile.c sufile, segnum, su_bh, kaddr); sufile 361 fs/nilfs2/sufile.c sufile, segnum, maxsegnum); sufile 379 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 383 fs/nilfs2/sufile.c trace_nilfs2_segment_usage_allocated(sufile, segnum); sufile 399 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 403 fs/nilfs2/sufile.c void nilfs_sufile_do_cancel_free(struct inode *sufile, __u64 segnum, sufile 411 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); sufile 413 fs/nilfs2/sufile.c nilfs_msg(sufile->i_sb, KERN_WARNING, sufile 423 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs--; sufile 426 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 429 fs/nilfs2/sufile.c void nilfs_sufile_do_scrap(struct inode *sufile, __u64 segnum, sufile 438 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); sufile 454 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs -= clean; sufile 457 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 460 fs/nilfs2/sufile.c void nilfs_sufile_do_free(struct inode *sufile, __u64 segnum, sufile 469 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); sufile 471 fs/nilfs2/sufile.c nilfs_msg(sufile->i_sb, KERN_WARNING, sufile 486 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs++; sufile 488 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 490 fs/nilfs2/sufile.c trace_nilfs2_segment_usage_freed(sufile, segnum); sufile 498 fs/nilfs2/sufile.c int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum) sufile 503 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh); sufile 506 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 519 fs/nilfs2/sufile.c int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum, sufile 527 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 528 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh); sufile 533 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr); sufile 541 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 545 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 565 fs/nilfs2/sufile.c int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat) sufile 569 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 573 fs/nilfs2/sufile.c down_read(&NILFS_MDT(sufile)->mi_sem); sufile 575 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 581 fs/nilfs2/sufile.c sustat->ss_nsegs = nilfs_sufile_get_nsegments(sufile); sufile 593 fs/nilfs2/sufile.c up_read(&NILFS_MDT(sufile)->mi_sem); sufile 597 fs/nilfs2/sufile.c void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum, sufile 606 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); sufile 617 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs--; sufile 620 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 640 fs/nilfs2/sufile.c static int nilfs_sufile_truncate_range(struct inode *sufile, sufile 643 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 647 fs/nilfs2/sufile.c size_t susz = NILFS_MDT(sufile)->mi_entry_size; sufile 656 fs/nilfs2/sufile.c nsegs = nilfs_sufile_get_nsegments(sufile); sufile 662 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 666 fs/nilfs2/sufile.c segusages_per_block = nilfs_sufile_segment_usages_per_block(sufile); sufile 672 fs/nilfs2/sufile.c nilfs_sufile_get_offset(sufile, segnum), sufile 674 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, sufile 684 fs/nilfs2/sufile.c sufile, segnum, su_bh, kaddr); sufile 712 fs/nilfs2/sufile.c nilfs_sufile_delete_segment_usage_block(sufile, segnum); sufile 719 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs += ncleaned; sufile 721 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 744 fs/nilfs2/sufile.c int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs) sufile 746 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 749 fs/nilfs2/sufile.c struct nilfs_sufile_info *sui = NILFS_SUI(sufile); sufile 754 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 756 fs/nilfs2/sufile.c nsegs = nilfs_sufile_get_nsegments(sufile); sufile 765 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 772 fs/nilfs2/sufile.c ret = nilfs_sufile_truncate_range(sufile, newnsegs, nsegs - 1); sufile 785 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 791 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 812 fs/nilfs2/sufile.c ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum, void *buf, sufile 818 fs/nilfs2/sufile.c size_t susz = NILFS_MDT(sufile)->mi_entry_size; sufile 819 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 825 fs/nilfs2/sufile.c down_read(&NILFS_MDT(sufile)->mi_sem); sufile 827 fs/nilfs2/sufile.c segusages_per_block = nilfs_sufile_segment_usages_per_block(sufile); sufile 829 fs/nilfs2/sufile.c nilfs_sufile_get_nsegments(sufile) - segnum, sufile 834 fs/nilfs2/sufile.c nilfs_sufile_get_offset(sufile, segnum), sufile 836 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, sufile 849 fs/nilfs2/sufile.c sufile, segnum, su_bh, kaddr); sufile 866 fs/nilfs2/sufile.c up_read(&NILFS_MDT(sufile)->mi_sem); sufile 890 fs/nilfs2/sufile.c ssize_t nilfs_sufile_set_suinfo(struct inode *sufile, void *buf, sufile 893 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 916 fs/nilfs2/sufile.c down_write(&NILFS_MDT(sufile)->mi_sem); sufile 918 fs/nilfs2/sufile.c ret = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 923 fs/nilfs2/sufile.c blkoff = nilfs_sufile_get_blkoff(sufile, sup->sup_segnum); sufile 924 fs/nilfs2/sufile.c ret = nilfs_mdt_get_block(sufile, blkoff, 1, NULL, &bh); sufile 931 fs/nilfs2/sufile.c sufile, sup->sup_segnum, bh, kaddr); sufile 973 fs/nilfs2/sufile.c blkoff = nilfs_sufile_get_blkoff(sufile, sup->sup_segnum); sufile 980 fs/nilfs2/sufile.c ret = nilfs_mdt_get_block(sufile, blkoff, 1, NULL, &bh); sufile 991 fs/nilfs2/sufile.c NILFS_SUI(sufile)->ncleansegs += ncleaned; sufile 993 fs/nilfs2/sufile.c nilfs_mdt_mark_dirty(sufile); sufile 997 fs/nilfs2/sufile.c up_write(&NILFS_MDT(sufile)->mi_sem); sufile 1017 fs/nilfs2/sufile.c int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range) sufile 1019 fs/nilfs2/sufile.c struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; sufile 1023 fs/nilfs2/sufile.c size_t n, i, susz = NILFS_MDT(sufile)->mi_entry_size; sufile 1055 fs/nilfs2/sufile.c down_read(&NILFS_MDT(sufile)->mi_sem); sufile 1058 fs/nilfs2/sufile.c n = nilfs_sufile_segment_usages_in_block(sufile, segnum, sufile 1061 fs/nilfs2/sufile.c ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, sufile 1072 fs/nilfs2/sufile.c su = nilfs_sufile_block_get_segment_usage(sufile, segnum, sufile 1115 fs/nilfs2/sufile.c sufile, segnum, su_bh, kaddr); sufile 1147 fs/nilfs2/sufile.c up_read(&NILFS_MDT(sufile)->mi_sem); sufile 1163 fs/nilfs2/sufile.c struct inode *sufile; sufile 1180 fs/nilfs2/sufile.c sufile = nilfs_iget_locked(sb, NULL, NILFS_SUFILE_INO); sufile 1181 fs/nilfs2/sufile.c if (unlikely(!sufile)) sufile 1183 fs/nilfs2/sufile.c if (!(sufile->i_state & I_NEW)) sufile 1186 fs/nilfs2/sufile.c err = nilfs_mdt_init(sufile, NILFS_MDT_GFP, sizeof(*sui)); sufile 1190 fs/nilfs2/sufile.c nilfs_mdt_set_entry_size(sufile, susize, sufile 1193 fs/nilfs2/sufile.c err = nilfs_read_inode_common(sufile, raw_inode); sufile 1197 fs/nilfs2/sufile.c err = nilfs_sufile_get_header_block(sufile, &header_bh); sufile 1201 fs/nilfs2/sufile.c sui = NILFS_SUI(sufile); sufile 1208 fs/nilfs2/sufile.c sui->allocmax = nilfs_sufile_get_nsegments(sufile) - 1; sufile 1211 fs/nilfs2/sufile.c unlock_new_inode(sufile); sufile 1213 fs/nilfs2/sufile.c *inodep = sufile; sufile 1216 fs/nilfs2/sufile.c iget_failed(sufile); sufile 18 fs/nilfs2/sufile.h static inline unsigned long nilfs_sufile_get_nsegments(struct inode *sufile) sufile 20 fs/nilfs2/sufile.h return ((struct the_nilfs *)sufile->i_sb->s_fs_info)->ns_nsegments; sufile 23 fs/nilfs2/sufile.h unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile); sufile 25 fs/nilfs2/sufile.h int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end); sufile 27 fs/nilfs2/sufile.h int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum); sufile 28 fs/nilfs2/sufile.h int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum, sufile 52 fs/nilfs2/sufile.h int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs); sufile 55 fs/nilfs2/sufile.h int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range); sufile 62 fs/nilfs2/sufile.h static inline int nilfs_sufile_scrap(struct inode *sufile, __u64 segnum) sufile 64 fs/nilfs2/sufile.h return nilfs_sufile_update(sufile, segnum, 1, nilfs_sufile_do_scrap); sufile 72 fs/nilfs2/sufile.h static inline int nilfs_sufile_free(struct inode *sufile, __u64 segnum) sufile 74 fs/nilfs2/sufile.h return nilfs_sufile_update(sufile, segnum, 0, nilfs_sufile_do_free); sufile 84 fs/nilfs2/sufile.h static inline int nilfs_sufile_freev(struct inode *sufile, __u64 *segnumv, sufile 87 fs/nilfs2/sufile.h return nilfs_sufile_updatev(sufile, segnumv, nsegs, 0, ndone, sufile 101 fs/nilfs2/sufile.h static inline int nilfs_sufile_cancel_freev(struct inode *sufile, sufile 105 fs/nilfs2/sufile.h return nilfs_sufile_updatev(sufile, segnumv, nsegs, 0, ndone, sufile 126 fs/nilfs2/sufile.h static inline int nilfs_sufile_set_error(struct inode *sufile, __u64 segnum) sufile 128 fs/nilfs2/sufile.h return nilfs_sufile_update(sufile, segnum, 0, sufile 100 include/trace/events/nilfs2.h TP_PROTO(struct inode *sufile, sufile 104 include/trace/events/nilfs2.h TP_ARGS(sufile, segnum, cnt), sufile 107 include/trace/events/nilfs2.h __field(struct inode *, sufile) sufile 113 include/trace/events/nilfs2.h __entry->sufile = sufile; sufile 119 include/trace/events/nilfs2.h __entry->sufile, sufile 125 include/trace/events/nilfs2.h TP_PROTO(struct inode *sufile, sufile 128 include/trace/events/nilfs2.h TP_ARGS(sufile, segnum), sufile 131 include/trace/events/nilfs2.h __field(struct inode *, sufile) sufile 136 include/trace/events/nilfs2.h __entry->sufile = sufile; sufile 141 include/trace/events/nilfs2.h __entry->sufile, sufile 146 include/trace/events/nilfs2.h TP_PROTO(struct inode *sufile, sufile 149 include/trace/events/nilfs2.h TP_ARGS(sufile, segnum), sufile 152 include/trace/events/nilfs2.h __field(struct inode *, sufile) sufile 157 include/trace/events/nilfs2.h __entry->sufile = sufile; sufile 162 include/trace/events/nilfs2.h __entry->sufile,