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 04/29] docs: filesystems: caching/operations.txt: convert it to ReST
Date: Mon, 27 Apr 2020 23:16:56 +0200	[thread overview]
Message-ID: <97e71cc598a4f61df484ebda3ec06b63530ceb62.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;
- Mark literal blocks as such;
- Add it to filesystems/caching/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/filesystems/caching/index.rst   |  1 +
 .../{operations.txt => operations.rst}        | 45 +++++++++----------
 fs/fscache/operation.c                        |  2 +-
 3 files changed, 23 insertions(+), 25 deletions(-)
 rename Documentation/filesystems/caching/{operations.txt => operations.rst} (90%)

diff --git a/Documentation/filesystems/caching/index.rst b/Documentation/filesystems/caching/index.rst
index d0651db450fb..75492b7c8ea0 100644
--- a/Documentation/filesystems/caching/index.rst
+++ b/Documentation/filesystems/caching/index.rst
@@ -9,3 +9,4 @@ Filesystem Caching
    fscache
    object
    netfs-api
+   operations
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.rst
similarity index 90%
rename from Documentation/filesystems/caching/operations.txt
rename to Documentation/filesystems/caching/operations.rst
index d8976c434718..f7ddcc028939 100644
--- a/Documentation/filesystems/caching/operations.txt
+++ b/Documentation/filesystems/caching/operations.rst
@@ -1,10 +1,12 @@
-		       ================================
-		       ASYNCHRONOUS OPERATIONS HANDLING
-		       ================================
+.. SPDX-License-Identifier: GPL-2.0
+
+================================
+Asynchronous Operations Handling
+================================
 
 By: David Howells <dhowells@redhat.com>
 
-Contents:
+.. Contents:
 
  (*) Overview.
 
@@ -17,8 +19,7 @@ Contents:
  (*) Asynchronous callback.
 
 
-========
-OVERVIEW
+Overview
 ========
 
 FS-Cache has an asynchronous operations handling facility that it uses for its
@@ -33,11 +34,10 @@ backend for completion.
 To make use of this facility, <linux/fscache-cache.h> should be #included.
 
 
-===============================
-OPERATION RECORD INITIALISATION
+Operation Record Initialisation
 ===============================
 
-An operation is recorded in an fscache_operation struct:
+An operation is recorded in an fscache_operation struct::
 
 	struct fscache_operation {
 		union {
@@ -50,7 +50,7 @@ An operation is recorded in an fscache_operation struct:
 	};
 
 Someone wanting to issue an operation should allocate something with this
-struct embedded in it.  They should initialise it by calling:
+struct embedded in it.  They should initialise it by calling::
 
 	void fscache_operation_init(struct fscache_operation *op,
 				    fscache_operation_release_t release);
@@ -67,8 +67,7 @@ FSCACHE_OP_WAITING may be set in op->flags prior to each submission of the
 operation and waited for afterwards.
 
 
-==========
-PARAMETERS
+Parameters
 ==========
 
 There are a number of parameters that can be set in the operation record's flag
@@ -87,7 +86,7 @@ operations:
 
      If this option is to be used, FSCACHE_OP_WAITING must be set in op->flags
      before submitting the operation, and the operating thread must wait for it
-     to be cleared before proceeding:
+     to be cleared before proceeding::
 
 		wait_on_bit(&op->flags, FSCACHE_OP_WAITING,
 			    TASK_UNINTERRUPTIBLE);
@@ -101,7 +100,7 @@ operations:
      page to a netfs page after the backing fs has read the page in.
 
      If this option is used, op->fast_work and op->processor must be
-     initialised before submitting the operation:
+     initialised before submitting the operation::
 
 		INIT_WORK(&op->fast_work, do_some_work);
 
@@ -114,7 +113,7 @@ operations:
      pages that have just been fetched from a remote server.
 
      If this option is used, op->slow_work and op->processor must be
-     initialised before submitting the operation:
+     initialised before submitting the operation::
 
 		fscache_operation_init_slow(op, processor)
 
@@ -132,8 +131,7 @@ Furthermore, operations may be one of two types:
      operations running at the same time.
 
 
-=========
-PROCEDURE
+Procedure
 =========
 
 Operations are used through the following procedure:
@@ -143,7 +141,7 @@ Operations are used through the following procedure:
      generic op embedded within.
 
  (2) The submitting thread must then submit the operation for processing using
-     one of the following two functions:
+     one of the following two functions::
 
 	int fscache_submit_op(struct fscache_object *object,
 			      struct fscache_operation *op);
@@ -164,7 +162,7 @@ Operations are used through the following procedure:
      operation of conflicting exclusivity is in progress on the object.
 
      If the operation is asynchronous, the manager will retain a reference to
-     it, so the caller should put their reference to it by passing it to:
+     it, so the caller should put their reference to it by passing it to::
 
 	void fscache_put_operation(struct fscache_operation *op);
 
@@ -179,12 +177,12 @@ Operations are used through the following procedure:
  (4) The operation holds an effective lock upon the object, preventing other
      exclusive ops conflicting until it is released.  The operation can be
      enqueued for further immediate asynchronous processing by adjusting the
-     CPU time provisioning option if necessary, eg:
+     CPU time provisioning option if necessary, eg::
 
 	op->flags &= ~FSCACHE_OP_TYPE;
 	op->flags |= ~FSCACHE_OP_FAST;
 
-     and calling:
+     and calling::
 
 	void fscache_enqueue_operation(struct fscache_operation *op)
 
@@ -192,13 +190,12 @@ Operations are used through the following procedure:
      pools.
 
 
-=====================
-ASYNCHRONOUS CALLBACK
+Asynchronous Callback
 =====================
 
 When used in asynchronous mode, the worker thread pool will invoke the
 processor method with a pointer to the operation.  This should then get at the
-container struct by using container_of():
+container struct by using container_of()::
 
 	static void fscache_write_op(struct fscache_operation *_op)
 	{
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
index 1a22a55f75a0..4a5651d4904e 100644
--- a/fs/fscache/operation.c
+++ b/fs/fscache/operation.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
  *
- * See Documentation/filesystems/caching/operations.txt
+ * See Documentation/filesystems/caching/operations.rst
  */
 
 #define FSCACHE_DEBUG_LEVEL OPERATION
-- 
2.25.4


  parent reply	other threads:[~2020-04-27 21:18 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 ` [PATCH v3 01/29] docs: filesystems: convert caching/object.txt to ReST Mauro Carvalho Chehab
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 ` Mauro Carvalho Chehab [this message]
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=97e71cc598a4f61df484ebda3ec06b63530ceb62.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).