diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-05 14:27:04 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-23 10:02:12 +0900 |
commit | 802d31775404ee335ca1e97a82e1e706a4c843be (patch) | |
tree | 3753263ea97748e6c2b01f29fb7f81c19381eb7b /fs/nilfs2 | |
parent | 773bc4f3b6898634a80a41c72a1f34cb89992dcd (diff) | |
download | kernel_samsung_tuna-802d31775404ee335ca1e97a82e1e706a4c843be.zip kernel_samsung_tuna-802d31775404ee335ca1e97a82e1e706a4c843be.tar.gz kernel_samsung_tuna-802d31775404ee335ca1e97a82e1e706a4c843be.tar.bz2 |
nilfs2: add nodiscard mount option
Nilfs has "discard" mount option which issues discard/TRIM commands to
underlying block device, but it lacks a complementary option and has
no way to disable the feature through remount.
This adds "nodiscard" option to resolve this imbalance.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 13b0e95..9da1221 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -604,7 +604,7 @@ static const struct export_operations nilfs_export_ops = { enum { Opt_err_cont, Opt_err_panic, Opt_err_ro, Opt_barrier, Opt_nobarrier, Opt_snapshot, Opt_order, Opt_norecovery, - Opt_discard, Opt_err, + Opt_discard, Opt_nodiscard, Opt_err, }; static match_table_t tokens = { @@ -617,6 +617,7 @@ static match_table_t tokens = { {Opt_order, "order=%s"}, {Opt_norecovery, "norecovery"}, {Opt_discard, "discard"}, + {Opt_nodiscard, "nodiscard"}, {Opt_err, NULL} }; @@ -676,6 +677,9 @@ static int parse_options(char *options, struct super_block *sb) case Opt_discard: nilfs_set_opt(sbi, DISCARD); break; + case Opt_nodiscard: + nilfs_clear_opt(sbi, DISCARD); + break; default: printk(KERN_ERR "NILFS: Unrecognized mount option \"%s\"\n", p); |