[Ocfs2-commits] rev 9 - trunk
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Dec 10 13:24:59 CST 2003
Author: manish
Date: 2003-12-10 13:24:56 -0600 (Wed, 10 Dec 2003)
New Revision: 9
Modified:
trunk/dir.c
Log:
sync
Modified: trunk/dir.c
===================================================================
--- trunk/dir.c 2003-12-10 00:38:12 UTC (rev 8)
+++ trunk/dir.c 2003-12-10 19:24:56 UTC (rev 9)
@@ -425,6 +425,10 @@
if (found) {
fe = FILEENT_GETBH(DirNode, bhs, i);
+ if (fe == NULL) {
+ // fe is locked by this kernel thread
+ continue;
+ }
if (fe->sync_flags & OCFS_SYNC_FLAG_NAME_DELETED ||
!(fe->sync_flags & OCFS_SYNC_FLAG_VALID)) {
@@ -524,6 +528,10 @@
if (DirNode->index_dirty) {
for (index = start; index < DirNode->num_ent_used; index++) {
fe = FILEENT_GETBH(DirNode, bhs, index);
+ if (fe == NULL) {
+ // fe is locked by this kernel thread
+ continue;
+ }
if ((fe->sync_flags & OCFS_SYNC_FLAG_NAME_DELETED) ||
(!(fe->sync_flags & OCFS_SYNC_FLAG_VALID))) {
@@ -549,6 +557,10 @@
for (lowBnd = start, upBnd = (DirNode->num_ent_used - start); upBnd; upBnd >>= 1) {
index = lowBnd + (upBnd >> 1);
fe = FILEENT_GETBH(DirNode, bhs, index);
+ if (fe == NULL) {
+ // fe is locked by this kernel thread
+ continue;
+ }
if ((fe->sync_flags & OCFS_SYNC_FLAG_NAME_DELETED) ||
(!(fe->sync_flags & OCFS_SYNC_FLAG_VALID))) {
@@ -557,6 +569,10 @@
for (index = lowBnd; index < (lowBnd + upBnd); index++) {
fe = FILEENT_GETBH(DirNode, bhs, index);
+ if (fe == NULL) {
+ // fe is locked by this kernel thread
+ continue;
+ }
if ((fe->sync_flags & OCFS_SYNC_FLAG_NAME_DELETED) ||
(!(fe->sync_flags & OCFS_SYNC_FLAG_VALID))) {
FILEENT_PUTBH(DirNode, bhs, index);
@@ -772,12 +788,17 @@
if (index < DirNode->num_ent_used) {
fe = FILEENT_GETBH(DirNode, bhs, index);
- res = strcmp (fe->filename, InsertEntry->filename);
- FILEENT_PUTBH(DirNode, bhs, index);
- if (res > 0) {
- /* We are greater than the entry in question we
- * should be less than the one next to it */
- index++;
+ if (fe == NULL) {
+ // fe is locked by this kernel thread
+ index = 0;
+ } else {
+ res = strcmp (fe->filename, InsertEntry->filename);
+ FILEENT_PUTBH(DirNode, bhs, index);
+ if (res > 0) {
+ /* We are greater than the entry in question we
+ * should be less than the one next to it */
+ index++;
+ }
}
}
} else {
More information about the Ocfs2-commits
mailing list