segment.c (d585a021c0b10b0477d6b608c53e1feb8cde0507) | segment.c (4f6b828837b4e3836f2c9ac2f0eab9773b6c1327) |
---|---|
1/* 2 * segment.c - NILFS segment constructor. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 2575 unchanged lines hidden (view full) --- 2584 if (!test_bit(NILFS_I_UPDATED, &ii->i_state)) 2585 continue; 2586 hlist_del_init(&ii->vfs_inode.i_hash); 2587 list_del_init(&ii->i_dirty); 2588 nilfs_clear_gcinode(&ii->vfs_inode); 2589 } 2590} 2591 | 1/* 2 * segment.c - NILFS segment constructor. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 2575 unchanged lines hidden (view full) --- 2584 if (!test_bit(NILFS_I_UPDATED, &ii->i_state)) 2585 continue; 2586 hlist_del_init(&ii->vfs_inode.i_hash); 2587 list_del_init(&ii->i_dirty); 2588 nilfs_clear_gcinode(&ii->vfs_inode); 2589 } 2590} 2591 |
2592int nilfs_clean_segments(struct super_block *sb, void __user *argp) | 2592int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv, 2593 void **kbufs) |
2593{ 2594 struct nilfs_sb_info *sbi = NILFS_SB(sb); 2595 struct nilfs_sc_info *sci = NILFS_SC(sbi); 2596 struct the_nilfs *nilfs = sbi->s_nilfs; 2597 struct nilfs_transaction_info ti; 2598 struct nilfs_segctor_req req = { .mode = SC_LSEG_SR }; 2599 int err; 2600 2601 if (unlikely(!sci)) 2602 return -EROFS; 2603 2604 nilfs_transaction_lock(sbi, &ti, 1); 2605 2606 err = nilfs_init_gcdat_inode(nilfs); 2607 if (unlikely(err)) 2608 goto out_unlock; | 2594{ 2595 struct nilfs_sb_info *sbi = NILFS_SB(sb); 2596 struct nilfs_sc_info *sci = NILFS_SC(sbi); 2597 struct the_nilfs *nilfs = sbi->s_nilfs; 2598 struct nilfs_transaction_info ti; 2599 struct nilfs_segctor_req req = { .mode = SC_LSEG_SR }; 2600 int err; 2601 2602 if (unlikely(!sci)) 2603 return -EROFS; 2604 2605 nilfs_transaction_lock(sbi, &ti, 1); 2606 2607 err = nilfs_init_gcdat_inode(nilfs); 2608 if (unlikely(err)) 2609 goto out_unlock; |
2609 err = nilfs_ioctl_prepare_clean_segments(nilfs, argp); | 2610 err = nilfs_ioctl_prepare_clean_segments(nilfs, argv, kbufs); |
2610 if (unlikely(err)) 2611 goto out_unlock; 2612 2613 list_splice_init(&nilfs->ns_gc_inodes, sci->sc_gc_inodes.prev); 2614 2615 for (;;) { 2616 nilfs_segctor_accept(sci, &req); 2617 err = nilfs_segctor_construct(sci, &req); --- 360 unchanged lines hidden --- | 2611 if (unlikely(err)) 2612 goto out_unlock; 2613 2614 list_splice_init(&nilfs->ns_gc_inodes, sci->sc_gc_inodes.prev); 2615 2616 for (;;) { 2617 nilfs_segctor_accept(sci, &req); 2618 err = nilfs_segctor_construct(sci, &req); --- 360 unchanged lines hidden --- |