segment.c (3b2ce58b0f3c1633750529713be0e467282abd78) | segment.c (574e6c3145c5754141361c695b58736c294a8ae1) |
---|---|
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 --- 2662 unchanged lines hidden (view full) --- 2671} 2672 2673/* 2674 * Setup & clean-up functions 2675 */ 2676static struct nilfs_sc_info *nilfs_segctor_new(struct nilfs_sb_info *sbi, 2677 struct nilfs_root *root) 2678{ | 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 --- 2662 unchanged lines hidden (view full) --- 2671} 2672 2673/* 2674 * Setup & clean-up functions 2675 */ 2676static struct nilfs_sc_info *nilfs_segctor_new(struct nilfs_sb_info *sbi, 2677 struct nilfs_root *root) 2678{ |
2679 struct the_nilfs *nilfs = sbi->s_nilfs; |
|
2679 struct nilfs_sc_info *sci; 2680 2681 sci = kzalloc(sizeof(*sci), GFP_KERNEL); 2682 if (!sci) 2683 return NULL; 2684 2685 sci->sc_sbi = sbi; 2686 sci->sc_super = sbi->s_super; --- 11 unchanged lines hidden (view full) --- 2698 INIT_LIST_HEAD(&sci->sc_gc_inodes); 2699 INIT_LIST_HEAD(&sci->sc_copied_buffers); 2700 init_timer(&sci->sc_timer); 2701 2702 sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT; 2703 sci->sc_mjcp_freq = HZ * NILFS_SC_DEFAULT_SR_FREQ; 2704 sci->sc_watermark = NILFS_SC_DEFAULT_WATERMARK; 2705 | 2680 struct nilfs_sc_info *sci; 2681 2682 sci = kzalloc(sizeof(*sci), GFP_KERNEL); 2683 if (!sci) 2684 return NULL; 2685 2686 sci->sc_sbi = sbi; 2687 sci->sc_super = sbi->s_super; --- 11 unchanged lines hidden (view full) --- 2699 INIT_LIST_HEAD(&sci->sc_gc_inodes); 2700 INIT_LIST_HEAD(&sci->sc_copied_buffers); 2701 init_timer(&sci->sc_timer); 2702 2703 sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT; 2704 sci->sc_mjcp_freq = HZ * NILFS_SC_DEFAULT_SR_FREQ; 2705 sci->sc_watermark = NILFS_SC_DEFAULT_WATERMARK; 2706 |
2706 if (sbi->s_interval) 2707 sci->sc_interval = sbi->s_interval; 2708 if (sbi->s_watermark) 2709 sci->sc_watermark = sbi->s_watermark; | 2707 if (nilfs->ns_interval) 2708 sci->sc_interval = nilfs->ns_interval; 2709 if (nilfs->ns_watermark) 2710 sci->sc_watermark = nilfs->ns_watermark; |
2710 return sci; 2711} 2712 2713static void nilfs_segctor_write_out(struct nilfs_sc_info *sci) 2714{ 2715 int ret, retrycount = NILFS_SC_CLEANUP_RETRY; 2716 2717 /* The segctord thread was stopped and its timer was removed. --- 125 unchanged lines hidden --- | 2711 return sci; 2712} 2713 2714static void nilfs_segctor_write_out(struct nilfs_sc_info *sci) 2715{ 2716 int ret, retrycount = NILFS_SC_CLEANUP_RETRY; 2717 2718 /* The segctord thread was stopped and its timer was removed. --- 125 unchanged lines hidden --- |