aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-12-08 10:57:52 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-02-12 22:26:03 -0500
commite605f0a7249d8002c660af379f884896cbaa45ae (patch)
tree8daadf8848cd8f6c7817c399e568a2fcecdf0255 /fs/nilfs2/segment.c
parentdcd76186955e2b595c378dbe5b9bb6c8c5374b10 (diff)
nilfs2: get rid of s_dirt flag use
This replaces s_dirt flag use in nilfs with a new flag added on the nilfs object. The s_dirt flag was used to indicate if sop->write_super() should be called, however the current version of nilfs does not use the callback. Thus, it can be replaced with the own flag. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Jiro SEKIBA <jir@unicus.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index fa4abfc22d33..c4fcdd1567a9 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1937,8 +1937,7 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
1937{ 1937{
1938 struct nilfs_segment_buffer *segbuf; 1938 struct nilfs_segment_buffer *segbuf;
1939 struct page *bd_page = NULL, *fs_page = NULL; 1939 struct page *bd_page = NULL, *fs_page = NULL;
1940 struct nilfs_sb_info *sbi = sci->sc_sbi; 1940 struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
1941 struct the_nilfs *nilfs = sbi->s_nilfs;
1942 int update_sr = (sci->sc_super_root != NULL); 1941 int update_sr = (sci->sc_super_root != NULL);
1943 1942
1944 list_for_each_entry(segbuf, &sci->sc_write_logs, sb_list) { 1943 list_for_each_entry(segbuf, &sci->sc_write_logs, sb_list) {
@@ -2020,7 +2019,7 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
2020 if (update_sr) { 2019 if (update_sr) {
2021 nilfs_set_last_segment(nilfs, segbuf->sb_pseg_start, 2020 nilfs_set_last_segment(nilfs, segbuf->sb_pseg_start,
2022 segbuf->sb_sum.seg_seq, nilfs->ns_cno++); 2021 segbuf->sb_sum.seg_seq, nilfs->ns_cno++);
2023 sbi->s_super->s_dirt = 1; 2022 set_nilfs_sb_dirty(nilfs);
2024 2023
2025 clear_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags); 2024 clear_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags);
2026 clear_bit(NILFS_SC_DIRTY, &sci->sc_flags); 2025 clear_bit(NILFS_SC_DIRTY, &sci->sc_flags);
@@ -2645,6 +2644,7 @@ static int nilfs_segctor_flush_mode(struct nilfs_sc_info *sci)
2645static int nilfs_segctor_thread(void *arg) 2644static int nilfs_segctor_thread(void *arg)
2646{ 2645{
2647 struct nilfs_sc_info *sci = (struct nilfs_sc_info *)arg; 2646 struct nilfs_sc_info *sci = (struct nilfs_sc_info *)arg;
2647 struct the_nilfs *nilfs = sci->sc_sbi->s_nilfs;
2648 struct timer_list timer; 2648 struct timer_list timer;
2649 int timeout = 0; 2649 int timeout = 0;
2650 2650
@@ -2690,7 +2690,6 @@ static int nilfs_segctor_thread(void *arg)
2690 } else { 2690 } else {
2691 DEFINE_WAIT(wait); 2691 DEFINE_WAIT(wait);
2692 int should_sleep = 1; 2692 int should_sleep = 1;
2693 struct the_nilfs *nilfs;
2694 2693
2695 prepare_to_wait(&sci->sc_wait_daemon, &wait, 2694 prepare_to_wait(&sci->sc_wait_daemon, &wait,
2696 TASK_INTERRUPTIBLE); 2695 TASK_INTERRUPTIBLE);
@@ -2711,8 +2710,8 @@ static int nilfs_segctor_thread(void *arg)
2711 finish_wait(&sci->sc_wait_daemon, &wait); 2710 finish_wait(&sci->sc_wait_daemon, &wait);
2712 timeout = ((sci->sc_state & NILFS_SEGCTOR_COMMIT) && 2711 timeout = ((sci->sc_state & NILFS_SEGCTOR_COMMIT) &&
2713 time_after_eq(jiffies, sci->sc_timer->expires)); 2712 time_after_eq(jiffies, sci->sc_timer->expires));
2714 nilfs = sci->sc_sbi->s_nilfs; 2713
2715 if (sci->sc_super->s_dirt && nilfs_sb_need_update(nilfs)) 2714 if (nilfs_sb_dirty(nilfs) && nilfs_sb_need_update(nilfs))
2716 set_nilfs_discontinued(nilfs); 2715 set_nilfs_discontinued(nilfs);
2717 } 2716 }
2718 goto loop; 2717 goto loop;