[Ocfs2-commits] mfasheh commits r2241 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri May 13 13:15:05 CDT 2005


Author: mfasheh
Signed-off-by: manish
Date: 2005-05-13 13:15:03 -0500 (Fri, 13 May 2005)
New Revision: 2241

Modified:
   trunk/fs/ocfs2/aops.c
   trunk/fs/ocfs2/dcache.c
   trunk/fs/ocfs2/dir.c
   trunk/fs/ocfs2/extent_map.c
   trunk/fs/ocfs2/file.c
   trunk/fs/ocfs2/inode.c
   trunk/fs/ocfs2/journal.c
   trunk/fs/ocfs2/journal.h
   trunk/fs/ocfs2/mmap.c
   trunk/fs/ocfs2/namei.c
   trunk/fs/ocfs2/ocfs.h
   trunk/fs/ocfs2/ocfs2.h
   trunk/fs/ocfs2/super.c
   trunk/fs/ocfs2/symlink.c
Log:
* We don't need two macros to do the same exact thing.

Signed-off-by: manish



Modified: trunk/fs/ocfs2/aops.c
===================================================================
--- trunk/fs/ocfs2/aops.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/aops.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -48,7 +48,7 @@
 	ocfs2_dinode *fe = NULL;
 	struct buffer_head *bh = NULL;
 	struct buffer_head *buffer_cache_bh = NULL;
-	ocfs_super *osb = OCFS_SB(inode->i_sb);
+	ocfs_super *osb = OCFS2_SB(inode->i_sb);
 	void *kaddr;
 
 	mlog_entry("(0x%p, %llu, 0x%p, %d)\n", inode,
@@ -62,7 +62,7 @@
 		goto bail;
 	}
 
