summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/the_nilfs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-08-16 01:54:52 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-23 09:24:36 +0900
commitf11459ad7dab9e9eb5a05b8bd3bec338ea8f485d (patch)
tree91808a1f88f6ad24f381473e1bde22f10cac49e6 /fs/nilfs2/the_nilfs.h
parentab4d8f7ebf33beff97e766d18db47f1ea9635769 (diff)
downloadop-kernel-dev-f11459ad7dab9e9eb5a05b8bd3bec338ea8f485d.zip
op-kernel-dev-f11459ad7dab9e9eb5a05b8bd3bec338ea8f485d.tar.gz
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/the_nilfs.h')
-rw-r--r--fs/nilfs2/the_nilfs.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h
index 0afede6..7b43693 100644
--- a/fs/nilfs2/the_nilfs.h
+++ b/fs/nilfs2/the_nilfs.h
@@ -52,16 +52,13 @@ enum {
* @ns_bdi: backing dev info
* @ns_writer: back pointer to writable nilfs_sb_info
* @ns_sem: semaphore for shared states
- * @ns_super_sem: semaphore for global operations across super block instances
* @ns_mount_mutex: mutex protecting mount process of nilfs
* @ns_writer_sem: semaphore protecting ns_writer attach/detach
- * @ns_current: back pointer to current mount
* @ns_sbh: buffer heads of on-disk super blocks
* @ns_sbp: pointers to super block data
* @ns_sbwtime: previous write time of super block
* @ns_sbwcount: write count of super block
* @ns_sbsize: size of valid data in super block
- * @ns_supers: list of nilfs super block structs
* @ns_seg_seq: segment sequence counter
* @ns_segnum: index number of the latest full segment.
* @ns_nextnum: index number of the full segment index to be used next
@@ -104,17 +101,10 @@ struct the_nilfs {
struct backing_dev_info *ns_bdi;
struct nilfs_sb_info *ns_writer;
struct rw_semaphore ns_sem;
- struct rw_semaphore ns_super_sem;
struct mutex ns_mount_mutex;
struct rw_semaphore ns_writer_sem;
/*
- * components protected by ns_super_sem
- */
- struct nilfs_sb_info *ns_current;
- struct list_head ns_supers;
-
- /*
* used for
* - loading the latest checkpoint exclusively.
* - allocating a new full segment.
@@ -294,12 +284,6 @@ nilfs_detach_writer(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
up_write(&nilfs->ns_writer_sem);
}
-static inline void nilfs_put_sbinfo(struct nilfs_sb_info *sbi)
-{
- if (atomic_dec_and_test(&sbi->s_count))
- kfree(sbi);
-}
-
static inline int nilfs_valid_fs(struct the_nilfs *nilfs)
{
unsigned valid_fs;
OpenPOWER on IntegriCloud