[PATCH 02/14] PMFS: Remove pmfs_sb.h
Matthew Wilcox
matthew.r.wilcox at intel.com
Mon Oct 7 09:36:15 EDT 2013
From: Matthew Wilcox <willy at linux.intel.com>
Move the definition of pmfs_sb_info to fs/pmfs/pmfs.h
Signed-off-by: Matthew Wilcox <matthew.r.wilcox at intel.com>
---
fs/pmfs/pmfs.h | 64 +++++++++++++++++++++++++++++++++++++++--
include/linux/pmfs_sb.h | 76 -------------------------------------------------
2 files changed, 61 insertions(+), 79 deletions(-)
delete mode 100644 include/linux/pmfs_sb.h
diff --git a/fs/pmfs/pmfs.h b/fs/pmfs/pmfs.h
index 78b9fdb..1a79c34 100644
--- a/fs/pmfs/pmfs.h
+++ b/fs/pmfs/pmfs.h
@@ -15,14 +15,13 @@
#ifndef __PMFS_H
#define __PMFS_H
-#include <linux/buffer_head.h>
#include <linux/pmfs_def.h>
-#include <linux/pmfs_sb.h>
#include <linux/crc16.h>
#include <linux/mutex.h>
+#include <linux/pagemap.h>
#include <linux/rcupdate.h>
#include <linux/types.h>
-#include "wprotect.h"
+
#include "journal.h"
#define PAGE_SHIFT_2M 21
@@ -260,6 +259,63 @@ struct pmfs_inode_vfs {
struct inode vfs_inode;
};
+/*
+ * PMFS super-block data in memory
+ */
+struct pmfs_sb_info {
+ /*
+ * base physical and virtual address of PMFS (which is also
+ * the pointer to the super block)
+ */
+ phys_addr_t phys_addr;
+ void *virt_addr;
+ struct list_head block_inuse_head;
+ unsigned long block_start;
+ unsigned long block_end;
+ unsigned long num_free_blocks;
+ char pmfs_backing_file[256];
+ struct mutex s_lock; /* protects the SB's buffer-head */
+
+ /*
+ * Backing store option:
+ * 1 = no load, 2 = no store,
+ * else do both
+ */
+ unsigned int pmfs_backing_option;
+
+ /* Mount options */
+ unsigned long bpi;
+ unsigned long num_inodes;
+ unsigned long blocksize;
+ unsigned long initsize;
+ unsigned long s_mount_opt;
+ kuid_t uid; /* Mount uid for root directory */
+ kgid_t gid; /* Mount gid for root directory */
+ umode_t mode; /* Mount mode for root directory */
+ atomic_t next_generation;
+ /* inode tracking */
+ struct mutex inode_table_mutex;
+ unsigned int s_inodes_count; /* total inodes count (used or free) */
+ unsigned int s_free_inodes_count; /* free inodes count */
+ unsigned int s_inodes_used_count;
+ unsigned int s_free_inode_hint;
+
+ unsigned long num_blocknode_allocated;
+
+ /* Journaling related structures */
+ uint32_t next_transaction_id;
+ uint32_t jsize;
+ void *journal_base_addr;
+ struct mutex journal_mutex;
+ struct task_struct *log_cleaner_thread;
+ wait_queue_head_t log_cleaner_wait;
+ bool redo_log;
+
+ /* truncate list related structures */
+ struct list_head s_truncate;
+ struct mutex s_truncate_lock;
+};
+
static inline struct pmfs_sb_info *PMFS_SB(struct super_block *sb)
{
return sb->s_fs_info;
@@ -521,6 +577,8 @@ static inline void check_eof_blocks(struct super_block *sb,
pi->i_flags &= cpu_to_le32(~PMFS_EOFBLOCKS_FL);
}
+#include "wprotect.h"
+
/*
* Inodes and files operations
*/
diff --git a/include/linux/pmfs_sb.h b/include/linux/pmfs_sb.h
deleted file mode 100644
index eb5dc4f..0000000
--- a/include/linux/pmfs_sb.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * BRIEF DESCRIPTION
- *
- * Definitions for the PMFS.
- *
- * Copyright 2012-2013 Intel Corporation
- * Copyright 2009-2011 Marco Stornelli <marco.stornelli at gmail.com>
- * Copyright 2003 Sony Corporation
- * Copyright 2003 Matsushita Electric Industrial Co., Ltd.
- * 2003-2004 (c) MontaVista Software, Inc. , Steve Longerbeam
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef _LINUX_PMFS_SB
-#define _LINUX_PMFS_SB
-
-/*
- * PMFS super-block data in memory
- */
-struct pmfs_sb_info {
- /*
- * base physical and virtual address of PMFS (which is also
- * the pointer to the super block)
- */
- phys_addr_t phys_addr;
- void *virt_addr;
- struct list_head block_inuse_head;
- unsigned long block_start;
- unsigned long block_end;
- unsigned long num_free_blocks;
- char pmfs_backing_file[256];
- struct mutex s_lock; /* protects the SB's buffer-head */
-
- /*
- * Backing store option:
- * 1 = no load, 2 = no store,
- * else do both
- */
- unsigned int pmfs_backing_option;
-
- /* Mount options */
- unsigned long bpi;
- unsigned long num_inodes;
- unsigned long blocksize;
- unsigned long initsize;
- unsigned long s_mount_opt;
- kuid_t uid; /* Mount uid for root directory */
- kgid_t gid; /* Mount gid for root directory */
- umode_t mode; /* Mount mode for root directory */
- atomic_t next_generation;
- /* inode tracking */
- struct mutex inode_table_mutex;
- unsigned int s_inodes_count; /* total inodes count (used or free) */
- unsigned int s_free_inodes_count; /* free inodes count */
- unsigned int s_inodes_used_count;
- unsigned int s_free_inode_hint;
-
- unsigned long num_blocknode_allocated;
-
- /* Journaling related structures */
- uint32_t next_transaction_id;
- uint32_t jsize;
- void *journal_base_addr;
- struct mutex journal_mutex;
- struct task_struct *log_cleaner_thread;
- wait_queue_head_t log_cleaner_wait;
- bool redo_log;
-
- /* truncate list related structures */
- struct list_head s_truncate;
- struct mutex s_truncate_lock;
-};
-
-#endif /* _LINUX_PMFS_SB */
--
1.8.4.rc3
More information about the Linux-pmfs
mailing list