linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	David Howells <dhowells@redhat.com>,
	linux-cachefs@redhat.com
Subject: [PATCH v3 01/29] docs: filesystems: convert caching/object.txt to ReST
Date: Mon, 27 Apr 2020 23:16:53 +0200	[thread overview]
Message-ID: <49026a8ea7e714c2e0f003aa26b975b1025476b7.1588021877.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1588021877.git.mchehab+huawei@kernel.org>

- Add a SPDX header;
- Adjust document and section titles;
- Comment out text ToC for html/pdf output;
- Some whitespace fixes and new line breaks;
- Adjust the events list to make them look better for html output;
- Add it to filesystems/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/filesystems/caching/fscache.txt |  2 +-
 Documentation/filesystems/caching/index.rst   |  9 ++++
 .../caching/{object.txt => object.rst}        | 43 ++++++++-----------
 Documentation/filesystems/index.rst           |  2 +
 fs/fscache/object.c                           |  2 +-
 5 files changed, 31 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/filesystems/caching/index.rst
 rename Documentation/filesystems/caching/{object.txt => object.rst} (95%)

diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index 50f0a5757f48..071ff50a774d 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -191,7 +191,7 @@ The cache backend API to FS-Cache can be found in:
 A description of the internal representations and object state machine can be
 found in:
 
-	Documentation/filesystems/caching/object.txt
+	Documentation/filesystems/caching/object.rst
 
 
 =======================
diff --git a/Documentation/filesystems/caching/index.rst b/Documentation/filesystems/caching/index.rst
new file mode 100644
index 000000000000..e5ec95ff0be2
--- /dev/null
+++ b/Documentation/filesystems/caching/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Filesystem Caching
+==================
+
+.. toctree::
+   :maxdepth: 2
+
+   object
diff --git a/Documentation/filesystems/caching/object.txt b/Documentation/filesystems/caching/object.rst
similarity index 95%
rename from Documentation/filesystems/caching/object.txt
rename to Documentation/filesystems/caching/object.rst
index 100ff41127e4..ce0e043ccd33 100644
--- a/Documentation/filesystems/caching/object.txt
+++ b/Documentation/filesystems/caching/object.rst
@@ -1,10 +1,12 @@
-	     ====================================================
-	     IN-KERNEL CACHE OBJECT REPRESENTATION AND MANAGEMENT
-	     ====================================================
+.. SPDX-License-Identifier: GPL-2.0
+
+====================================================
+In-Kernel Cache Object Representation and Management
+====================================================
 
 By: David Howells <dhowells@redhat.com>
 
-Contents:
+.. Contents:
 
  (*) Representation
 
@@ -18,8 +20,7 @@ Contents:
  (*) The set of events.
 
 
-==============
-REPRESENTATION
+Representation
 ==============
 
 FS-Cache maintains an in-kernel representation of each object that a netfs is
@@ -38,7 +39,7 @@ or even by no objects (it may not be cached).
 
 Furthermore, both cookies and objects are hierarchical.  The two hierarchies
 correspond, but the cookies tree is a superset of the union of the object trees
-of multiple caches:
+of multiple caches::
 
 	    NETFS INDEX TREE               :      CACHE 1     :      CACHE 2
 	                                   :                  :
@@ -89,8 +90,7 @@ pointers to the cookies.  The cookies themselves and any objects attached to
 those cookies are hidden from it.
 
 
-===============================
-OBJECT MANAGEMENT STATE MACHINE
+Object Management State Machine
 ===============================
 
 Within FS-Cache, each active object is managed by its own individual state
@@ -124,7 +124,7 @@ is not masked, the object will be queued for processing (by calling
 fscache_enqueue_object()).
 
 
-PROVISION OF CPU TIME
+Provision of CPU Time
 ---------------------
 
 The work to be done by the various states was given CPU time by the threads of
@@ -141,7 +141,7 @@ because:
      workqueues don't necessarily have the right numbers of threads.
 
 
-LOCKING SIMPLIFICATION
+Locking Simplification
 ----------------------
 
 Because only one worker thread may be operating on any particular object's
@@ -151,8 +151,7 @@ from the cache backend's representation (fscache_object) - which may be
 requested from either end.
 
 
-=================
-THE SET OF STATES
+The Set of States
 =================
 
 The object state machine has a set of states that it can be in.  There are
@@ -275,19 +274,17 @@ memory and potentially deletes stuff from disk:
      this state.
 
 
-THE SET OF EVENTS
+The Set of Events
 -----------------
 
 There are a number of events that can be raised to an object state machine:
 
- (*) FSCACHE_OBJECT_EV_UPDATE
-
+ FSCACHE_OBJECT_EV_UPDATE
      The netfs requested that an object be updated.  The state machine will ask
      the cache backend to update the object, and the cache backend will ask the
      netfs for details of the change through its cookie definition ops.
 
