Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6
[pandora-kernel.git] / include / linux / nilfs2_fs.h
index f5487b6..227e49d 100644 (file)
@@ -4,16 +4,16 @@
  * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
+ * You should have received a copy of the GNU Lesser General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
@@ -147,7 +147,6 @@ struct nilfs_super_root {
 #define NILFS_MOUNT_ERRORS_CONT                0x0010  /* Continue on errors */
 #define NILFS_MOUNT_ERRORS_RO          0x0020  /* Remount fs ro on errors */
 #define NILFS_MOUNT_ERRORS_PANIC       0x0040  /* Panic on errors */
-#define NILFS_MOUNT_SNAPSHOT           0x0080  /* Snapshot flag */
 #define NILFS_MOUNT_BARRIER            0x1000  /* Use block barriers */
 #define NILFS_MOUNT_STRICT_ORDER       0x2000  /* Apply strict in-order
                                                   semantics also for data */
@@ -229,6 +228,7 @@ struct nilfs_super_block {
  */
 #define NILFS_CURRENT_REV      2       /* current major revision */
 #define NILFS_MINOR_REV                0       /* minor revision */
+#define NILFS_MIN_SUPP_REV     2       /* minimum supported revision */
 
 /*
  * Feature set definitions
@@ -269,6 +269,14 @@ struct nilfs_super_block {
 #define NILFS_MIN_NRSVSEGS     8       /* Minimum number of reserved
                                           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
  */