All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>,
	Joern Engel <joern@logfs.org>
Subject: [PATCH mmotm 4/5] nilfs2: insert explanations in gcinode file
Date: Fri, 12 Dec 2008 14:17:00 +0900	[thread overview]
Message-ID: <1229059021-9538-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp> (raw)
In-Reply-To: <1229059021-9538-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp>

The file gcinode.c gives buffer cache functions for on-disk blocks
moved in garbage collection.  Joern Engel has suggested inserting its
explanations in the source file (Message-ID:
<20080917144146.GD8750@logfs.org> and
<20080917224953.GB14644@logfs.org>).

This follows the comment.

Cc: Joern Engel <joern@logfs.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
---
 fs/nilfs2/gcinode.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
index 0013952..77615aa 100644
--- a/fs/nilfs2/gcinode.c
+++ b/fs/nilfs2/gcinode.c
@@ -1,5 +1,5 @@
 /*
- * gcinode.c - NILFS memory inode for GC
+ * gcinode.c - dummy inodes to buffer blocks for garbage collection
  *
  * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
  *
@@ -22,6 +22,25 @@
  * Revised by Ryusuke Konishi <ryusuke@osrg.net>.
  *
  */
+/*
+ * This file adds the cache of on-disk blocks to be moved in garbage
+ * collection.  The disk blocks are held with dummy inodes (called
+ * gcinodes), and this file provides lookup function of the dummy
+ * inodes and their buffer read function.
+ *
+ * Since NILFS2 keeps up multiple checkpoints/snapshots accross GC, it
+ * has to treat blocks that belong to a same file but have different
+ * checkpoint numbers.  To avoid interference among generations, dummy
+ * inodes are managed separatly from actual inodes, and their lookup
+ * function (nilfs_gc_iget) is designed to be specified with a
+ * checkpoint number argument as well as an inode number.
+ *
+ * Buffers and pages held by the dummy inodes will be released each
+ * time after they are copied to a new log.  Dirty blocks made on the
+ * current generation and the blocks to be moved by GC never overlap
+ * because the dirty blocks make a new generation; they rather must be
+ * written individually.
+ */
 
 #include <linux/buffer_head.h>
 #include <linux/mpage.h>
-- 
1.5.6.5


  reply	other threads:[~2008-12-12  5:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12  5:16 [PATCH mmotm 0/5] nilfs2 filesystem updates Ryusuke Konishi
2008-12-12  5:16 ` [PATCH mmotm 1/5] nilfs2: fix problems of memory allocation in ioctl Ryusuke Konishi
2008-12-12  5:16   ` [PATCH mmotm 2/5] nilfs2: cleanup nilfs_clear_inode Ryusuke Konishi
2008-12-12  5:16     ` [PATCH mmotm 3/5] nilfs2: avoid double error caused by nilfs_transaction_end Ryusuke Konishi
2008-12-12  5:17       ` Ryusuke Konishi [this message]
2008-12-12  5:17         ` [PATCH mmotm 5/5] nilfs2: add maintainer Ryusuke Konishi
2008-12-12  7:50       ` [PATCH mmotm 3/5] nilfs2: avoid double error caused by nilfs_transaction_end Pekka Enberg
2008-12-12 13:47   ` [PATCH mmotm 1/5] nilfs2: fix problems of memory allocation in ioctl Andi Kleen
2008-12-12 18:48     ` Ryusuke Konishi
2008-12-12 20:24       ` Andi Kleen
2008-12-13  8:29         ` Ryusuke Konishi
2008-12-14 12:08           ` Ryusuke Konishi
2008-12-14 15:13             ` Andi Kleen
2008-12-15  6:58               ` Ryusuke Konishi
2008-12-15 10:17                 ` Andi Kleen

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=1229059021-9538-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp \
    --to=konishi.ryusuke@lab.ntt.co.jp \
    --cc=akpm@linux-foundation.org \
    --cc=joern@logfs.org \
    --cc=linux-fsdevel@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 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.