-	status = ocfs_read_block(OCFS_SB(inode->i_sb), OCFS_I(inode)->ip_blkno,
+	status = ocfs_read_block(OCFS2_SB(inode->i_sb), OCFS_I(inode)->ip_blkno,
 				 &bh, OCFS_BH_CACHED, inode);
 	if (status < 0) {
 		mlog_errno (status);

Modified: trunk/fs/ocfs2/dcache.c
===================================================================
--- trunk/fs/ocfs2/dcache.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/dcache.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -49,7 +49,7 @@
 	if (inode == NULL)
 		goto bail;
 
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 
 	OCFS_ASSERT(osb);
 

Modified: trunk/fs/ocfs2/dir.c
===================================================================
--- trunk/fs/ocfs2/dir.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/dir.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -340,7 +340,7 @@
 	spin_unlock(&OCFS_I(dir)->ip_lock);
 
 	if (extend) {
-		status = ocfs_extend_allocation(OCFS_SB(sb), dir, 1,
+		status = ocfs_extend_allocation(OCFS2_SB(sb), dir, 1,
 						parent_fe_bh, handle,
 						data_ac, meta_ac, NULL);
 		OCFS_ASSERT(status != -EAGAIN);

Modified: trunk/fs/ocfs2/extent_map.c
===================================================================
--- trunk/fs/ocfs2/extent_map.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/extent_map.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -220,7 +220,7 @@
 			brelse(eb_bh);
 			eb_bh = NULL;
 		}
-		ret = ocfs_read_block(OCFS_SB(inode->i_sb),
+		ret = ocfs_read_block(OCFS2_SB(inode->i_sb),
 				      blkno, &eb_bh, OCFS_BH_CACHED,
 				      inode);
 		if (ret)
@@ -279,7 +279,7 @@
 		blkno = ent->e_rec.e_blkno;
 		spin_unlock(&OCFS_I(inode)->ip_lock);
 
-		ret = ocfs_read_block(OCFS_SB(inode->i_sb), blkno, &bh,
+		ret = ocfs_read_block(OCFS2_SB(inode->i_sb), blkno, &bh,
 				      OCFS_BH_CACHED, inode);
 		if (ret) {
 			if (bh)
@@ -292,7 +292,7 @@
 	} else {
 		spin_unlock(&OCFS_I(inode)->ip_lock);
 
-		ret = ocfs_read_block(OCFS_SB(inode->i_sb),
+		ret = ocfs_read_block(OCFS2_SB(inode->i_sb),
 				      OCFS_I(inode)->ip_blkno, &bh,
 				      OCFS_BH_CACHED, inode);
 		if (ret) {

Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/file.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -143,7 +143,7 @@
 	int err = 0;
 	journal_t *journal;
 	struct inode *inode = dentry->d_inode;
-	ocfs_super *osb = OCFS_SB(inode->i_sb);
+	ocfs_super *osb = OCFS2_SB(inode->i_sb);
 
 	mlog_entry ("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync,
 			dentry->d_name.len, dentry->d_name.name);
@@ -230,7 +230,7 @@
 		goto bail;
 	}
 
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 	sector_size = 1 << osb->s_sectsize_bits;
 
 	ret = ocfs_write_lock_maybe_extend(filp, buf, count, ppos, &info,
@@ -293,7 +293,7 @@
 		goto bail;
 	}
 
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 	sector_size = 1 << osb->s_sectsize_bits;
 
 	if (filp->f_flags & O_DIRECT) {

Modified: trunk/fs/ocfs2/inode.c
===================================================================
--- trunk/fs/ocfs2/inode.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/inode.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -252,7 +252,7 @@
 	mlog_entry ("(0x%p, size:%"MLFu64")\n", inode, fe->i_size);
 
 	sb = inode->i_sb;
-	osb = OCFS_SB(sb);
+	osb = OCFS2_SB(sb);
 
 	// this means that read_inode cannot create a superblock 
 	// inode today.  change if needed.
@@ -384,7 +384,7 @@
 		goto bail;
 	}
 	sb = inode->i_sb;
-	osb = OCFS_SB(sb);
+	osb = OCFS2_SB(sb);
 
 	if (!args) {
 		mlog(ML_ERROR, "bad inode args\n");
@@ -507,7 +507,7 @@
 	struct inode *orphan_dir_inode = NULL;
 	struct inode *inode_alloc_inode = NULL;
 	ocfs_journal_handle *handle = NULL;
-	ocfs_super *osb = OCFS_SB(inode->i_sb);
+	ocfs_super *osb = OCFS2_SB(inode->i_sb);
 	struct buffer_head *orphan_dir_bh = NULL;
 	struct buffer_head *inode_alloc_bh = NULL;
 	struct buffer_head *fe_bh = NULL;
@@ -744,7 +744,7 @@
 	     OCFS_I(inode)->ip_blkno, inode->i_nlink);
 
 	/* we should not really be using osb in this context. */
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 
 	if (!inode->u.generic_ip) {
 		mlog(ML_ERROR, "inode %lu has no generic_ip!\n", inode->i_ino);
@@ -826,7 +826,7 @@
 		goto fail;
 	}
 
-	tmperr = ocfs_read_block(OCFS_SB(inode->i_sb), p_blkno, &bh,
+	tmperr = ocfs_read_block(OCFS2_SB(inode->i_sb), p_blkno, &bh,
 				 readflags, inode);
 	if (tmperr < 0)
 		goto fail;
@@ -865,7 +865,7 @@
 		goto bail;
 	}
 
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 
 	spin_lock(&OCFS_I(inode)->ip_lock);
 	if (INODE_DELETED(inode)) {

Modified: trunk/fs/ocfs2/journal.c
===================================================================
--- trunk/fs/ocfs2/journal.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/journal.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -815,7 +815,7 @@
 		if (p_blocks > CONCURRENT_JOURNAL_FILL)
 			p_blocks = CONCURRENT_JOURNAL_FILL;
 
-		status = ocfs_read_blocks(OCFS_SB(inode->i_sb), 
+		status = ocfs_read_blocks(OCFS2_SB(inode->i_sb), 
 					  p_blkno, p_blocks, bhs, 0,
 					  inode);
 		if (status < 0) {

Modified: trunk/fs/ocfs2/journal.h
===================================================================
--- trunk/fs/ocfs2/journal.h	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/journal.h	2005-05-13 18:15:03 UTC (rev 2241)
@@ -210,7 +210,7 @@
 
 static inline void ocfs2_checkpoint_inode(struct inode *inode)
 {
-	ocfs_super *osb = OCFS_SB(inode->i_sb);
+	ocfs_super *osb = OCFS2_SB(inode->i_sb);
 
 	if (!ocfs_inode_fully_checkpointed(inode)) {
 		/* WARNING: This only kicks off a single

Modified: trunk/fs/ocfs2/mmap.c
===================================================================
--- trunk/fs/ocfs2/mmap.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/mmap.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -452,7 +452,7 @@
 	loff_t saved_ppos;
 	u64 bytes_added = 0;
 
-	osb = OCFS_SB(inode->i_sb);
+	osb = OCFS2_SB(inode->i_sb);
 	sector_size = 1 << osb->s_sectsize_bits;
 
 	/* the target inode is different from the other inodes.  in o_direct it

Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/namei.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -145,7 +145,7 @@
 	struct inode *inode = NULL;
 	struct super_block *sb = dir->i_sb;
 	struct dentry *ret;
-	ocfs_super *osb = OCFS_SB(sb);
+	ocfs_super *osb = OCFS2_SB(sb);
 	struct ocfs2_dir_entry *dirent;
 
 	mlog_entry ("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
@@ -197,7 +197,7 @@
 	struct inode *inode;
 	struct inode *dir = child->d_inode;
 	struct super_block *sb = dir->i_sb;
-	ocfs_super *osb = OCFS_SB(sb);
+	ocfs_super *osb = OCFS2_SB(sb);
 	struct buffer_head *dirent_bh = NULL;
 	struct ocfs2_dir_entry *dirent;
 
@@ -324,7 +324,7 @@
 			(unsigned long)dev, dentry->d_name.len, dentry->d_name.name);
 
 	/* get our super block */
-	osb = OCFS_SB(dir->i_sb);
+	osb = OCFS2_SB(dir->i_sb);
 
 	if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) {
 		mlog(ML_ERROR, "inode %"MLFu64" has i_nlink of %u\n",
@@ -650,7 +650,7 @@
 	struct buffer_head *parent_fe_bh = NULL;
 	struct buffer_head *de_bh = NULL;
 	ocfs2_dinode *fe = NULL;
-	ocfs_super *osb = OCFS_SB(dir->i_sb);
+	ocfs_super *osb = OCFS2_SB(dir->i_sb);
 
 	mlog_entry ("(inode=%lu, old='%.*s' new='%.*s')\n", 
 			inode->i_ino, old_dentry->d_name.len, 
@@ -759,7 +759,7 @@
 {
 	int status;
 	struct inode *inode = dentry->d_inode;
-	ocfs_super *osb = OCFS_SB(dir->i_sb);
+	ocfs_super *osb = OCFS2_SB(dir->i_sb);
 	u64 blkno;
 	ocfs2_dinode *fe = NULL;
 	struct buffer_head *fe_bh = NULL;
@@ -1025,7 +1025,7 @@
 			old_dentry->d_name.len, old_dentry->d_name.name,
 			new_dentry->d_name.len, new_dentry->d_name.name);
 
-	osb = OCFS_SB(old_dir->i_sb);
+	osb = OCFS2_SB(old_dir->i_sb);
 
 	if (new_inode) {
 		if (!igrab(new_inode))
@@ -1495,7 +1495,7 @@
 			dentry->d_name.name);
 
 	sb = dir->i_sb;
-	osb = OCFS_SB(sb);
+	osb = OCFS2_SB(sb);
 
 	l = strlen(symname) + 1;
 

Modified: trunk/fs/ocfs2/ocfs.h
===================================================================
--- trunk/fs/ocfs2/ocfs.h	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/ocfs.h	2005-05-13 18:15:03 UTC (rev 2241)
@@ -71,7 +71,6 @@
 ** Structures...
 */
 
-#define OCFS_SB(sb)	    ((ocfs_super *)(sb)->s_fs_info)
 #define OCFS2_SB(sb)	    ((ocfs_super *)(sb)->s_fs_info)
 
 /* This totally sucks that we have to include these here

Modified: trunk/fs/ocfs2/ocfs2.h
===================================================================
--- trunk/fs/ocfs2/ocfs2.h	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/ocfs2.h	2005-05-13 18:15:03 UTC (rev 2241)
@@ -29,7 +29,7 @@
 static inline u64 ocfs2_clusters_to_blocks(struct super_block *sb,
 					   u32 clusters)
 {
-	int c_to_b_bits = OCFS_SB(sb)->s_clustersize_bits -
+	int c_to_b_bits = OCFS2_SB(sb)->s_clustersize_bits -
 		sb->s_blocksize_bits;
 
 	return (u64)clusters << c_to_b_bits;
@@ -38,7 +38,7 @@
 static inline u32 ocfs2_blocks_to_clusters(struct super_block *sb,
 					   u64 blocks)
 {
-	int b_to_c_bits = OCFS_SB(sb)->s_clustersize_bits -
+	int b_to_c_bits = OCFS2_SB(sb)->s_clustersize_bits -
 		sb->s_blocksize_bits;
 
 	return (u32)(blocks >> b_to_c_bits);
@@ -47,10 +47,10 @@
 static inline unsigned int ocfs2_clusters_for_bytes(struct super_block *sb,
 						    u64 bytes)
 {
-	int cl_bits = OCFS_SB(sb)->s_clustersize_bits;
+	int cl_bits = OCFS2_SB(sb)->s_clustersize_bits;
 	unsigned int clusters;
 
-	bytes += OCFS_SB(sb)->s_clustersize - 1;
+	bytes += OCFS2_SB(sb)->s_clustersize - 1;
 	/* OCFS2 just cannot have enough clusters to overflow this */
 	clusters = (unsigned int)(bytes >> cl_bits);
 
@@ -60,13 +60,13 @@
 static inline u64 ocfs2_clusters_to_bytes(struct super_block *sb,
 					  u32 clusters)
 {
-	return (u64)clusters << OCFS_SB(sb)->s_clustersize_bits;
+	return (u64)clusters << OCFS2_SB(sb)->s_clustersize_bits;
 }
 
 static inline u64 ocfs2_align_bytes_to_clusters(struct super_block *sb,
 						u64 bytes)
 {
-	int cl_bits = OCFS_SB(sb)->s_clustersize_bits;
+	int cl_bits = OCFS2_SB(sb)->s_clustersize_bits;
 	unsigned int clusters;
 
 	clusters = ocfs2_clusters_for_bytes(sb, bytes);

Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/super.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -474,7 +474,7 @@
 
 	mlog_entry ("(%p, %p)\n", sb, buf);
 
-	osb = OCFS_SB(sb);
+	osb = OCFS2_SB(sb);
 
 	inode = ocfs_get_system_file_inode(osb,
 					   GLOBAL_BITMAP_SYSTEM_INODE,
@@ -821,7 +821,7 @@
 	mlog_entry ("(0x%p)\n", sb);
 
 	OCFS_ASSERT(sb);
-	osb = OCFS_SB(sb);
+	osb = OCFS2_SB(sb);
 	OCFS_ASSERT(osb);
 
 	ocfs2_wait_for_okp_destruction(osb);

Modified: trunk/fs/ocfs2/symlink.c
===================================================================
--- trunk/fs/ocfs2/symlink.c	2005-05-13 17:31:09 UTC (rev 2240)
+++ trunk/fs/ocfs2/symlink.c	2005-05-13 18:15:03 UTC (rev 2241)
@@ -140,7 +140,7 @@
 	unsigned int l;
 	char buf[10];
 	struct inode *inode = data;
-	ocfs_super *osb = OCFS_SB(inode->i_sb);
+	ocfs_super *osb = OCFS2_SB(inode->i_sb);
 
 	l = sprintf(buf, "%lu", (unsigned long)osb->node_num);
 



More information about the Ocfs2-commits mailing list