]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/nilfs2_fs.h
nilfs2: support nanosecond timestamp
[linux-2.6-omap-h63xx.git] / include / linux / nilfs2_fs.h
index 306c446e694e6e93672a16aeb477cf90179acba4..79fec6af3f9f805800d7bfdce69bc15301215dc2 100644 (file)
  * struct nilfs_inode - structure of an inode on disk
  * @i_blocks: blocks count
  * @i_size: size in bytes
- * @i_ctime: creation time
- * @i_mtime: modification time
- * @i_dtime: deletion time
+ * @i_ctime: creation time (seconds)
+ * @i_mtime: modification time (seconds)
+ * @i_ctime_nsec: creation time (nano seconds)
+ * @i_mtime_nsec: modification time (nano seconds)
  * @i_uid: user id
  * @i_gid: group id
  * @i_mode: file mode
@@ -85,7 +86,8 @@ struct nilfs_inode {
        __le64  i_size;
        __le64  i_ctime;
        __le64  i_mtime;
-       __le64  i_dtime;
+       __le32  i_ctime_nsec;
+       __le32  i_mtime_nsec;
        __le32  i_uid;
        __le32  i_gid;
        __le16  i_mode;
@@ -252,6 +254,10 @@ struct nilfs_super_block {
 #define NILFS_MIN_NRSVSEGS     8       /* Minimum number of reserved
                                           segments */
 
+/*
+ * bytes offset of secondary super block
+ */
+#define NILFS_SB2_OFFSET_BYTES(devsize)        ((((devsize) >> 12) - 1) << 12)
 
 /*
  * Maximal count of links to a file
@@ -470,6 +476,7 @@ enum {
        NILFS_CHECKPOINT_SNAPSHOT,
        NILFS_CHECKPOINT_INVALID,
        NILFS_CHECKPOINT_SKETCH,
+       NILFS_CHECKPOINT_MINOR,
 };
 
 #define NILFS_CHECKPOINT_FNS(flag, name)                               \
@@ -494,7 +501,7 @@ nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp)          \
 
 NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
 NILFS_CHECKPOINT_FNS(INVALID, invalid)
-NILFS_CHECKPOINT_FNS(SKETCH, sketch)
+NILFS_CHECKPOINT_FNS(MINOR, minor)
 
 /**
  * struct nilfs_cpinfo - checkpoint information
@@ -527,7 +534,7 @@ nilfs_cpinfo_##name(const struct nilfs_cpinfo *cpinfo)                      \
 
 NILFS_CPINFO_FNS(SNAPSHOT, snapshot)
 NILFS_CPINFO_FNS(INVALID, invalid)
-NILFS_CPINFO_FNS(SKETCH, sketch)
+NILFS_CPINFO_FNS(MINOR, minor)
 
 
 /**
@@ -565,8 +572,6 @@ enum {
        NILFS_SEGMENT_USAGE_DIRTY,
        NILFS_SEGMENT_USAGE_ERROR,
 
-       /* on-memory only */
-       NILFS_SEGMENT_USAGE_VOLATILE_ACTIVE,
        /* ... */
 };
 
@@ -594,7 +599,6 @@ nilfs_segment_usage_##name(const struct nilfs_segment_usage *su)    \
 NILFS_SEGMENT_USAGE_FNS(ACTIVE, active)
 NILFS_SEGMENT_USAGE_FNS(DIRTY, dirty)
 NILFS_SEGMENT_USAGE_FNS(ERROR, error)
-NILFS_SEGMENT_USAGE_FNS(VOLATILE_ACTIVE, volatile_active)
 
 static inline void
 nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su)
@@ -650,7 +654,6 @@ nilfs_suinfo_##name(const struct nilfs_suinfo *si)                  \
 NILFS_SUINFO_FNS(ACTIVE, active)
 NILFS_SUINFO_FNS(DIRTY, dirty)
 NILFS_SUINFO_FNS(ERROR, error)
-NILFS_SUINFO_FNS(VOLATILE_ACTIVE, volatile_active)
 
 static inline int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
 {
@@ -717,8 +720,9 @@ struct nilfs_cpstat {
  * @ss_nsegs: number of segments
  * @ss_ncleansegs: number of clean segments
  * @ss_ndirtysegs: number of dirty segments
- * @ss_ctime:
- * @ss_nongc_ctime:
+ * @ss_ctime: creation time of the last segment
+ * @ss_nongc_ctime: creation time of the last segment not for GC
+ * @ss_prot_seq: least sequence number of segments which must not be reclaimed
  */
 struct nilfs_sustat {
        __u64 ss_nsegs;
@@ -726,6 +730,7 @@ struct nilfs_sustat {
        __u64 ss_ndirtysegs;
        __u64 ss_ctime;
        __u64 ss_nongc_ctime;
+       __u64 ss_prot_seq;
 };
 
 /**