Author: adrian.chadd
Date: Thu Jul 9 21:11:53 2009
New Revision: 14171
Modified:
playpen/LUSCA_HEAD_storework/libsqstore/store_log.h
playpen/LUSCA_HEAD_storework/src/fs/aufs/store_rebuild_aufs.c
Log:
Flesh out the progress inline messages.
Modified: playpen/LUSCA_HEAD_storework/libsqstore/store_log.h
==============================================================================
--- playpen/LUSCA_HEAD_storework/libsqstore/store_log.h (original)
+++ playpen/LUSCA_HEAD_storework/libsqstore/store_log.h Thu Jul 9 21:11:53
2009
@@ -44,7 +44,8 @@
struct _storeSwapLogProgress {
char op;
- u_int32_t progress; /* This is percent * 100; so from 0 ->
100,000 */
+ u_int32_t progress;
+ u_int32_t total;
};
typedef struct _storeSwapLogProgress storeSwapLogProgress;
Modified: playpen/LUSCA_HEAD_storework/src/fs/aufs/store_rebuild_aufs.c
==============================================================================
--- playpen/LUSCA_HEAD_storework/src/fs/aufs/store_rebuild_aufs.c
(original)
+++ playpen/LUSCA_HEAD_storework/src/fs/aufs/store_rebuild_aufs.c Thu Jul
9 21:11:53 2009
@@ -630,13 +630,20 @@
/* We have some data; process what we can */
i = 0;
while (i + sizeof(storeSwapLogData) < rb->rbuf.used) {
- rb->n_read++;
- rb->counts.scancount++;
memcpy(&s, rb->rbuf.buf + i, sizeof(storeSwapLogData));
- storeAufsDirRebuildFromSwapLogObject(rb, s);
+ switch (s.op) {
+ case SWAP_LOG_PROGRESS:
+ storeRebuildProgress(rb->sd->index,
+ ((storeSwapLogProgress *)(&s))->total,
((storeSwapLogProgress
*)(&s))->progress);
+ break;
+ default:
+ rb->n_read++;
+ storeAufsDirRebuildFromSwapLogObject(rb, s);
+ rb->counts.scancount++;
+ }
i += sizeof(storeSwapLogData);
}
- debug(47, 5) ("storeAufsRebuildHelperRead: %s: read %d objects\n",
sd->path, i / sizeof(storeSwapLogData));
+ debug(47, 5) ("storeAufsRebuildHelperRead: %s: read %d entries\n",
sd->path, i / sizeof(storeSwapLogData));
/* Shuffle what is left to the beginning of the buffer */
if (i < rb->rbuf.used) {
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---