diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-01-05 21:25:51 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-05 21:25:51 -0500 |
commit | d397712bcc6a759a560fd247e6053ecae091f958 (patch) | |
tree | 9da8daebb870d8b8b1843507c4621715e23dd31a /fs/btrfs/file-item.c | |
parent | 1f3c79a28c8837e8572b98f6d14142d9a6133c56 (diff) |
Btrfs: Fix checkpatch.pl warnings
There were many, most are fixed now. struct-funcs.c generates some warnings
but these are bogus.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index cc6e0b6de949..b11abfad81a5 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "transaction.h" | 24 | #include "transaction.h" |
25 | #include "print-tree.h" | 25 | #include "print-tree.h" |
26 | 26 | ||
27 | #define MAX_CSUM_ITEMS(r,size) ((((BTRFS_LEAF_DATA_SIZE(r) - \ | 27 | #define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r) - \ |
28 | sizeof(struct btrfs_item) * 2) / \ | 28 | sizeof(struct btrfs_item) * 2) / \ |
29 | size) - 1)) | 29 | size) - 1)) |
30 | int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, | 30 | int btrfs_insert_file_extent(struct btrfs_trans_handle *trans, |
@@ -166,7 +166,7 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode, | |||
166 | WARN_ON(bio->bi_vcnt <= 0); | 166 | WARN_ON(bio->bi_vcnt <= 0); |
167 | 167 | ||
168 | disk_bytenr = (u64)bio->bi_sector << 9; | 168 | disk_bytenr = (u64)bio->bi_sector << 9; |
169 | while(bio_index < bio->bi_vcnt) { | 169 | while (bio_index < bio->bi_vcnt) { |
170 | offset = page_offset(bvec->bv_page) + bvec->bv_offset; | 170 | offset = page_offset(bvec->bv_page) + bvec->bv_offset; |
171 | ret = btrfs_find_ordered_sum(inode, offset, disk_bytenr, &sum); | 171 | ret = btrfs_find_ordered_sum(inode, offset, disk_bytenr, &sum); |
172 | if (ret == 0) | 172 | if (ret == 0) |
@@ -192,8 +192,9 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode, | |||
192 | offset + bvec->bv_len - 1, | 192 | offset + bvec->bv_len - 1, |
193 | EXTENT_NODATASUM, GFP_NOFS); | 193 | EXTENT_NODATASUM, GFP_NOFS); |
194 | } else { | 194 | } else { |
195 | printk("no csum found for inode %lu " | 195 | printk(KERN_INFO "btrfs no csum found " |
196 | "start %llu\n", inode->i_ino, | 196 | "for inode %lu start %llu\n", |
197 | inode->i_ino, | ||
197 | (unsigned long long)offset); | 198 | (unsigned long long)offset); |
198 | } | 199 | } |
199 | item = NULL; | 200 | item = NULL; |
@@ -373,7 +374,7 @@ int btrfs_csum_one_bio(struct btrfs_root *root, struct inode *inode, | |||
373 | BUG_ON(!ordered); | 374 | BUG_ON(!ordered); |
374 | sums->bytenr = ordered->start; | 375 | sums->bytenr = ordered->start; |
375 | 376 | ||
376 | while(bio_index < bio->bi_vcnt) { | 377 | while (bio_index < bio->bi_vcnt) { |
377 | if (!contig) | 378 | if (!contig) |
378 | offset = page_offset(bvec->bv_page) + bvec->bv_offset; | 379 | offset = page_offset(bvec->bv_page) + bvec->bv_offset; |
379 | 380 | ||
@@ -507,7 +508,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans, | |||
507 | 508 | ||
508 | path = btrfs_alloc_path(); | 509 | path = btrfs_alloc_path(); |
509 | 510 | ||
510 | while(1) { | 511 | while (1) { |
511 | key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; | 512 | key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; |
512 | key.offset = end_byte - 1; | 513 | key.offset = end_byte - 1; |
513 | key.type = BTRFS_EXTENT_CSUM_KEY; | 514 | key.type = BTRFS_EXTENT_CSUM_KEY; |
@@ -715,9 +716,8 @@ again: | |||
715 | goto csum; | 716 | goto csum; |
716 | 717 | ||
717 | diff = diff - btrfs_item_size_nr(leaf, path->slots[0]); | 718 | diff = diff - btrfs_item_size_nr(leaf, path->slots[0]); |
718 | if (diff != csum_size) { | 719 | if (diff != csum_size) |
719 | goto insert; | 720 | goto insert; |
720 | } | ||
721 | 721 | ||
722 | ret = btrfs_extend_item(trans, root, path, diff); | 722 | ret = btrfs_extend_item(trans, root, path, diff); |
723 | BUG_ON(ret); | 723 | BUG_ON(ret); |
@@ -732,7 +732,7 @@ insert: | |||
732 | u64 next_sector = sector_sum->bytenr; | 732 | u64 next_sector = sector_sum->bytenr; |
733 | struct btrfs_sector_sum *next = sector_sum + 1; | 733 | struct btrfs_sector_sum *next = sector_sum + 1; |
734 | 734 | ||
735 | while(tmp < sums->len) { | 735 | while (tmp < sums->len) { |
736 | if (next_sector + root->sectorsize != next->bytenr) | 736 | if (next_sector + root->sectorsize != next->bytenr) |
737 | break; | 737 | break; |
738 | tmp += root->sectorsize; | 738 | tmp += root->sectorsize; |