Skip to content

Commit

Permalink
ext4: snapshot list support
Browse files Browse the repository at this point in the history
Implementation of multiple incremental snapshots.
Snapshot inodes are chained on a list starting at the super block,
both on-disk and in-memory, similar to the orphan inodes.
Unlink and truncate of snapshot inodes on the list is not allowed,
so an inode can never be chained on both orphan and snapshot lists.
We make use of this fact to overload the in-memory inode field
ext4_inode_info.i_orphan for the chaining of snapshots.


Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
  • Loading branch information
Amir Goldstein committed Jun 6, 2011
1 parent 9208cd0 commit 8db49fa
Show file tree
Hide file tree
Showing 3 changed files with 307 additions and 24 deletions.
1 change: 1 addition & 0 deletions fs/ext4/ext4.h
Expand Up @@ -1194,6 +1194,7 @@ struct ext4_sb_info {
struct block_device *journal_bdev;
struct mutex s_snapshot_mutex; /* protects 2 fields below: */
struct inode *s_active_snapshot; /* [ s_snapshot_mutex ] */
struct list_head s_snapshot_list; /* [ s_snapshot_mutex ] */
#ifdef CONFIG_JBD2_DEBUG
struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */
wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */
Expand Down

0 comments on commit 8db49fa

Please sign in to comment.