~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/ocfs2/ocfs2.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
 
148
148
typedef void (*ocfs2_lock_callback)(int status, unsigned long data);
149
149
 
 
150
#ifdef CONFIG_OCFS2_FS_STATS
 
151
struct ocfs2_lock_stats {
 
152
        u64             ls_total;       /* Total wait in NSEC */
 
153
        u32             ls_gets;        /* Num acquires */
 
154
        u32             ls_fail;        /* Num failed acquires */
 
155
 
 
156
        /* Storing max wait in usecs saves 24 bytes per inode */
 
157
        u32             ls_max;         /* Max wait in USEC */
 
158
};
 
159
#endif
 
160
 
150
161
struct ocfs2_lock_res {
151
162
        void                    *l_priv;
152
163
        struct ocfs2_lock_res_ops *l_ops;
182
193
        struct list_head         l_debug_list;
183
194
 
184
195
#ifdef CONFIG_OCFS2_FS_STATS
185
 
        unsigned long long       l_lock_num_prmode;        /* PR acquires */
186
 
        unsigned long long       l_lock_num_exmode;        /* EX acquires */
187
 
        unsigned int             l_lock_num_prmode_failed; /* Failed PR gets */
188
 
        unsigned int             l_lock_num_exmode_failed; /* Failed EX gets */
189
 
        unsigned long long       l_lock_total_prmode;      /* Tot wait for PR */
190
 
        unsigned long long       l_lock_total_exmode;      /* Tot wait for EX */
191
 
        unsigned int             l_lock_max_prmode;        /* Max wait for PR */
192
 
        unsigned int             l_lock_max_exmode;        /* Max wait for EX */
193
 
        unsigned int             l_lock_refresh;           /* Disk refreshes */
 
196
        struct ocfs2_lock_stats  l_lock_prmode;         /* PR mode stats */
 
197
        u32                      l_lock_refresh;        /* Disk refreshes */
 
198
        struct ocfs2_lock_stats  l_lock_exmode;         /* EX mode stats */
194
199
#endif
195
200
#ifdef CONFIG_DEBUG_LOCK_ALLOC
196
201
        struct lockdep_map       l_lockdep_map;
831
836
 
832
837
static inline void _ocfs2_set_bit(unsigned int bit, unsigned long *bitmap)
833
838
{
834
 
        ext2_set_bit(bit, bitmap);
 
839
        __test_and_set_bit_le(bit, bitmap);
835
840
}
836
841
#define ocfs2_set_bit(bit, addr) _ocfs2_set_bit((bit), (unsigned long *)(addr))
837
842
 
838
843
static inline void _ocfs2_clear_bit(unsigned int bit, unsigned long *bitmap)
839
844
{
840
 
        ext2_clear_bit(bit, bitmap);
 
845
        __test_and_clear_bit_le(bit, bitmap);
841
846
}
842
847
#define ocfs2_clear_bit(bit, addr) _ocfs2_clear_bit((bit), (unsigned long *)(addr))
843
848
 
844
 
#define ocfs2_test_bit ext2_test_bit
845
 
#define ocfs2_find_next_zero_bit ext2_find_next_zero_bit
846
 
#define ocfs2_find_next_bit ext2_find_next_bit
 
849
#define ocfs2_test_bit test_bit_le
 
850
#define ocfs2_find_next_zero_bit find_next_zero_bit_le
 
851
#define ocfs2_find_next_bit find_next_bit_le
847
852
#endif  /* OCFS2_H */
848
853