Author: adrian.chadd
Date: Thu Apr 30 05:05:39 2009
New Revision: 14017

Modified:
    branches/LUSCA_HEAD/src/fs/aufs/store_dir_aufs.c

Log:
Move that store rebuild progress update out from inside the per-object  
swapfile
rebuild function.


Modified: branches/LUSCA_HEAD/src/fs/aufs/store_dir_aufs.c
==============================================================================
--- branches/LUSCA_HEAD/src/fs/aufs/store_dir_aufs.c    (original)
+++ branches/LUSCA_HEAD/src/fs/aufs/store_dir_aufs.c    Thu Apr 30 05:05:39  
2009
@@ -575,15 +575,9 @@
        SwapDir *SD = rb->sd;
        StoreEntry *e = NULL;
        double x;
-       size_t ss = -1;
        int used;                       /* is swapfile already in use? */
        int disk_entry_newer;   /* is the log entry newer than current entry? */

-       if (rb->flags.old_swaplog_entry_size)
-               ss = sizeof(storeSwapLogDataOld);
-       else
-               ss = sizeof(storeSwapLogData);
-
        /*
         * BC: during 2.4 development, we changed the way swap file
         * numbers are assigned and stored.  The high 16 bits used
@@ -621,12 +615,6 @@
            rb->counts.invalid++;
            return -1;
        }
-       if ((++rb->counts.scancount & 0xFFF) == 0) {
-           struct stat sb;
-           if (0 == fstat(fileno(rb->log), &sb))
-               storeRebuildProgress(SD->index,
-                   (int) sb.st_size / ss, rb->n_read);
-       }
        if (!storeAufsDirValidFileno(SD, s.swap_filen, 0)) {
            rb->counts.invalid++;
            return -1;
@@ -741,6 +729,12 @@
                memcpy(&s, buf, sizeof(s));
        }
        storeAufsDirRebuildFromSwapLogObject(rb, s);
+
+       if ((++rb->counts.scancount & 0xFFF) == 0) {
+           struct stat sb;
+           if (0 == fstat(fileno(rb->log), &sb))
+               storeRebuildProgress(rb->sd->index, (int) sb.st_size / ss, 
rb->n_read);
+       }
      }
      eventAdd("storeRebuild", storeAufsDirRebuildFromSwapLog, rb, 0.0, 1);
  }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to