[Ocfs2-commits] mfasheh commits r1642 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Nov 11 15:44:39 CST 2004
Author: mfasheh
Date: 2004-11-11 15:44:37 -0600 (Thu, 11 Nov 2004)
New Revision: 1642
Modified:
trunk/src/ocfs.h
Log:
* remove unused structs and macros -- these used to deal with flat
bitmaps which we don't really have any more.
Modified: trunk/src/ocfs.h
===================================================================
--- trunk/src/ocfs.h 2004-11-11 21:38:21 UTC (rev 1641)
+++ trunk/src/ocfs.h 2004-11-11 21:44:37 UTC (rev 1642)
@@ -42,26 +42,6 @@
# include <linux/tqueue.h>
#endif
-
-#define OCFS_BITS_IN_CHUNK(sb) ((sb)->s_blocksize * 8)
-
-typedef struct _ocfs_alloc_bm
-{
- __u32 validbits; /* number of valid bits */
- __u32 allocbits; /* number of allocated bits */
- __u32 failed;
- __u32 ok_retries;
- /* 'numbh' is the number of buffer heads in chunk. We keep
- * around enough buffer heads to cover the entire alloc'd size
- * of the bitmap, even though we may only ever care about the
- * valid size */
- __u32 numbh;
- struct buffer_head **chunk;
-}
-ocfs_alloc_bm;
-
-
-
enum
{
OCFS_VOTE_REQUEST = 1,
@@ -934,54 +914,6 @@
return 0;
}
-static inline int ocfs_blocks_for_bits(struct super_block *sb,
- unsigned int num_bits)
-{
- int bits_per_chunk = OCFS_BITS_IN_CHUNK(sb);
-
- return (num_bits + (bits_per_chunk - 1)) / bits_per_chunk;
-}
-
-static inline void ocfs_bitmap_block_for_off(struct super_block *sb,
- unsigned int bm_off,
- unsigned int *block,
- unsigned int *block_off)
-{
- if (block)
- *block = bm_off / OCFS_BITS_IN_CHUNK(sb);
-
- if (block_off)
- *block_off = bm_off % OCFS_BITS_IN_CHUNK(sb);
-}
-
-static inline unsigned int ocfs_bitmap_off_for_block(struct super_block *sb,
- unsigned int block,
- unsigned int block_off)
-{
- return ((block * OCFS_BITS_IN_CHUNK(sb)) + block_off);
-}
-
-static inline int ocfs_bitmap_blocks_affected(struct super_block *sb,
- unsigned int start_bit,
- unsigned int num_bits,
- unsigned int *start_blk)
-{
- unsigned int start_tmp, end_tmp;
-
- ocfs_bitmap_block_for_off(sb, start_bit, &start_tmp, NULL);
- if (start_blk)
- *start_blk = start_tmp;
-
- if (!num_bits)
- return 0;
-
- ocfs_bitmap_block_for_off(sb, start_bit + num_bits - 1,
- &end_tmp, NULL);
-
- return (end_tmp - start_tmp + 1);
-}
-
-
typedef struct _ocfs_journal_handle ocfs_journal_handle;
#endif /* !OCFS_H */
More information about the Ocfs2-commits
mailing list