#ifndef OCFS2_H
#define OCFS2_H
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/list.h>
#include <linux/llist.h>
#include <linux/rbtree.h>
#include <linux/workqueue.h>
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/lockdep.h>
#include <linux/jbd2.h>
#include "stackglue.h"
#include "ocfs2_fs.h"
#include "ocfs2_lockid.h"
#include "ocfs2_ioctl.h"
#include "blockcheck.h"
#include "reservations.h"
#include "filecheck.h"
#define OCFS2_CACHE_INFO_MAX_ARRAY …
enum ocfs2_caching_info_flags { … };
struct ocfs2_caching_operations;
struct ocfs2_caching_info { … };
struct super_block *ocfs2_metadata_cache_get_super(struct ocfs2_caching_info *ci);
#define OCFS2_NODE_MAP_MAX_NODES …
struct ocfs2_node_map { … };
enum ocfs2_ast_action { … };
enum ocfs2_unlock_action { … };
#define OCFS2_LOCK_ATTACHED …
#define OCFS2_LOCK_BUSY …
#define OCFS2_LOCK_BLOCKED …
#define OCFS2_LOCK_LOCAL …
#define OCFS2_LOCK_NEEDS_REFRESH …
#define OCFS2_LOCK_REFRESHING …
#define OCFS2_LOCK_INITIALIZED …
#define OCFS2_LOCK_FREEING …
#define OCFS2_LOCK_QUEUED …
#define OCFS2_LOCK_NOCACHE …
#define OCFS2_LOCK_PENDING …
#define OCFS2_LOCK_UPCONVERT_FINISHING …
#define OCFS2_LOCK_NONBLOCK_FINISHED …
struct ocfs2_lock_res_ops;
ocfs2_lock_callback;
#ifdef CONFIG_OCFS2_FS_STATS
struct ocfs2_lock_stats { … };
#endif
struct ocfs2_lock_res { … };
enum ocfs2_orphan_reco_type { … };
enum ocfs2_orphan_scan_state { … };
struct ocfs2_orphan_scan { … };
struct ocfs2_dlm_debug { … };
enum ocfs2_vol_state
{ … };
struct ocfs2_alloc_stats
{ … };
enum ocfs2_local_alloc_state
{ … };
enum ocfs2_mount_options
{ … };
#define OCFS2_OSB_SOFT_RO …
#define OCFS2_OSB_HARD_RO …
#define OCFS2_OSB_ERROR_FS …
#define OCFS2_DEFAULT_ATIME_QUANTUM …
struct ocfs2_triggers { … };
enum ocfs2_journal_trigger_type { … };
#define OCFS2_JOURNAL_TRIGGER_COUNT …
void ocfs2_initialize_journal_triggers(struct super_block *sb,
struct ocfs2_triggers triggers[]);
struct ocfs2_journal;
struct ocfs2_slot_info;
struct ocfs2_recovery_map;
struct ocfs2_replay_map;
struct ocfs2_quota_recovery;
struct ocfs2_super
{ … };
#define OCFS2_SB(sb) …
ocfs2_journal_access_func;
static inline int ocfs2_should_order_data(struct inode *inode)
{ … }
static inline int ocfs2_sparse_alloc(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_writes_unwritten_extents(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_supports_append_dio(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_supports_inline_data(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_supports_xattr(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_meta_ecc(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_supports_indexed_dirs(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_supports_discontig_bg(struct ocfs2_super *osb)
{ … }
static inline unsigned int ocfs2_link_max(struct ocfs2_super *osb)
{ … }
static inline unsigned int ocfs2_read_links_count(struct ocfs2_dinode *di)
{ … }
static inline void ocfs2_set_links_count(struct ocfs2_dinode *di, u32 nlink)
{ … }
static inline void ocfs2_add_links_count(struct ocfs2_dinode *di, int n)
{ … }
static inline int ocfs2_refcount_tree(struct ocfs2_super *osb)
{ … }
static inline void ocfs2_set_osb_flag(struct ocfs2_super *osb,
unsigned long flag)
{ … }
static inline void ocfs2_set_ro_flag(struct ocfs2_super *osb,
int hard)
{ … }
static inline int ocfs2_is_hard_readonly(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_is_soft_readonly(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_clusterinfo_valid(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_userspace_stack(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_o2cb_stack(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_cluster_o2cb_global_heartbeat(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_mount_local(struct ocfs2_super *osb)
{ … }
static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb)
{ … }
#define OCFS2_IS_VALID_DINODE(ptr) …
#define OCFS2_IS_VALID_EXTENT_BLOCK(ptr) …
#define OCFS2_IS_VALID_GROUP_DESC(ptr) …
#define OCFS2_IS_VALID_XATTR_BLOCK(ptr) …
#define OCFS2_IS_VALID_DIR_TRAILER(ptr) …
#define OCFS2_IS_VALID_DX_ROOT(ptr) …
#define OCFS2_IS_VALID_DX_LEAF(ptr) …
#define OCFS2_IS_VALID_REFCOUNT_BLOCK(ptr) …
static inline unsigned long ino_from_blkno(struct super_block *sb,
u64 blkno)
{ … }
static inline u64 ocfs2_clusters_to_blocks(struct super_block *sb,
u32 clusters)
{ … }
static inline u32 ocfs2_clusters_for_blocks(struct super_block *sb,
u64 blocks)
{ … }
static inline u32 ocfs2_blocks_to_clusters(struct super_block *sb,
u64 blocks)
{ … }
static inline unsigned int ocfs2_clusters_for_bytes(struct super_block *sb,
u64 bytes)
{ … }
static inline unsigned int ocfs2_bytes_to_clusters(struct super_block *sb,
u64 bytes)
{ … }
static inline u64 ocfs2_blocks_for_bytes(struct super_block *sb,
u64 bytes)
{ … }
static inline u64 ocfs2_clusters_to_bytes(struct super_block *sb,
u32 clusters)
{ … }
static inline u64 ocfs2_block_to_cluster_start(struct super_block *sb,
u64 blocks)
{ … }
static inline u64 ocfs2_align_bytes_to_clusters(struct super_block *sb,
u64 bytes)
{ … }
static inline u64 ocfs2_align_bytes_to_blocks(struct super_block *sb,
u64 bytes)
{ … }
static inline unsigned long ocfs2_align_bytes_to_sectors(u64 bytes)
{ … }
static inline unsigned int ocfs2_page_index_to_clusters(struct super_block *sb,
unsigned long pg_index)
{ … }
static inline pgoff_t ocfs2_align_clusters_to_page_index(struct super_block *sb,
u32 clusters)
{ … }
static inline unsigned int ocfs2_pages_per_cluster(struct super_block *sb)
{ … }
static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb,
unsigned int megs)
{ … }
static inline unsigned int ocfs2_clusters_to_megabytes(struct super_block *sb,
unsigned int clusters)
{ … }
static inline void _ocfs2_set_bit(unsigned int bit, unsigned long *bitmap)
{ … }
#define ocfs2_set_bit(bit, addr) …
static inline void _ocfs2_clear_bit(unsigned int bit, unsigned long *bitmap)
{ … }
#define ocfs2_clear_bit(bit, addr) …
#define ocfs2_test_bit …
#define ocfs2_find_next_zero_bit …
#define ocfs2_find_next_bit …
static inline void *correct_addr_and_bit_unaligned(int *bit, void *addr)
{ … }
static inline void ocfs2_set_bit_unaligned(int bit, void *bitmap)
{ … }
static inline void ocfs2_clear_bit_unaligned(int bit, void *bitmap)
{ … }
static inline int ocfs2_test_bit_unaligned(int bit, void *bitmap)
{ … }
static inline int ocfs2_find_next_zero_bit_unaligned(void *bitmap, int max,
int start)
{ … }
#endif