Skip to content

Commit

Permalink
orangefs: Implement show_options
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells authored and Al Viro committed Jul 11, 2017
1 parent c4fac91 commit 4dfdb71
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion fs/orangefs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ static const match_table_t tokens = {

uint64_t orangefs_features;

static int orangefs_show_options(struct seq_file *m, struct dentry *root)
{
struct orangefs_sb_info_s *orangefs_sb = ORANGEFS_SB(root->d_sb);

if (root->d_sb->s_flags & MS_POSIXACL)
seq_puts(m, ",acl");
if (orangefs_sb->flags & ORANGEFS_OPT_INTR)
seq_puts(m, ",intr");
if (orangefs_sb->flags & ORANGEFS_OPT_LOCAL_LOCK)
seq_puts(m, ",local_lock");
return 0;
}

static int parse_mount_options(struct super_block *sb, char *options,
int silent)
{
Expand Down Expand Up @@ -305,7 +318,7 @@ static const struct super_operations orangefs_s_ops = {
.drop_inode = generic_delete_inode,
.statfs = orangefs_statfs,
.remount_fs = orangefs_remount_fs,
.show_options = generic_show_options,
.show_options = orangefs_show_options,
};

static struct dentry *orangefs_fh_to_dentry(struct super_block *sb,
Expand Down

0 comments on commit 4dfdb71

Please sign in to comment.