summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index e78b68a81aec..1cc968502e53 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -150,7 +150,8 @@ static void nilfs_dispose_list(struct the_nilfs *, struct list_head *, int);
150#define nilfs_cnt32_lt(a, b) nilfs_cnt32_gt(b, a) 150#define nilfs_cnt32_lt(a, b) nilfs_cnt32_gt(b, a)
151#define nilfs_cnt32_le(a, b) nilfs_cnt32_ge(b, a) 151#define nilfs_cnt32_le(a, b) nilfs_cnt32_ge(b, a)
152 152
153static int nilfs_prepare_segment_lock(struct nilfs_transaction_info *ti) 153static int nilfs_prepare_segment_lock(struct super_block *sb,
154 struct nilfs_transaction_info *ti)
154{ 155{
155 struct nilfs_transaction_info *cur_ti = current->journal_info; 156 struct nilfs_transaction_info *cur_ti = current->journal_info;
156 void *save = NULL; 157 void *save = NULL;
@@ -164,8 +165,7 @@ static int nilfs_prepare_segment_lock(struct nilfs_transaction_info *ti)
164 * it is saved and will be restored on 165 * it is saved and will be restored on
165 * nilfs_transaction_commit(). 166 * nilfs_transaction_commit().
166 */ 167 */
167 printk(KERN_WARNING 168 nilfs_msg(sb, KERN_WARNING, "journal info from a different FS");
168 "NILFS warning: journal info from a different FS\n");
169 save = current->journal_info; 169 save = current->journal_info;
170 } 170 }
171 if (!ti) { 171 if (!ti) {
@@ -215,7 +215,7 @@ int nilfs_transaction_begin(struct super_block *sb,
215 int vacancy_check) 215 int vacancy_check)
216{ 216{
217 struct the_nilfs *nilfs; 217 struct the_nilfs *nilfs;
218 int ret = nilfs_prepare_segment_lock(ti); 218 int ret = nilfs_prepare_segment_lock(sb, ti);
219 struct nilfs_transaction_info *trace_ti; 219 struct nilfs_transaction_info *trace_ti;
220 220
221 if (unlikely(ret < 0)) 221 if (unlikely(ret < 0))
@@ -2467,9 +2467,9 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv,
2467 int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs, 2467 int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs,
2468 sci->sc_nfreesegs); 2468 sci->sc_nfreesegs);
2469 if (ret) { 2469 if (ret) {
2470 printk(KERN_WARNING 2470 nilfs_msg(sb, KERN_WARNING,
2471 "NILFS warning: error %d on discard request, " 2471 "error %d on discard request, turning discards off for the device",
2472 "turning discards off for the device\n", ret); 2472 ret);
2473 nilfs_clear_opt(nilfs, DISCARD); 2473 nilfs_clear_opt(nilfs, DISCARD);
2474 } 2474 }
2475 } 2475 }
@@ -2551,10 +2551,9 @@ static int nilfs_segctor_thread(void *arg)
2551 /* start sync. */ 2551 /* start sync. */
2552 sci->sc_task = current; 2552 sci->sc_task = current;
2553 wake_up(&sci->sc_wait_task); /* for nilfs_segctor_start_thread() */ 2553 wake_up(&sci->sc_wait_task); /* for nilfs_segctor_start_thread() */
2554 printk(KERN_INFO 2554 nilfs_msg(sci->sc_super, KERN_INFO,
2555 "segctord starting. Construction interval = %lu seconds, " 2555 "segctord starting. Construction interval = %lu seconds, CP frequency < %lu seconds",
2556 "CP frequency < %lu seconds\n", 2556 sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ);
2557 sci->sc_interval / HZ, sci->sc_mjcp_freq / HZ);
2558 2557
2559 spin_lock(&sci->sc_state_lock); 2558 spin_lock(&sci->sc_state_lock);
2560 loop: 2559 loop:
@@ -2628,8 +2627,8 @@ static int nilfs_segctor_start_thread(struct nilfs_sc_info *sci)
2628 if (IS_ERR(t)) { 2627 if (IS_ERR(t)) {
2629 int err = PTR_ERR(t); 2628 int err = PTR_ERR(t);
2630 2629
2631 printk(KERN_ERR "NILFS: error %d creating segctord thread\n", 2630 nilfs_msg(sci->sc_super, KERN_ERR,
2632 err); 2631 "error %d creating segctord thread", err);
2633 return err; 2632 return err;
2634 } 2633 }
2635 wait_event(sci->sc_wait_task, sci->sc_task != NULL); 2634 wait_event(sci->sc_wait_task, sci->sc_task != NULL);