diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-03-08 21:05:07 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-03-08 21:05:07 -0500 |
commit | 3b2ce58b0f3c1633750529713be0e467282abd78 (patch) | |
tree | 48c0111adadf00e67933fb5d9883296754fca6ce /fs/nilfs2/segment.c | |
parent | be667377a8b8cd73e1b923f33fb5be4034aa4bfa (diff) |
nilfs2: move mount options to nilfs object
This moves mount_opt local variable to nilfs object from nilfs_sb_info
struct.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 2de9f636792a..851bcd3890c8 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -2298,6 +2298,7 @@ int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode, | |||
2298 | loff_t start, loff_t end) | 2298 | loff_t start, loff_t end) |
2299 | { | 2299 | { |
2300 | struct nilfs_sb_info *sbi = NILFS_SB(sb); | 2300 | struct nilfs_sb_info *sbi = NILFS_SB(sb); |
2301 | struct the_nilfs *nilfs = sbi->s_nilfs; | ||
2301 | struct nilfs_sc_info *sci = NILFS_SC(sbi); | 2302 | struct nilfs_sc_info *sci = NILFS_SC(sbi); |
2302 | struct nilfs_inode_info *ii; | 2303 | struct nilfs_inode_info *ii; |
2303 | struct nilfs_transaction_info ti; | 2304 | struct nilfs_transaction_info ti; |
@@ -2310,9 +2311,9 @@ int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode, | |||
2310 | 2311 | ||
2311 | ii = NILFS_I(inode); | 2312 | ii = NILFS_I(inode); |
2312 | if (test_bit(NILFS_I_INODE_DIRTY, &ii->i_state) || | 2313 | if (test_bit(NILFS_I_INODE_DIRTY, &ii->i_state) || |
2313 | nilfs_test_opt(sbi, STRICT_ORDER) || | 2314 | nilfs_test_opt(nilfs, STRICT_ORDER) || |
2314 | test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) || | 2315 | test_bit(NILFS_SC_UNCLOSED, &sci->sc_flags) || |
2315 | nilfs_discontinued(sbi->s_nilfs)) { | 2316 | nilfs_discontinued(nilfs)) { |
2316 | nilfs_transaction_unlock(sbi); | 2317 | nilfs_transaction_unlock(sbi); |
2317 | err = nilfs_segctor_sync(sci); | 2318 | err = nilfs_segctor_sync(sci); |
2318 | return err; | 2319 | return err; |
@@ -2480,14 +2481,14 @@ int nilfs_clean_segments(struct super_block *sb, struct nilfs_argv *argv, | |||
2480 | set_current_state(TASK_INTERRUPTIBLE); | 2481 | set_current_state(TASK_INTERRUPTIBLE); |
2481 | schedule_timeout(sci->sc_interval); | 2482 | schedule_timeout(sci->sc_interval); |
2482 | } | 2483 | } |
2483 | if (nilfs_test_opt(sbi, DISCARD)) { | 2484 | if (nilfs_test_opt(nilfs, DISCARD)) { |
2484 | int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs, | 2485 | int ret = nilfs_discard_segments(nilfs, sci->sc_freesegs, |
2485 | sci->sc_nfreesegs); | 2486 | sci->sc_nfreesegs); |
2486 | if (ret) { | 2487 | if (ret) { |
2487 | printk(KERN_WARNING | 2488 | printk(KERN_WARNING |
2488 | "NILFS warning: error %d on discard request, " | 2489 | "NILFS warning: error %d on discard request, " |
2489 | "turning discards off for the device\n", ret); | 2490 | "turning discards off for the device\n", ret); |
2490 | nilfs_clear_opt(sbi, DISCARD); | 2491 | nilfs_clear_opt(nilfs, DISCARD); |
2491 | } | 2492 | } |
2492 | } | 2493 | } |
2493 | 2494 | ||