diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-15 12:54:52 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:36 -0400 |
commit | f11459ad7dab9e9eb5a05b8bd3bec338ea8f485d (patch) | |
tree | 91808a1f88f6ad24f381473e1bde22f10cac49e6 /fs/nilfs2/sb.h | |
parent | ab4d8f7ebf33beff97e766d18db47f1ea9635769 (diff) |
nilfs2: do not allocate multiple super block instances for a device
This stops allocating multiple super block instances for a device.
All snapshots and a current mode mount (i.e. latest tree) will be
controlled with nilfs_root objects that are kept within an sb
instance.
nilfs_get_sb() is rewritten so that it always has a root object for
the latest tree and snapshots make additional root objects.
The root dentry of the latest tree is binded to sb->s_root even if it
isn't attached on a directory. Root dentries of snapshots or the
latest tree are binded to mnt->mnt_root on which they are mounted.
With this patch, nilfs_find_sbinfo() function, nilfs->ns_supers list,
and nilfs->ns_current back pointer, are deleted. In addition,
init_nilfs() and load_nilfs() are simplified since they will be called
once for a device, not repeatedly called for mount points.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/sb.h')
-rw-r--r-- | fs/nilfs2/sb.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/nilfs2/sb.h b/fs/nilfs2/sb.h index 3cc3675c3abe..35a07157b980 100644 --- a/fs/nilfs2/sb.h +++ b/fs/nilfs2/sb.h | |||
@@ -42,9 +42,6 @@ struct nilfs_sc_info; | |||
42 | * NILFS super-block data in memory | 42 | * NILFS super-block data in memory |
43 | */ | 43 | */ |
44 | struct nilfs_sb_info { | 44 | struct nilfs_sb_info { |
45 | /* Snapshot status */ | ||
46 | __u64 s_snapshot_cno; /* Checkpoint number */ | ||
47 | |||
48 | /* Mount options */ | 45 | /* Mount options */ |
49 | unsigned long s_mount_opt; | 46 | unsigned long s_mount_opt; |
50 | uid_t s_resuid; | 47 | uid_t s_resuid; |
@@ -57,8 +54,6 @@ struct nilfs_sb_info { | |||
57 | /* Fundamental members */ | 54 | /* Fundamental members */ |
58 | struct super_block *s_super; /* reverse pointer to super_block */ | 55 | struct super_block *s_super; /* reverse pointer to super_block */ |
59 | struct the_nilfs *s_nilfs; | 56 | struct the_nilfs *s_nilfs; |
60 | struct list_head s_list; /* list head for nilfs->ns_supers */ | ||
61 | atomic_t s_count; /* reference count */ | ||
62 | 57 | ||
63 | /* Segment constructor */ | 58 | /* Segment constructor */ |
64 | struct list_head s_dirty_files; /* dirty files list */ | 59 | struct list_head s_dirty_files; /* dirty files list */ |