From: Hans Reiser <reiser@namesys.com>
To: Andrew Morton <akpm@osdl.org>, vs <vs@thebsh.namesys.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [Fwd: [PATCH 6/8] reiser4-improved-comment.patch]
Date: Wed, 16 Nov 2005 00:57:46 -0800 [thread overview]
Message-ID: <437AF48A.1090502@namesys.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: [PATCH 6/8] reiser4-improved-comment.patch --]
[-- Type: message/rfc822, Size: 5604 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 2 bytes --]
.
[-- Attachment #2.1.2: reiser4-improved-comment.patch --]
[-- Type: text/plain, Size: 4328 bytes --]
From: Vladimir Saveliev <vs@namesys.com>
Improved comment for structure hint. Cleanup.
Signed-off-by: Vladimir V. Saveliev <vs@namesys.com>
fs/reiser4/plugin/file/file.h | 67 +++++++++++++++++++++++++-----------------
1 files changed, 40 insertions(+), 27 deletions(-)
diff -puN fs/reiser4/plugin/file/file.h~reiser4-improved-comment fs/reiser4/plugin/file/file.h
--- linux-2.6.14-mm2/fs/reiser4/plugin/file/file.h~reiser4-improved-comment 2005-11-15 17:19:21.000000000 +0300
+++ linux-2.6.14-mm2-vs/fs/reiser4/plugin/file/file.h 2005-11-15 17:19:21.000000000 +0300
@@ -42,9 +42,11 @@ void init_inode_data_unix_file(struct in
int create);
int delete_object_unix_file(struct inode *);
-/* all the write into unix file is performed by item write method. Write method
- of unix file plugin only decides which item plugin (extent or tail) and in
- which mode (one from the enum below) to call */
+/*
+ * all the write into unix file is performed by item write method. Write method
+ * of unix file plugin only decides which item plugin (extent or tail) and in
+ * which mode (one from the enum below) to call
+ */
typedef enum {
FIRST_ITEM = 1,
APPEND_ITEM = 2,
@@ -64,23 +66,29 @@ struct inode;
/* unix file plugin specific part of reiser4 inode */
typedef struct unix_file_info {
- /* this read-write lock protects file containerization change. Accesses
- which do not change file containerization (see file_container_t)
- (read, readpage, writepage, write (until tail conversion is
- involved)) take read-lock. Accesses which modify file
- containerization (truncate, conversion from tail to extent and back)
- take write-lock. */
+ /*
+ * this read-write lock protects file containerization change. Accesses
+ * which do not change file containerization (see file_container_t)
+ * (read, readpage, writepage, write (until tail conversion is
+ * involved)) take read-lock. Accesses which modify file
+ * containerization (truncate, conversion from tail to extent and back)
+ * take write-lock.
+ */
struct rw_semaphore latch;
- /* this semaphore is used to serialize writes instead of inode->i_sem,
- because write_unix_file uses get_user_pages which is to be used
- under mm->mmap_sem and because it is required to take mm->mmap_sem
- before inode->i_sem, so inode->i_sem would have to be up()-ed before
- calling to get_user_pages which is unacceptable */
+ /*
+ * this semaphore is used to serialize writes instead of inode->i_sem,
+ * because write_unix_file uses get_user_pages which is to be used
+ * under mm->mmap_sem and because it is required to take mm->mmap_sem
+ * before inode->i_sem, so inode->i_sem would have to be up()-ed before
+ * calling to get_user_pages which is unacceptable
+ */
struct semaphore write;
/* this enum specifies which items are used to build the file */
file_container_t container;
- /* plugin which controls when file is to be converted to extents and
- back to tail */
+ /*
+ * plugin which controls when file is to be converted to extents and
+ * back to tail
+ */
struct formatting_plugin *tplug;
/* if this is set, file is in exclusive use */
int exclusive_use;
@@ -117,10 +125,15 @@ struct uf_coord {
#include "../../seal.h"
#include "../../lock.h"
-/* structure used to speed up file operations (reads and writes). It contains
- * a seal over last file item accessed. */
+/*
+ * This structure is used to speed up file operations (reads and writes). A
+ * hint is a suggestion about where a key resolved to last time. A seal
+ * indicates whether a node has been modified since a hint was last recorded.
+ * You check the seal, and if the seal is still valid, you can use the hint
+ * without traversing the tree again.
+ */
struct hint {
- seal_t seal;
+ seal_t seal; /* a seal over last file item accessed */
uf_coord_t ext_coord;
loff_t offset;
znode_lock_mode mode;
@@ -203,12 +216,12 @@ extern reiser4_plugin_ops cryptcompress_
#endif
/*
- Local variables:
- c-indentation-style: "K&R"
- mode-name: "LC"
- c-basic-offset: 8
- tab-width: 8
- fill-column: 120
- scroll-step: 1
- End:
+ * Local variables:
+ * c-indentation-style: "K&R"
+ * mode-name: "LC"
+ * c-basic-offset: 8
+ * tab-width: 8
+ * fill-column: 79
+ * scroll-step: 1
+ * End:
*/
_
reply other threads:[~2005-11-16 8:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=437AF48A.1090502@namesys.com \
--to=reiser@namesys.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vs@thebsh.namesys.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.