aboutsummaryrefslogtreecommitdiff
path: root/include/linux/seq_file.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-08-08 10:54:31 +0800
committerMister Oyster <oysterized@gmail.com>2017-10-04 15:33:35 +0200
commit51bf5853e012152eea41342499ed03655714421c (patch)
tree9e116293144948bc4d0fd5025d16476edbd41c83 /include/linux/seq_file.h
parentc1dd7253e91d1b27117b513386ffb7dc115f149e (diff)
f2fs: support journalled quota
This patch supports to enable f2fs to accept quota information through mount option: - {usr,grp,prj}jquota=<quota file path> - jqfmt=<quota type> Then, in ->mount flow, we can recover quota file during log replaying, by this, journelled quota can be supported. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/seq_file.h')
-rw-r--r--include/linux/seq_file.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 373ce821f..87b44cf63 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -158,6 +158,23 @@ static inline struct user_namespace *seq_user_ns(struct seq_file *seq)
#endif
}
+/**
+ * seq_show_options - display mount options with appropriate escapes.
+ * @m: the seq_file handle
+ * @name: the mount option name
+ * @value: the mount option name's value, can be NULL
+ */
+static inline void seq_show_option(struct seq_file *m, const char *name,
+ const char *value)
+{
+ seq_putc(m, ',');
+ seq_escape(m, name, ",= \t\n\\");
+ if (value) {
+ seq_putc(m, '=');
+ seq_escape(m, value, ", \t\n\\");
+ }
+}
+
#define SEQ_START_TOKEN ((void *)1)
/*
* Helpers for iteration over list_head-s in seq_files