diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-20 20:10:38 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-23 09:24:33 +0900 |
commit | 6c43f41000312fefa482c3bfdd97e7f81d6be0ec (patch) | |
tree | de22a81c028f33d9fc2354bfdc218191b96240cf /include/linux/nilfs2_fs.h | |
parent | 7d6cd92fe2de3c286b8e95f43223f09db9302635 (diff) | |
download | linux-6c43f41000312fefa482c3bfdd97e7f81d6be0ec.tar.gz linux-6c43f41000312fefa482c3bfdd97e7f81d6be0ec.tar.bz2 linux-6c43f41000312fefa482c3bfdd97e7f81d6be0ec.zip |
nilfs2: keep zero value in i_cno except for gc-inodes
On-memory inode structures of nilfs have a member "i_cno" which stores
a checkpoint number related to the inode. For gc-inodes, this field
indicates version of data each gc-inode caches for GC. Log writer
temporarily uses "i_cno" to transfer the latest checkpoint number.
This stops the latter use and lets only gc-inodes use it.
The purpose of this patch is to allow the successive change use
"i_cno" for inode lookup.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'include/linux/nilfs2_fs.h')
-rw-r--r-- | include/linux/nilfs2_fs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index b07f5cdff5e2..bcdb34c68d08 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h @@ -271,6 +271,14 @@ struct nilfs_super_block { segments */ /* + * We call DAT, cpfile, and sufile root metadata files. Inodes of + * these files are written in super root block instead of ifile, and + * garbage collector doesn't keep any past versions of these files. + */ +#define NILFS_ROOT_METADATA_FILE(ino) \ + ((ino) >= NILFS_DAT_INO && (ino) <= NILFS_SUFILE_INO) + +/* * bytes offset of secondary super block */ #define NILFS_SB2_OFFSET_BYTES(devsize) ((((devsize) >> 12) - 1) << 12) |