Skip to content

Commit 4dfdb71

Browse files
dhowellsAl Viro
authored andcommitted
orangefs: Implement show_options
Implement the show_options superblock op for orangefs as part of a bid to rid of s_options and generic_show_options() to make it easier to implement a context-based mount where the mount options can be passed individually over a file descriptor. Signed-off-by: David Howells <dhowells@redhat.com> cc: Mike Marshall <hubcap@omnibond.com> cc: pvfs2-developers@beowulf-underground.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c4fac91 commit 4dfdb71

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

fs/orangefs/super.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ static const match_table_t tokens = {
3535

3636
uint64_t orangefs_features;
3737

38+
static int orangefs_show_options(struct seq_file *m, struct dentry *root)
39+
{
40+
struct orangefs_sb_info_s *orangefs_sb = ORANGEFS_SB(root->d_sb);
41+
42+
if (root->d_sb->s_flags & MS_POSIXACL)
43+
seq_puts(m, ",acl");
44+
if (orangefs_sb->flags & ORANGEFS_OPT_INTR)
45+
seq_puts(m, ",intr");
46+
if (orangefs_sb->flags & ORANGEFS_OPT_LOCAL_LOCK)
47+
seq_puts(m, ",local_lock");
48+
return 0;
49+
}
50+
3851
static int parse_mount_options(struct super_block *sb, char *options,
3952
int silent)
4053
{
@@ -305,7 +318,7 @@ static const struct super_operations orangefs_s_ops = {
305318
.drop_inode = generic_delete_inode,
306319
.statfs = orangefs_statfs,
307320
.remount_fs = orangefs_remount_fs,
308-
.show_options = generic_show_options,
321+
.show_options = orangefs_show_options,
309322
};
310323

311324
static struct dentry *orangefs_fh_to_dentry(struct super_block *sb,

0 commit comments

Comments
 (0)