aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-04-06 22:01:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:19 -0400
commit2c2e52fc4fca251e68f90821c9ff5cb18be4df58 (patch)
treefb0b86203bb5f4dda4d5907e29bd2b1b6cc0be90 /include/linux
parent7a9461939a46345860622ea36ff267ee4446f00f (diff)
nilfs2: extend nilfs_sustat ioctl struct
This adds a new argument to the nilfs_sustat structure. The extended field allows to delete volatile active state of segments, which was needed to protect freshly-created segments from garbage collection but has confused code dealing with segments. This extension alleviates the mess and gives room for further simplifications. The volatile active flag is not persistent, so it's eliminable on this occasion without affecting compatibility other than the ioctl change. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nilfs2_fs.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index 306c446e694e..aa93f0ee29d4 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -565,8 +565,6 @@ enum {
565 NILFS_SEGMENT_USAGE_DIRTY, 565 NILFS_SEGMENT_USAGE_DIRTY,
566 NILFS_SEGMENT_USAGE_ERROR, 566 NILFS_SEGMENT_USAGE_ERROR,
567 567
568 /* on-memory only */
569 NILFS_SEGMENT_USAGE_VOLATILE_ACTIVE,
570 /* ... */ 568 /* ... */
571}; 569};
572 570
@@ -594,7 +592,6 @@ nilfs_segment_usage_##name(const struct nilfs_segment_usage *su) \
594NILFS_SEGMENT_USAGE_FNS(ACTIVE, active) 592NILFS_SEGMENT_USAGE_FNS(ACTIVE, active)
595NILFS_SEGMENT_USAGE_FNS(DIRTY, dirty) 593NILFS_SEGMENT_USAGE_FNS(DIRTY, dirty)
596NILFS_SEGMENT_USAGE_FNS(ERROR, error) 594NILFS_SEGMENT_USAGE_FNS(ERROR, error)
597NILFS_SEGMENT_USAGE_FNS(VOLATILE_ACTIVE, volatile_active)
598 595
599static inline void 596static inline void
600nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su) 597nilfs_segment_usage_set_clean(struct nilfs_segment_usage *su)
@@ -650,7 +647,6 @@ nilfs_suinfo_##name(const struct nilfs_suinfo *si) \
650NILFS_SUINFO_FNS(ACTIVE, active) 647NILFS_SUINFO_FNS(ACTIVE, active)
651NILFS_SUINFO_FNS(DIRTY, dirty) 648NILFS_SUINFO_FNS(DIRTY, dirty)
652NILFS_SUINFO_FNS(ERROR, error) 649NILFS_SUINFO_FNS(ERROR, error)
653NILFS_SUINFO_FNS(VOLATILE_ACTIVE, volatile_active)
654 650
655static inline int nilfs_suinfo_clean(const struct nilfs_suinfo *si) 651static inline int nilfs_suinfo_clean(const struct nilfs_suinfo *si)
656{ 652{
@@ -717,8 +713,9 @@ struct nilfs_cpstat {
717 * @ss_nsegs: number of segments 713 * @ss_nsegs: number of segments
718 * @ss_ncleansegs: number of clean segments 714 * @ss_ncleansegs: number of clean segments
719 * @ss_ndirtysegs: number of dirty segments 715 * @ss_ndirtysegs: number of dirty segments
720 * @ss_ctime: 716 * @ss_ctime: creation time of the last segment
721 * @ss_nongc_ctime: 717 * @ss_nongc_ctime: creation time of the last segment not for GC
718 * @ss_prot_seq: least sequence number of segments which must not be reclaimed
722 */ 719 */
723struct nilfs_sustat { 720struct nilfs_sustat {
724 __u64 ss_nsegs; 721 __u64 ss_nsegs;
@@ -726,6 +723,7 @@ struct nilfs_sustat {
726 __u64 ss_ndirtysegs; 723 __u64 ss_ndirtysegs;
727 __u64 ss_ctime; 724 __u64 ss_ctime;
728 __u64 ss_nongc_ctime; 725 __u64 ss_nongc_ctime;
726 __u64 ss_prot_seq;
729}; 727};
730 728
731/** 729/**