nilfs2: mark minor flag for checkpoint created by internal operation
Nilfs creates checkpoints even for garbage collection or metadata updates such as checkpoint mode change. So, user often sees checkpoints created only by such internal operations. This is inconvenient in some situations. For example, application that monitors checkpoints and changes them to snapshots, will fall into an infinite loop because it cannot distinguish internally created checkpoints. This patch solves this sort of problem by adding a flag to checkpoint for identification. 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>
This commit is contained in:

committed by
Linus Torvalds

parent
458c5b0822
commit
c96fa464a5
@@ -470,6 +470,7 @@ enum {
|
||||
NILFS_CHECKPOINT_SNAPSHOT,
|
||||
NILFS_CHECKPOINT_INVALID,
|
||||
NILFS_CHECKPOINT_SKETCH,
|
||||
NILFS_CHECKPOINT_MINOR,
|
||||
};
|
||||
|
||||
#define NILFS_CHECKPOINT_FNS(flag, name) \
|
||||
@@ -494,6 +495,7 @@ nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp) \
|
||||
|
||||
NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot)
|
||||
NILFS_CHECKPOINT_FNS(INVALID, invalid)
|
||||
NILFS_CHECKPOINT_FNS(MINOR, minor)
|
||||
|
||||
/**
|
||||
* struct nilfs_cpinfo - checkpoint information
|
||||
@@ -526,6 +528,7 @@ nilfs_cpinfo_##name(const struct nilfs_cpinfo *cpinfo) \
|
||||
|
||||
NILFS_CPINFO_FNS(SNAPSHOT, snapshot)
|
||||
NILFS_CPINFO_FNS(INVALID, invalid)
|
||||
NILFS_CPINFO_FNS(MINOR, minor)
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user