From 4fea9b2d94c2e2190985cd7fe601af11bd981713 Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Mon, 6 Apr 2009 19:01:45 -0700 Subject: [PATCH] --- yaml --- r: 142627 b: refs/heads/master c: 047180f2d7bf95ff5699ca04da639a7556e23435 h: refs/heads/master i: 142625: 8e101d4b8ebbe8c54702fdb64eaff83426adffc5 142623: ca9d1a5cd63b0dbf4cd1923a4d912fdba950020b v: v3 --- [refs] | 2 +- trunk/fs/nilfs2/gcinode.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9718d8167d6e..0bd12b2fd7e8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 47420c799830d4676e544dbec56b2a7f787528f5 +refs/heads/master: 047180f2d7bf95ff5699ca04da639a7556e23435 diff --git a/trunk/fs/nilfs2/gcinode.c b/trunk/fs/nilfs2/gcinode.c index 001395266325..77615aabc7e2 100644 --- a/trunk/fs/nilfs2/gcinode.c +++ b/trunk/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 . * */ +/* + * 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 #include