diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-11-23 13:38:21 (GMT) |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-11-23 13:38:21 (GMT) |
commit | 34a2d313c51f47cae50ccb89f4196462665f2c48 (patch) | |
tree | c641c7bd24b9e343139a3e1c4d81e51822114cd9 /fs/hfsplus/options.c | |
parent | e34947056076ca5467ee8256d2d9cbc594a79b37 (diff) | |
download | linux-34a2d313c51f47cae50ccb89f4196462665f2c48.tar.xz |
hfsplus: flush disk caches in sync and fsync
Flush the disk cache in fsync and sync to make sure data actually is
on disk on completion of these system calls. There is a nobarrier
mount option to disable this behaviour. It's slightly misnamed now
that barrier actually are gone, but it matches the name used by all
major filesystems.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/options.c')
-rw-r--r-- | fs/hfsplus/options.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 43b02b5..dbd9d0c 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c @@ -23,6 +23,7 @@ enum { opt_umask, opt_uid, opt_gid, opt_part, opt_session, opt_nls, opt_nodecompose, opt_decompose, + opt_barrier, opt_nobarrier, opt_force, opt_err }; @@ -37,6 +38,8 @@ static const match_table_t tokens = { { opt_nls, "nls=%s" }, { opt_decompose, "decompose" }, { opt_nodecompose, "nodecompose" }, + { opt_barrier, "barrier" }, + { opt_nobarrier, "nobarrier" }, { opt_force, "force" }, { opt_err, NULL } }; @@ -174,6 +177,12 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) case opt_nodecompose: set_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags); break; + case opt_barrier: + clear_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags); + break; + case opt_nobarrier: + set_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags); + break; case opt_force: set_bit(HFSPLUS_SB_FORCE, &sbi->flags); break; @@ -212,5 +221,7 @@ int hfsplus_show_options(struct seq_file *seq, struct vfsmount *mnt) seq_printf(seq, ",nls=%s", sbi->nls->charset); if (test_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags)) seq_printf(seq, ",nodecompose"); + if (test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags)) + seq_printf(seq, ",nobarrier"); return 0; } |