]> git.neil.brown.name Git - lafs-utils.git/commitdiff
Remove lots of white-space errors
authorNeilBrown <neilb@suse.de>
Thu, 24 Mar 2011 04:39:18 +0000 (15:39 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 24 Mar 2011 04:39:18 +0000 (15:39 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
18 files changed:
lib/lafs_allocated_block.c
lib/lafs_checkpoint.c
lib/lafs_cluster_allocate.c
lib/lafs_cluster_flush.c
lib/lafs_dblk.c
lib/lafs_dir_next.c
lib/lafs_find_dblk.c
lib/lafs_find_next.c
lib/lafs_imap_alloc.c
lib/lafs_incorporate.c
lib/lafs_load.c
lib/lafs_mount.c
lib/lafs_print_inode.c
lib/lafs_print_state.c
lib/lafs_read_virtual.c
lib/lafs_write_dev.c
lib/lafs_write_state.c
lib/lafs_write_virtual.c

index 7cf70811b51dfce55173bad69a54e1d184086d56..3ce830f8a8145abf26d4b15730bf0d29dcafab49 100644 (file)
@@ -16,7 +16,7 @@ void lafs_allocated_block(struct lafs_blk *b, loff_t addr)
        struct lafs_iblk *p;
 
        trace(1,"allocate %d/%lld %s to %lld\n", b->ino->inum,
-             (long long)b->fileaddr, 
+             (long long)b->fileaddr,
              (b->flags & B_Index) ? "index":"data", (long long)addr);
        if (b->parent == NULL) {
                /* This is the root inode.  Its address goes
index 049694c769d867dc218de2b65eaa485ad719dff4..8633b2f032b1237797036d33df435d28eb3f40c6 100644 (file)
@@ -40,7 +40,7 @@ int lafs_checkpoint(struct lafs *fs)
                                        continue;
                                }
                        }
-                       
+
                        if (b->flags & B_Index) {
                                struct lafs_iblk *ib = iblk(b);
                                if (ib->sched_cnt) {
@@ -74,7 +74,7 @@ int lafs_checkpoint(struct lafs *fs)
 
                lafs_sched_blk(b);
                list_del_init(&b->leafs);
-               
+
                lafs_cluster_allocate(b, 0);
        }
        fs->checkpointing |= CHECKPOINT_END;
index d04240101786a1d96472549080452fef69e21c4f..96acc4f1d2012bfd65df17c3526f1b63bc108e1b 100644 (file)
@@ -21,7 +21,7 @@ void lafs_cluster_allocate(struct lafs_blk *b, int cnum)
        if (!(b->flags & B_Sched))
                abort();
 
-       if (!(b->flags & B_Index) && 
+       if (!(b->flags & B_Index) &&
            b->ino->type == TypeInodeFile &&
            dblk(b)->my_inode &&
            (dblk(b)->my_inode->iflags & I_Dirty))
index 442091dd6d8d68a6e5888c153766056db46b9d31..2409d8a21a35c52c393a12c3d7653d4538e2b9d9 100644 (file)
@@ -23,7 +23,7 @@
  *
  * A write cluster always comprises a whole number of rows - it is padded
  * with zeros if necessary.
- * However block addressing follow columns, so the blocks written to 
+ * However block addressing follow columns, so the blocks written to
  * a cluster may well not be contiguously addressed.
  *
  * There are 'width' blocks (or columns) in a row, and either:
@@ -308,7 +308,7 @@ void lafs_cluster_flush(struct lafs *fs, int cnum)
        }
        if (head_start)
                cluster_closehead(wc, head_start);
-       
+
        ch->Hlength = __cpu_to_le16(wc->chead_size);
        ch->Clength = __cpu_to_le16(cluster_size);
        ch->verify_type = VerifyNull;
@@ -320,7 +320,7 @@ void lafs_cluster_flush(struct lafs *fs, int cnum)
        ch->checksum = calc_cluster_csum(ch);
 
        dv = dev_by_num(fs, wc->seg.dev);
-       
+
        for (i = 0; i < wc->chead_blocks; i++) {
                int dev;
                loff_t sect;
index 83d2741498acf36252469d6ce9470a945278d4be..7844187bad4cd56cb2cc5ed575da251172222c88 100644 (file)
@@ -13,7 +13,7 @@ struct lafs_dblk *lafs_dblk(struct lafs_ino *ino, loff_t bnum)
        struct lafs_dblk *db;
        struct lafs *fs = ino->fs;
        int hash = (long)ino;
-       
+
        hash ^= bnum;
        hash ^= hash >> 10;
        hash &= (1<<HASH_BITS)-1;
index fd575d8d139ffa0f1e6b19865b73d479d253c189..2ed6ddbc25bf5aa00dbe84cf4b4eaea1522ac893 100644 (file)
@@ -32,7 +32,7 @@ int lafs_dir_next(struct lafs_ino *dir, u32 *indexp, char *name,
                                      hash, &piece);
                        *indexp = dir->md.file.seed;
                        if (piece &&
-                           lafs_dir_extract(db->b.data, dir->fs->blockbits-8, &de, 
+                           lafs_dir_extract(db->b.data, dir->fs->blockbits-8, &de,
                                             piece, indexp)->target == 0)
                                hash = *indexp +1;
                        else
index 0f744d1d00767756c07ad8966ca130fea8750003..5b9d7c6cf5c200b4e6b5b49fa31f34e4db7b5c5b 100644 (file)
@@ -73,7 +73,7 @@ uint64_t lafs_leaf_lookup(unsigned char *buf, int len, u32 startaddr,
        if (buf[1])
                return 0;
        switch (buf[0]) {
-       default: p = 0; 
+       default: p = 0;
                break;
 
        case 1: /* indirect */
@@ -133,7 +133,7 @@ uint64_t lafs_leaf_lookup(unsigned char *buf, int len, u32 startaddr,
                }
                cp = buf;
                cp += lo*12 + 8;
-               
+
                addr = decode32(cp);
 
                cp = buf;
index f9460351161f11e628c57e9545df80687b1476e0..3889247b7e3406bce08d674a5165b5b89eed25c8 100644 (file)
@@ -55,7 +55,7 @@ static int __block_find_next(struct lafs_ino *inode, u32 *addrp)
                        buf = (unsigned char *)leaf->b.ino->dblock->b.data;
                }
                p = lafs_leaf_lookup(buf + offset,
-                                    inode->fs->blocksize - offset, leaf->b.fileaddr, 
+                                    inode->fs->blocksize - offset, leaf->b.fileaddr,
                                     addr, &nextd);
                if (p)
                        return 1;
index 7e8cb6473ac2d7ffb8eea780c44bc1a858d63306..fa0548177e64f6143e015bc28c607543a983a61f 100644 (file)
@@ -41,7 +41,7 @@ int lafs_imap_alloc(struct lafs_ino *imap)
                        clear_c_bit(bit, (unsigned char *)db->b.data);
                        if (*(u32*)(db->b.data) == 0
                            && db->b.data[fs->blocksize-1] == 0 &&
-                           memcmp(db->b.data, 
+                           memcmp(db->b.data,
                                   db->b.data+4, fs->blocksize-4) == 0) {
                                /* block is completely zero, so we have to punch
                                 * a hole
index 5cf3fba9751b848c177ef91b90040686039c7fc2..ef5b414ef2da16baff15985ff6fb2eae57017c90 100644 (file)
@@ -29,7 +29,7 @@ void lafs_incorporate(struct lafs_iblk *ib)
        if (ib->depth != 1)
                abort();
 
-       
+
        ip = (void*)(ib->b.ino->dblock->b.data + ib->b.ino->metadata_size);
        if (*(u16*)ip != __cpu_to_le16(IBLK_INDIRECT))
                abort();
@@ -57,5 +57,3 @@ void lafs_incorporate(struct lafs_iblk *ib)
               (long long)ib->b.ino->dblock->b.fileaddr);
        lafs_dirty_blk(&ib->b);
 }
-
-               
index a4ef56e22053b32caf92143a49b480257634e7b8..726d2419819a0b28f47aec11a5fecc2eb5b4b1b2 100644 (file)
@@ -155,7 +155,7 @@ static int check_state(struct lafs_device *dev, int which)
                dev->devices = __le32_to_cpu(sb->devices);
        }
        rv = 1;
-       
+
 out:
        free(sb);
        return rv;
@@ -246,7 +246,7 @@ struct lafs_device *lafs_load(int fd, long long device_bytes, char **err)
        found = 0;
        for (i=0; i<4; i++)
                found += check_state(dev, i);
-       
+
        if (!found)
                *err = "No valid state block found on device";
 
index bce49efa312b91e4992a8b3b61007e43f03ba79c..754554ca542377968be7c3fd103dbb7b31433ea1 100644 (file)
@@ -30,7 +30,7 @@ char *lafs_mount(struct lafs *fs, int force)
                return strdup("mount: no devices loaded");
 
        if (fs->loaded_devs != fs->devices) {
-               asprintf(&err, 
+               asprintf(&err,
                         "need %d devices, only %d loaded",
                         fs->devices, fs->loaded_devs);
                return err;
index 64ca36d77f2a89b18061380c08e4aafe71f9b02f..e5c88bd3a82ecda31402a7272b88bcef80c1fffd 100644 (file)
@@ -59,7 +59,7 @@ void lafs_print_inode(struct lafs_ino *ino)
                printf("  SS Index    : %d\n", (f->usagetable));
                printf("  Name        : %.40s\n", f->name);
                break;
-       case TypeInodeMap: 
+       case TypeInodeMap:
                im = &ino->md.inodemap;
                printf("  Map Size    : %lu\n", (unsigned long)im->size);
                break;
@@ -149,7 +149,7 @@ void lafs_print_inode(struct lafs_ino *ino)
                        ip = (struct extent*)(body+2);
 /*                     printf("body at %p\n", ip);*/
                        for (; __le16_to_cpu(ip->size) != 0
-                                    && ((char*)(ip+1))<(body+bodybytes) ; ip++) 
+                                    && ((char*)(ip+1))<(body+bodybytes) ; ip++)
                                printf("  %ld..%ld at %ld\n",
                                       (unsigned long)__le32_to_cpu(ip->logical),
                                       (unsigned long)__le32_to_cpu(ip->logical)+
index d3c8b05e1a22c81e60dc6b30615766a386e21f8c..6b6186fcc8e2d9737fa520724b35aa285a7636e8 100644 (file)
@@ -41,7 +41,7 @@ void lafs_print_state(struct lafs_state *state, int size)
        if (maxss > (size - sizeof(*state)) / 4)
                maxss = (size - sizeof(*state)) / 4;
        for (l=0; l < maxss; l++)
-               printf(" Root[%d]    : %llu\n", l+1, 
+               printf(" Root[%d]    : %llu\n", l+1,
                       (unsigned long long)__le64_to_cpu(state->root_inodes[l]));
 
        printf("\n");
index 019e2c5aeb7b98147f8681fa8972294813dbf1a8..3bfae0ad9c268d04b0415e4089e1e83ab4e290eb 100644 (file)
@@ -18,7 +18,6 @@ int lafs_read_virtual(struct lafs *fs, char *buf, loff_t addr)
                (addr - d->start) * fs->blocksize + d->segment_offset,
                SEEK_SET);
        n = read(d->fd, buf, fs->blocksize);
-                 
 
        if (n == fs->blocksize)
                return 0;
index cc628fd45f2982d9df7fec085f92b3ba463ef9f7..5337fec1eaa9f123e54202df68b4fea0740f21d2 100644 (file)
@@ -52,11 +52,11 @@ int lafs_write_dev(struct lafs_device *dev)
 
        csum = crc32(0, (uint32_t*)buf, LAFS_DEVBLK_SIZE);
        pd->checksum = csum;
-       
+
        for (i=0; i<2; i++) {
                lseek64(dev->fd, dev->devaddr[i], SEEK_SET);
                write(dev->fd, buf, LAFS_DEVBLK_SIZE);
        }
-       
+
        return 0;
 }
index b7b443ddb3367f6a1857fe1f8cb4a473dde2c640..722d615651d0a4a116d5e094ac98c9f607d8f13d 100644 (file)
@@ -23,7 +23,7 @@ int lafs_write_state(struct lafs *fs)
        memcpy(st->idtag, "LaFS-State-Block", 16);
        memcpy(st->uuid, fs->uuid, 16);
        memset(st->version, ' ', 16);
-       
+
        st->seq = __cpu_to_le32(fs->seq);
        st->nextyouth = __cpu_to_le16(fs->youth_next);
        st->checkpointcluster = __cpu_to_le64(fs->checkpoint_cluster);
index 872ed38fa93891f3dc8adff207e00ef2e5b5e968..7db256f733a59c8e251385981093848345eda44d 100644 (file)
@@ -16,7 +16,6 @@ int lafs_write_virtual(struct lafs *fs, char *buf, loff_t addr)
                return -1;
        lseek64(d->fd, (addr - d->start) * fs->blocksize, SEEK_SET);
        n = write(d->fd, buf, fs->blocksize);
-                 
 
        if (n == fs->blocksize)
                return 0;