From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>
Subject: [PATCH 32/34] docs: filesystems: convert sysfs-tagging.txt to ReST
Date: Wed, 15 Apr 2020 16:32:45 +0200 [thread overview]
Message-ID: <73189273bad97f990d0cc08de81f8b7530e961a6.1586960617.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1586960617.git.mchehab+huawei@kernel.org>
- Add a SPDX header;
- Adjust document title;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to filesystems/index.rst.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
Documentation/filesystems/index.rst | 1 +
.../{sysfs-tagging.txt => sysfs-tagging.rst} | 22 ++++++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
rename Documentation/filesystems/{sysfs-tagging.txt => sysfs-tagging.rst} (72%)
diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst
index 34d5f53931e7..687fe64d8b5c 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -37,6 +37,7 @@ algorithms work.
seq_file
sharedsubtree
sysfs-pci
+ sysfs-tagging
automount-support
diff --git a/Documentation/filesystems/sysfs-tagging.txt b/Documentation/filesystems/sysfs-tagging.rst
similarity index 72%
rename from Documentation/filesystems/sysfs-tagging.txt
rename to Documentation/filesystems/sysfs-tagging.rst
index c7c8e6438958..8888a05c398e 100644
--- a/Documentation/filesystems/sysfs-tagging.txt
+++ b/Documentation/filesystems/sysfs-tagging.rst
@@ -1,5 +1,8 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=============
Sysfs tagging
--------------
+=============
(Taken almost verbatim from Eric Biederman's netns tagging patch
commit msg)
@@ -18,25 +21,28 @@ in the directories and applications only see a limited set of
the network devices.
Each sysfs directory entry may be tagged with a namespace via the
-void *ns member of its kernfs_node. If a directory entry is tagged,
-then kernfs_node->flags will have a flag between KOBJ_NS_TYPE_NONE
+``void *ns member`` of its ``kernfs_node``. If a directory entry is tagged,
+then ``kernfs_node->flags`` will have a flag between KOBJ_NS_TYPE_NONE
and KOBJ_NS_TYPES, and ns will point to the namespace to which it
belongs.
-Each sysfs superblock's kernfs_super_info contains an array void
-*ns[KOBJ_NS_TYPES]. When a task in a tagging namespace
+Each sysfs superblock's kernfs_super_info contains an array
+``void *ns[KOBJ_NS_TYPES]``. When a task in a tagging namespace
kobj_nstype first mounts sysfs, a new superblock is created. It
will be differentiated from other sysfs mounts by having its
-s_fs_info->ns[kobj_nstype] set to the new namespace. Note that
+``s_fs_info->ns[kobj_nstype]`` set to the new namespace. Note that
through bind mounting and mounts propagation, a task can easily view
the contents of other namespaces' sysfs mounts. Therefore, when a
namespace exits, it will call kobj_ns_exit() to invalidate any
kernfs_node->ns pointers pointing to it.
Users of this interface:
-- define a type in the kobj_ns_type enumeration.
-- call kobj_ns_type_register() with its kobj_ns_type_operations which has
+
+- define a type in the ``kobj_ns_type`` enumeration.
+- call kobj_ns_type_register() with its ``kobj_ns_type_operations`` which has
+
- current_ns() which returns current's namespace
- netlink_ns() which returns a socket's namespace
- initial_ns() which returns the initial namesapce
+
- call kobj_ns_exit() when an individual tag is no longer valid
--
2.25.2
next prev parent reply other threads:[~2020-04-15 14:37 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 14:32 [PATCH 00/34] fs: convert remaining docs to ReST file format Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 01/34] docs: filesystems: fix references for doc files there Mauro Carvalho Chehab
2020-04-16 1:10 ` Joseph Qi
2020-04-15 14:32 ` [PATCH 02/34] docs: filesystems: convert caching/object.txt to ReST Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 03/34] docs: filesystems: convert caching/fscache.txt to ReST format Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 04/34] docs: filesystems: caching/netfs-api.txt: convert it to ReST Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 05/34] docs: filesystems: caching/operations.txt: " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 06/34] docs: filesystems: caching/cachefiles.txt: convert " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 07/34] docs: filesystems: caching/backend-api.txt: convert it " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 08/34] docs: filesystems: convert cifs/cifsroot.rst " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 09/34] docs: filesystems: convert configfs.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 10/34] docs: filesystems: convert automount-support.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 11/34] docs: filesystems: convert coda.txt " Mauro Carvalho Chehab
2020-04-15 15:08 ` Jan Harkes
2020-04-15 14:32 ` [PATCH 12/34] docs: filesystems: convert dax.txt " Mauro Carvalho Chehab
2020-04-15 15:41 ` Darrick J. Wong
2020-04-21 16:31 ` Mauro Carvalho Chehab
2020-04-21 18:31 ` Darrick J. Wong
2020-04-21 19:53 ` Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 13/34] docs: filesystems: convert devpts.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 14/34] docs: filesystems: convert dnotify.txt " Mauro Carvalho Chehab
2020-04-16 8:45 ` Jan Kara
2020-04-15 14:32 ` [PATCH 15/34] docs: filesystems: convert fiemap.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 16/34] docs: filesystems: convert files.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 17/34] docs: filesystems: convert fuse-io.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 18/34] docs: filesystems: convert gfs2-glocks.txt " Mauro Carvalho Chehab
2020-04-15 14:52 ` Andreas Gruenbacher
2020-04-15 14:32 ` [PATCH 19/34] docs: filesystems: convert locks.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 20/34] docs: filesystems: convert mandatory-locking.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 21/34] docs: filesystems: convert mount_api.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 22/34] docs: filesystems: rename path-lookup.txt file Mauro Carvalho Chehab
2020-04-16 2:00 ` Eric Biggers
2020-04-21 16:38 ` Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 23/34] docs: filesystems: convert path-walking.txt to ReST Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 24/34] docs: filesystems: convert quota.txt " Mauro Carvalho Chehab
2020-04-16 8:47 ` Jan Kara
2020-04-15 14:32 ` [PATCH 25/34] docs: filesystems: convert seq_file.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 26/34] docs: filesystems: convert sharedsubtree.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 27/34] docs: filesystems: split spufs.txt into 3 separate files Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 28/34] docs: filesystems: convert spufs/spu_create.txt to ReST Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 29/34] docs: filesystems: convert spufs/spufs.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 30/34] docs: filesystems: convert spufs/spu_run.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 31/34] docs: filesystems: convert sysfs-pci.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` Mauro Carvalho Chehab [this message]
2020-04-15 14:32 ` [PATCH 33/34] docs: filesystems: convert xfs-delayed-logging-design.txt " Mauro Carvalho Chehab
2020-04-15 14:32 ` [PATCH 34/34] docs: filesystems: convert xfs-self-describing-metadata.txt " Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73189273bad97f990d0cc08de81f8b7530e961a6.1586960617.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®