]> git.neil.brown.name Git - LaFS.git/commitdiff
Minor formatting improvements.
authorNeilBrown <neilb@suse.de>
Fri, 1 Oct 2010 12:38:48 +0000 (22:38 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 1 Oct 2010 12:38:48 +0000 (22:38 +1000)
Signed-off-by: NeilBrown <neilb@suse.de>
cluster.c
state.h

index dd29852df4d9f51a00d9197760c07aee7751ab03..b94387a9b4fdb574fc03d2fdd067f55a6141fbbe 100644 (file)
--- a/cluster.c
+++ b/cluster.c
@@ -1209,26 +1209,24 @@ static void cluster_flush(struct fs *fs, int cnum)
 
        /* Fill in the cluster header */
        strncpy(wc->chead->idtag, "LaFSHead", 8);
-       if (cnum)
-               wc->chead->flags = cpu_to_le32(0);
-       else {
-               /* checkpoints only happen in cnum==0 */
-               if (fs->checkpointing) {
-                       spin_lock(&fs->lock);
-                       wc->chead->flags = cpu_to_le32(fs->checkpointing);
-                       if (fs->checkpointing & CH_CheckpointEnd) {
-                               fs->checkpointing = 0;
-                               clear_bit(CheckpointOpen, &fs->fsstate);
-                       } else if (fs->checkpointing & CH_CheckpointStart) {
-                               fs->checkpointcluster = head_addr[0];
-                               fs->checkpointing &= ~CH_CheckpointStart;
-                       }
-                       spin_unlock(&fs->lock);
-                       if (!fs->checkpointing)
-                               wake_up(&fs->phase_wait);
-               } else
-                       wc->chead->flags = 0;
+       wc->chead->flags = cpu_to_le32(0);
+
+       /* checkpoints only happen in cnum==0 */
+       if (cnum == 0 && fs->checkpointing) {
+               spin_lock(&fs->lock);
+               wc->chead->flags = cpu_to_le32(fs->checkpointing);
+               if (fs->checkpointing & CH_CheckpointEnd) {
+                       fs->checkpointing = 0;
+                       clear_bit(CheckpointOpen, &fs->fsstate);
+               } else if (fs->checkpointing & CH_CheckpointStart) {
+                       fs->checkpointcluster = head_addr[0];
+                       fs->checkpointing &= ~CH_CheckpointStart;
+               }
+               spin_unlock(&fs->lock);
+               if (!fs->checkpointing)
+                       wake_up(&fs->phase_wait);
        }
+
        memcpy(wc->chead->uuid, fs->state->uuid, 16);
        wc->chead->seq = cpu_to_le64(wc->cluster_seq);
        wc->cluster_seq++;
diff --git a/state.h b/state.h
index e6da2d49257cb259be62015796026c26bcc3aef3..239f7a70059cc295043b8c232232185f46b39205 100644 (file)
--- a/state.h
+++ b/state.h
@@ -257,11 +257,11 @@ struct fs {
                u32     usage_inum;
                u16     level;
 
-               u32 rows_per_table, tables_per_seg;
+               u32     rows_per_table, tables_per_seg;
 
                int     recent_dev, recent_state;
 
-               int     tablesize; /* const */
+               int     tablesize; /* in segusage file, not in segments */
                struct inode *segsum;
        } *devs;