Lines Matching refs:nilfs
46 static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, in nilfs_ioctl_wrap_copy() argument
91 nr = dofunc(nilfs, &pos, argv->v_flags, buf, argv->v_size, in nilfs_ioctl_wrap_copy()
205 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_change_cpmode() local
221 mutex_lock(&nilfs->ns_snapshot_mount_mutex); in nilfs_ioctl_change_cpmode()
225 nilfs->ns_cpfile, cpmode.cm_cno, cpmode.cm_mode); in nilfs_ioctl_change_cpmode()
231 mutex_unlock(&nilfs->ns_snapshot_mount_mutex); in nilfs_ioctl_change_cpmode()
260 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_delete_checkpoint() local
277 ret = nilfs_cpfile_delete_checkpoint(nilfs->ns_cpfile, cno); in nilfs_ioctl_delete_checkpoint()
303 nilfs_ioctl_do_get_cpinfo(struct the_nilfs *nilfs, __u64 *posp, int flags, in nilfs_ioctl_do_get_cpinfo() argument
308 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_cpinfo()
309 ret = nilfs_cpfile_get_cpinfo(nilfs->ns_cpfile, posp, flags, buf, in nilfs_ioctl_do_get_cpinfo()
311 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_cpinfo()
339 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_get_cpstat() local
343 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_get_cpstat()
344 ret = nilfs_cpfile_get_stat(nilfs->ns_cpfile, &cpstat); in nilfs_ioctl_get_cpstat()
345 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_get_cpstat()
370 nilfs_ioctl_do_get_suinfo(struct the_nilfs *nilfs, __u64 *posp, int flags, in nilfs_ioctl_do_get_suinfo() argument
375 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_suinfo()
376 ret = nilfs_sufile_get_suinfo(nilfs->ns_sufile, *posp, buf, size, in nilfs_ioctl_do_get_suinfo()
378 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_suinfo()
406 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_get_sustat() local
410 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_get_sustat()
411 ret = nilfs_sufile_get_stat(nilfs->ns_sufile, &sustat); in nilfs_ioctl_get_sustat()
412 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_get_sustat()
437 nilfs_ioctl_do_get_vinfo(struct the_nilfs *nilfs, __u64 *posp, int flags, in nilfs_ioctl_do_get_vinfo() argument
442 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_vinfo()
443 ret = nilfs_dat_get_vinfo(nilfs->ns_dat, buf, size, nmembs); in nilfs_ioctl_do_get_vinfo()
444 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_vinfo()
464 nilfs_ioctl_do_get_bdescs(struct the_nilfs *nilfs, __u64 *posp, int flags, in nilfs_ioctl_do_get_bdescs() argument
467 struct nilfs_bmap *bmap = NILFS_I(nilfs->ns_dat)->i_bmap; in nilfs_ioctl_do_get_bdescs()
471 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_bdescs()
479 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_bdescs()
485 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_do_get_bdescs()
515 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_get_bdescs() local
525 ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd), in nilfs_ioctl_get_bdescs()
615 struct the_nilfs *nilfs = sb->s_fs_info; in nilfs_ioctl_move_blocks() local
640 &nilfs->ns_gc_inodes); in nilfs_ioctl_move_blocks()
695 static int nilfs_ioctl_delete_checkpoints(struct the_nilfs *nilfs, in nilfs_ioctl_delete_checkpoints() argument
699 struct inode *cpfile = nilfs->ns_cpfile; in nilfs_ioctl_delete_checkpoints()
730 static int nilfs_ioctl_free_vblocknrs(struct the_nilfs *nilfs, in nilfs_ioctl_free_vblocknrs() argument
736 ret = nilfs_dat_freev(nilfs->ns_dat, buf, nmembs); in nilfs_ioctl_free_vblocknrs()
759 static int nilfs_ioctl_mark_blocks_dirty(struct the_nilfs *nilfs, in nilfs_ioctl_mark_blocks_dirty() argument
763 struct nilfs_bmap *bmap = NILFS_I(nilfs->ns_dat)->i_bmap; in nilfs_ioctl_mark_blocks_dirty()
783 ret = nilfs_mdt_get_block(nilfs->ns_dat, in nilfs_ioctl_mark_blocks_dirty()
791 nilfs_mdt_mark_dirty(nilfs->ns_dat); in nilfs_ioctl_mark_blocks_dirty()
805 int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs, in nilfs_ioctl_prepare_clean_segments() argument
811 ret = nilfs_ioctl_delete_checkpoints(nilfs, &argv[1], kbufs[1]); in nilfs_ioctl_prepare_clean_segments()
820 ret = nilfs_ioctl_free_vblocknrs(nilfs, &argv[2], kbufs[2]); in nilfs_ioctl_prepare_clean_segments()
829 ret = nilfs_ioctl_mark_blocks_dirty(nilfs, &argv[3], kbufs[3]); in nilfs_ioctl_prepare_clean_segments()
840 nilfs_err(nilfs->ns_sb, "error %d preparing GC: %s", ret, msg); in nilfs_ioctl_prepare_clean_segments()
871 struct the_nilfs *nilfs; in nilfs_ioctl_clean_segments() local
904 nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_clean_segments()
911 if (argv[n].v_nmembs > nsegs * nilfs->ns_blocks_per_segment) in nilfs_ioctl_clean_segments()
942 if (test_and_set_bit(THE_NILFS_GC_RUNNING, &nilfs->ns_flags)) { in nilfs_ioctl_clean_segments()
953 if (nilfs_sb_need_update(nilfs)) in nilfs_ioctl_clean_segments()
954 set_nilfs_discontinued(nilfs); in nilfs_ioctl_clean_segments()
958 nilfs_remove_all_gcinodes(nilfs); in nilfs_ioctl_clean_segments()
959 clear_nilfs_gc_running(nilfs); in nilfs_ioctl_clean_segments()
1002 struct the_nilfs *nilfs; in nilfs_ioctl_sync() local
1008 nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_sync()
1009 ret = nilfs_flush_device(nilfs); in nilfs_ioctl_sync()
1014 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_sync()
1015 cno = nilfs->ns_cno - 1; in nilfs_ioctl_sync()
1016 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_sync()
1069 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_trim_fs() local
1070 struct request_queue *q = bdev_get_queue(nilfs->ns_bdev); in nilfs_ioctl_trim_fs()
1085 down_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_trim_fs()
1086 ret = nilfs_sufile_trim_fs(nilfs->ns_sufile, &range); in nilfs_ioctl_trim_fs()
1087 up_read(&nilfs->ns_segctor_sem); in nilfs_ioctl_trim_fs()
1111 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_set_alloc_range() local
1128 segbytes = nilfs->ns_blocks_per_segment * nilfs->ns_blocksize; in nilfs_ioctl_set_alloc_range()
1136 ret = nilfs_sufile_set_alloc_range(nilfs->ns_sufile, minseg, maxseg); in nilfs_ioctl_set_alloc_range()
1171 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_get_info() local
1181 ret = nilfs_ioctl_wrap_copy(nilfs, &argv, _IOC_DIR(cmd), dofunc); in nilfs_ioctl_get_info()
1217 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_ioctl_set_suinfo() local
1240 if (argv.v_nmembs > nilfs->ns_nsegments) in nilfs_ioctl_set_suinfo()
1265 ret = nilfs_sufile_set_suinfo(nilfs->ns_sufile, kbuf, argv.v_size, in nilfs_ioctl_set_suinfo()