- (*) FSCACHE_OBJECT_EV_CLEARED
-
+ FSCACHE_OBJECT_EV_CLEARED
      This is signalled in two circumstances:
 
      (a) when an object's last child object is dropped and
@@ -296,20 +293,16 @@ There are a number of events that can be raised to an object state machine:
 
      This is used to proceed from the dying state.
 
- (*) FSCACHE_OBJECT_EV_ERROR
-
+ FSCACHE_OBJECT_EV_ERROR
      This is signalled when an I/O error occurs during the processing of some
      object.
 
- (*) FSCACHE_OBJECT_EV_RELEASE
- (*) FSCACHE_OBJECT_EV_RETIRE
-
+ FSCACHE_OBJECT_EV_RELEASE, FSCACHE_OBJECT_EV_RETIRE
      These are signalled when the netfs relinquishes a cookie it was using.
      The event selected depends on whether the netfs asks for the backing
      object to be retired (deleted) or retained.
 
- (*) FSCACHE_OBJECT_EV_WITHDRAW
-
+ FSCACHE_OBJECT_EV_WITHDRAW
      This is signalled when the cache backend wants to withdraw an object.
      This means that the object will have to be detached from the netfs's
      cookie.
diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst
index 0641429f53a2..f8781c13aee3 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -25,6 +25,8 @@ algorithms work.
    locking
    directory-locking
 
+   caching/index
+
    porting
 
 Filesystem support layers
diff --git a/fs/fscache/object.c b/fs/fscache/object.c
index cfeba839a0f2..efaa003b8323 100644
--- a/fs/fscache/object.c
+++ b/fs/fscache/object.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
  *
- * See Documentation/filesystems/caching/object.txt for a description of the
+ * See Documentation/filesystems/caching/object.rst for a description of the
  * object state machine and the in-kernel representations.
  */
 
-- 
2.25.4


  reply	other threads:[~2020-04-27 21:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 21:16 [PATCH v3 00/29] Convert files to ReST - part 2 Mauro Carvalho Chehab
2020-04-27 21:16 ` Mauro Carvalho Chehab [this message]
2020-04-27 21:16 ` [PATCH v3 02/29] docs: filesystems: convert caching/fscache.txt to ReST format Mauro Carvalho Chehab
2020-04-27 21:16 ` [PATCH v3 03/29] docs: filesystems: caching/netfs-api.txt: convert it to ReST Mauro Carvalho Chehab
2020-04-27 21:16 ` [PATCH v3 04/29] docs: filesystems: caching/operations.txt: " Mauro Carvalho Chehab
2020-04-27 21:16 ` [PATCH v3 05/29] docs: filesystems: caching/cachefiles.txt: convert " Mauro Carvalho Chehab
2020-04-27 21:16 ` [PATCH v3 06/29] docs: filesystems: caching/backend-api.txt: convert it " Mauro Carvalho Chehab
2020-04-27 21:16 ` [PATCH v3 07/29] docs: filesystems: convert cifs/cifsroot.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 08/29] docs: filesystems: convert automount-support.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 09/29] docs: filesystems: convert coda.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 10/29] docs: filesystems: convert devpts.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 11/29] docs: filesystems: convert dnotify.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 12/29] docs: filesystems: convert fiemap.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 13/29] docs: filesystems: convert files.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 14/29] docs: filesystems: convert fuse-io.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 15/29] docs: filesystems: convert locks.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 16/29] docs: filesystems: convert mandatory-locking.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 17/29] docs: filesystems: convert mount_api.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 18/29] docs: filesystems: convert quota.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 19/29] docs: filesystems: convert seq_file.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 20/29] docs: filesystems: convert sharedsubtree.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 21/29] docs: filesystems: split spufs.txt into 3 separate files Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 22/29] docs: filesystems: convert spufs/spu_create.txt to ReST Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 23/29] docs: filesystems: convert spufs/spufs.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 24/29] docs: filesystems: convert spufs/spu_run.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 25/29] docs: filesystems: convert sysfs-pci.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 26/29] docs: filesystems: convert sysfs-tagging.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 27/29] docs: filesystems: convert xfs-delayed-logging-design.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 28/29] docs: filesystems: convert xfs-self-describing-metadata.txt " Mauro Carvalho Chehab
2020-04-27 21:17 ` [PATCH v3 29/29] docs: filesystems: convert configfs.txt " Mauro Carvalho Chehab
2020-04-27 21:43   ` [PATCH v3.1] " Mauro Carvalho Chehab
2020-04-27 21:46     ` Joe Perches
2020-04-28 19:01 ` [PATCH v3 00/29] Convert files to ReST - part 2 Jonathan Corbet
2020-04-28 19:25   ` Jan Harkes
2020-05-05 15:28   ` Jonathan Corbet

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=49026a8ea7e714c2e0f003aa26b975b1025476b7.1588021877.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dhowells@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).