[Ocfs2-commits] mfasheh commits r1272 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Jul 15 17:03:53 CDT 2004
Author: mfasheh
Date: 2004-07-15 16:03:51 -0500 (Thu, 15 Jul 2004)
New Revision: 1272
Modified:
trunk/src/inode.c
Log:
* fix a bug in populate_inode where we were setting i_nlink on directories.
* add a check in populate_inode for inodes without the valid bit set.
* the delete_inode operation is no longer checkpointed -- this is step
one in increasing overall delete performance.
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-07-15 20:59:10 UTC (rev 1271)
+++ trunk/src/inode.c 2004-07-15 21:03:51 UTC (rev 1272)
@@ -374,9 +374,11 @@
// this means that read_inode cannot create a superblock
// inode today. change if needed.
- if (!IS_VALID_FILE_ENTRY(fe)) {
- LOG_ERROR_ARGS("invalid file entry! i_ino=%lu, fe->i_blkno=%llu\n",
- inode->i_ino, fe->i_blkno);
+ if (!IS_VALID_FILE_ENTRY(fe) || !(fe->i_flags & OCFS2_VALID_FL)) {
+ LOG_ERROR_ARGS("invalid file entry! i_ino=%lu, "
+ "fe->i_blkno=%llu, valid_flag = %d\n",
+ inode->i_ino, fe->i_blkno,
+ (fe->i_flags & OCFS2_VALID_FL));
goto bail;
}
@@ -446,11 +448,6 @@
inode->i_size = fe->i_size;
break;
case S_IFDIR:
- if (inode->i_nlink < 2) {
- LOG_ERROR_ARGS("inlink=%d for %llu\n", inode->i_nlink,
- fe->i_blkno);
- inode->i_nlink = 2;
- }
atomic_set(GET_INODE_CLEAN_SEQ(inode), atomic_read(&osb->clean_buffer_seq));
inode->i_op = &ocfs_dir_iops;
inode->i_fop = &ocfs_dops;
@@ -587,7 +584,6 @@
ocfs_journal_handle *handle = NULL;
ocfs_super *osb = OCFS_SB(inode->i_sb);
int status = 0;
- int release_disk_lock = 0;
struct buffer_head *orphan_dir_bh = NULL;
struct buffer_head *fe_bh = NULL;
__u32 lock_flags = FLAG_FILE_DELETE;
@@ -641,6 +637,8 @@
LOG_ERROR_STATUS(-ENOMEM);
goto clear_inode;
}
+ ocfs_handle_set_checkpoint(handle, 0);
+ ocfs_handle_set_sync(handle, 0);
ocfs_handle_add_inode(handle, orphan_dir_inode);
@@ -668,7 +666,6 @@
LOG_ERROR_STATUS(status);
goto bail_locked;
}
- release_disk_lock = 1;
/* check OCFS_SYNC_FLAG_ORPHANED */
fe = (ocfs2_dinode *) fe_bh->b_data;
@@ -730,13 +727,6 @@
else if (handle)
ocfs_abort_trans(handle);
- if (release_disk_lock) {
- status = ocfs_release_lock(osb, OCFS_LKM_EXMODE,
- lock_flags, fe_bh, inode);
- if (status < 0)
- LOG_ERROR_STATUS(status);
- }
-
unlock_kernel();
if (orphan_dir_bh)
More information about the Ocfs2-commits
mailing list