{"id":784686,"url":"http://patchwork.ozlabs.org/api/patches/784686/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/149926829650.20611.7487998328479640331.stgit@warthog.procyon.org.uk/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<149926829650.20611.7487998328479640331.stgit@warthog.procyon.org.uk>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/149926829650.20611.7487998328479640331.stgit@warthog.procyon.org.uk/","date":"2017-07-05T15:24:56","name":"[07/14] spufs: Implement show_options","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"a847ff1389dfdc18d7f1509f37166c1e7be97f2e","submitter":{"id":59,"url":"http://patchwork.ozlabs.org/api/people/59/?format=json","name":"David Howells","email":"dhowells@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/149926829650.20611.7487998328479640331.stgit@warthog.procyon.org.uk/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/784686/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/784686/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3x2l8L5z8yz9s7C\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  6 Jul 2017 01:26:26 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3x2l8L4v3szDr1g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  6 Jul 2017 01:26:26 +1000 (AEST)","from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3x2l6h63jszDqhn\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu,  6 Jul 2017 01:25:00 +1000 (AEST)","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 70E6A80474;\n\tWed,  5 Jul 2017 15:24:58 +0000 (UTC)","from warthog.procyon.org.uk (ovpn-120-70.rdu2.redhat.com\n\t[10.10.120.70])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 426D77E8FD;\n\tWed,  5 Jul 2017 15:24:57 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 70E6A80474","Authentication-Results":["ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=pass smtp.mailfrom=dhowells@redhat.com"],"DKIM-Filter":"OpenDKIM Filter v2.11.0 mx1.redhat.com 70E6A80474","Organization":"Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley\n\tPlace, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United\n\tKingdom.\n\tRegistered in England and Wales under Company Registration No.\n\t3798903","Subject":"[PATCH 07/14] spufs: Implement show_options","From":"David Howells <dhowells@redhat.com>","To":"viro@zeniv.linux.org.uk","Date":"Wed, 05 Jul 2017 16:24:56 +0100","Message-ID":"<149926829650.20611.7487998328479640331.stgit@warthog.procyon.org.uk>","In-Reply-To":"<149926824154.20611.6104595541055328700.stgit@warthog.procyon.org.uk>","References":"<149926824154.20611.6104595541055328700.stgit@warthog.procyon.org.uk>","User-Agent":"StGit/0.17.1-dirty","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]); Wed, 05 Jul 2017 15:24:58 +0000 (UTC)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"dhowells@redhat.com, linux-fsdevel@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org, Jeremy Kerr <jk@ozlabs.org>,\n\tlinux-kernel@vger.kernel.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"Implement the show_options superblock op for spufs as part of a bid to get\nrid of s_options and generic_show_options() to make it easier to implement\na context-based mount where the mount options can be passed individually\nover a file descriptor.\n\nSigned-off-by: David Howells <dhowells@redhat.com>\ncc: Jeremy Kerr <jk@ozlabs.org>\ncc: linuxppc-dev@lists.ozlabs.org\n---\n\n arch/powerpc/platforms/cell/spufs/inode.c |   21 ++++++++++++++++++---\n 1 file changed, 18 insertions(+), 3 deletions(-)","diff":"diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c\nindex d8af9bc0489f..27a51a60bc33 100644\n--- a/arch/powerpc/platforms/cell/spufs/inode.c\n+++ b/arch/powerpc/platforms/cell/spufs/inode.c\n@@ -605,6 +605,23 @@ static const match_table_t spufs_tokens = {\n \t{ Opt_err,    NULL  },\n };\n \n+static int spufs_show_options(struct seq_file *m, struct dentry *root)\n+{\n+\tstruct spufs_sb_info *sbi = spufs_get_sb_info(root->d_sb);\n+\n+\tif (!uid_eq(root->i_uid, GLOBAL_ROOT_UID))\n+\t\tseq_printf(m, \",uid=%u\",\n+\t\t\t   from_kuid_munged(&init_user_ns, root->i_uid));\n+\tif (!gid_eq(root->i_gid, GLOBAL_ROOT_GID))\n+\t\tseq_printf(m, \",gid=%u\",\n+\t\t\t   from_kgid_munged(&init_user_ns, root->i_gid));\n+\tif (root->i_mode & S_IALLUGO != 0775)\n+\t\tseq_printf(m, \",mode=%o\", root->i_mode);\n+\tif (sbi->debug)\n+\t\tseq_puts(m, \",debug\");\n+\treturn 0;\n+}\n+\n static int\n spufs_parse_options(struct super_block *sb, char *options, struct inode *root)\n {\n@@ -724,11 +741,9 @@ spufs_fill_super(struct super_block *sb, void *data, int silent)\n \t\t.destroy_inode = spufs_destroy_inode,\n \t\t.statfs = simple_statfs,\n \t\t.evict_inode = spufs_evict_inode,\n-\t\t.show_options = generic_show_options,\n+\t\t.show_options = spufs_show_options,\n \t};\n \n-\tsave_mount_options(sb, data);\n-\n \tinfo = kzalloc(sizeof(*info), GFP_KERNEL);\n \tif (!info)\n \t\treturn -ENOMEM;\n","prefixes":["07/14"]}