Skip to content

Commit

Permalink
ocfs2-return-erofs-when-filesystem-becomes-read-only-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: line over 80 characters
torvalds#34: FILE: fs/ocfs2/alloc.c:1484:
+			status = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),

ERROR: code indent should use tabs where possible
torvalds#35: FILE: fs/ocfs2/alloc.c:1485:
+^I^I^I^I             "Owner %llu has empty extent list (next_free_rec == 0)\n",$

WARNING: line over 80 characters
torvalds#36: FILE: fs/ocfs2/alloc.c:1486:
+				             (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci));

ERROR: code indent should use tabs where possible
torvalds#36: FILE: fs/ocfs2/alloc.c:1486:
+^I^I^I^I             (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci));$

WARNING: line over 80 characters
torvalds#46: FILE: fs/ocfs2/alloc.c:1492:
+			status = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),

ERROR: code indent should use tabs where possible
torvalds#47: FILE: fs/ocfs2/alloc.c:1493:
+^I^I^I^I             "Owner %llu has extent list where extent # %d has no physical block start\n",$

WARNING: line over 80 characters
torvalds#48: FILE: fs/ocfs2/alloc.c:1494:
+				             (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci), i);

ERROR: code indent should use tabs where possible
torvalds#48: FILE: fs/ocfs2/alloc.c:1494:
+^I^I^I^I             (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci), i);$

WARNING: line over 80 characters
torvalds#61: FILE: fs/ocfs2/alloc.c:3215:
+			ret = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),

ERROR: code indent should use tabs where possible
torvalds#62: FILE: fs/ocfs2/alloc.c:3216:
+^I^I^I^I          "Owner %llu has empty extent block at %llu\n",$

WARNING: line over 80 characters
torvalds#63: FILE: fs/ocfs2/alloc.c:3217:
+				          (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),

ERROR: code indent should use tabs where possible
torvalds#63: FILE: fs/ocfs2/alloc.c:3217:
+^I^I^I^I          (unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),$

WARNING: line over 80 characters
torvalds#64: FILE: fs/ocfs2/alloc.c:3218:
+				          (unsigned long long)le64_to_cpu(eb->h_blkno));

ERROR: code indent should use tabs where possible
torvalds#64: FILE: fs/ocfs2/alloc.c:3218:
+^I^I^I^I          (unsigned long long)le64_to_cpu(eb->h_blkno));$

ERROR: code indent should use tabs where possible
torvalds#79: FILE: fs/ocfs2/alloc.c:4412:
+^I^I^I^I^I             "Extent block #%llu has an invalid l_next_free_rec of %d.  It should have matched the l_count of %d\n",$

WARNING: line over 80 characters
torvalds#80: FILE: fs/ocfs2/alloc.c:4413:
+					             (unsigned long long)le64_to_cpu(eb->h_blkno),

ERROR: code indent should use tabs where possible
torvalds#80: FILE: fs/ocfs2/alloc.c:4413:
+^I^I^I^I^I             (unsigned long long)le64_to_cpu(eb->h_blkno),$

WARNING: line over 80 characters
torvalds#81: FILE: fs/ocfs2/alloc.c:4414:
+					             le16_to_cpu(new_el->l_next_free_rec),

ERROR: code indent should use tabs where possible
torvalds#81: FILE: fs/ocfs2/alloc.c:4414:
+^I^I^I^I^I             le16_to_cpu(new_el->l_next_free_rec),$

WARNING: line over 80 characters
torvalds#82: FILE: fs/ocfs2/alloc.c:4415:
+					             le16_to_cpu(new_el->l_count));

ERROR: code indent should use tabs where possible
torvalds#82: FILE: fs/ocfs2/alloc.c:4415:
+^I^I^I^I^I             le16_to_cpu(new_el->l_count));$

ERROR: code indent should use tabs where possible
torvalds#96: FILE: fs/ocfs2/alloc.c:4466:
+^I^I^I^I^I             "Extent block #%llu has an invalid l_next_free_rec of %d\n",$

WARNING: line over 80 characters
torvalds#97: FILE: fs/ocfs2/alloc.c:4467:
+					             (unsigned long long)le64_to_cpu(eb->h_blkno),

ERROR: code indent should use tabs where possible
torvalds#97: FILE: fs/ocfs2/alloc.c:4467:
+^I^I^I^I^I             (unsigned long long)le64_to_cpu(eb->h_blkno),$

WARNING: line over 80 characters
torvalds#98: FILE: fs/ocfs2/alloc.c:4468:
+					             le16_to_cpu(new_el->l_next_free_rec));

ERROR: code indent should use tabs where possible
torvalds#98: FILE: fs/ocfs2/alloc.c:4468:
+^I^I^I^I^I             le16_to_cpu(new_el->l_next_free_rec));$

WARNING: line over 80 characters
torvalds#114: FILE: fs/ocfs2/localalloc.c:666:
+		status = ocfs2_error(osb->sb, "local alloc inode %llu says it has %u used bits, but a count shows %u\n",

WARNING: line over 80 characters
torvalds#115: FILE: fs/ocfs2/localalloc.c:667:
+			             (unsigned long long)le64_to_cpu(alloc->i_blkno),

ERROR: code indent should use tabs where possible
torvalds#115: FILE: fs/ocfs2/localalloc.c:667:
+^I^I^I             (unsigned long long)le64_to_cpu(alloc->i_blkno),$

ERROR: code indent should use tabs where possible
torvalds#116: FILE: fs/ocfs2/localalloc.c:668:
+^I^I^I             le32_to_cpu(alloc->id1.bitmap1.i_used),$

ERROR: code indent should use tabs where possible
torvalds#117: FILE: fs/ocfs2/localalloc.c:669:
+^I^I^I             ocfs2_local_alloc_count_bits(alloc));$

ERROR: code indent should use tabs where possible
torvalds#138: FILE: fs/ocfs2/quota_local.c:142:
+^I^I^I           "Quota file %llu is probably corrupted! Requested to read block %Lu but file has size only %Lu\n",$

WARNING: %Lu is non-standard C, use %llu
torvalds#138: FILE: fs/ocfs2/quota_local.c:142:
+			           "Quota file %llu is probably corrupted! Requested to read block %Lu but file has size only %Lu\n",

ERROR: code indent should use tabs where possible
torvalds#139: FILE: fs/ocfs2/quota_local.c:143:
+^I^I^I           (unsigned long long)OCFS2_I(inode)->ip_blkno,$

ERROR: code indent should use tabs where possible
torvalds#140: FILE: fs/ocfs2/quota_local.c:144:
+^I^I^I           (unsigned long long)v_block,$

ERROR: code indent should use tabs where possible
torvalds#141: FILE: fs/ocfs2/quota_local.c:145:
+^I^I^I           (unsigned long long)i_size_read(inode));$

total: 21 errors, 15 warnings, 108 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/ocfs2-return-erofs-when-filesystem-becomes-read-only.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Jun Piao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
  • Loading branch information
akpm00 authored and sfrothwell committed Jul 27, 2018
1 parent 9c983de commit a53159b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
28 changes: 14 additions & 14 deletions fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,16 +1482,16 @@ static int ocfs2_find_branch_target(struct ocfs2_extent_tree *et,
while(le16_to_cpu(el->l_tree_depth) > 1) {
if (le16_to_cpu(el->l_next_free_rec) == 0) {
status = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),
"Owner %llu has empty extent list (next_free_rec == 0)\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci));
"Owner %llu has empty extent list (next_free_rec == 0)\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci));
goto bail;
}
i = le16_to_cpu(el->l_next_free_rec) - 1;
blkno = le64_to_cpu(el->l_recs[i].e_blkno);
if (!blkno) {
status = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),
"Owner %llu has extent list where extent # %d has no physical block start\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci), i);
"Owner %llu has extent list where extent # %d has no physical block start\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci), i);
goto bail;
}

Expand Down Expand Up @@ -3213,9 +3213,9 @@ static int ocfs2_rotate_tree_left(handle_t *handle,

if (le16_to_cpu(el->l_next_free_rec) == 0) {
ret = ocfs2_error(ocfs2_metadata_cache_get_super(et->et_ci),
"Owner %llu has empty extent block at %llu\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
(unsigned long long)le64_to_cpu(eb->h_blkno));
"Owner %llu has empty extent block at %llu\n",
(unsigned long long)ocfs2_metadata_cache_owner(et->et_ci),
(unsigned long long)le64_to_cpu(eb->h_blkno));
goto out;
}

Expand Down Expand Up @@ -4409,10 +4409,10 @@ static int ocfs2_figure_merge_contig_type(struct ocfs2_extent_tree *et,
bh = path_leaf_bh(left_path);
eb = (struct ocfs2_extent_block *)bh->b_data;
status = ocfs2_error(sb,
"Extent block #%llu has an invalid l_next_free_rec of %d. It should have matched the l_count of %d\n",
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(new_el->l_next_free_rec),
le16_to_cpu(new_el->l_count));
"Extent block #%llu has an invalid l_next_free_rec of %d. It should have matched the l_count of %d\n",
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(new_el->l_next_free_rec),
le16_to_cpu(new_el->l_count));
goto free_left_path;
}
rec = &new_el->l_recs[
Expand Down Expand Up @@ -4463,9 +4463,9 @@ static int ocfs2_figure_merge_contig_type(struct ocfs2_extent_tree *et,
bh = path_leaf_bh(right_path);
eb = (struct ocfs2_extent_block *)bh->b_data;
status = ocfs2_error(sb,
"Extent block #%llu has an invalid l_next_free_rec of %d\n",
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(new_el->l_next_free_rec));
"Extent block #%llu has an invalid l_next_free_rec of %d\n",
(unsigned long long)le64_to_cpu(eb->h_blkno),
le16_to_cpu(new_el->l_next_free_rec));
goto free_right_path;
}
rec = &new_el->l_recs[1];
Expand Down
6 changes: 3 additions & 3 deletions fs/ocfs2/localalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
ocfs2_local_alloc_count_bits(alloc)) {
status = ocfs2_error(osb->sb, "local alloc inode %llu says it has %u used bits, but a count shows %u\n",
(unsigned long long)le64_to_cpu(alloc->i_blkno),
le32_to_cpu(alloc->id1.bitmap1.i_used),
ocfs2_local_alloc_count_bits(alloc));
(unsigned long long)le64_to_cpu(alloc->i_blkno),
le32_to_cpu(alloc->id1.bitmap1.i_used),
ocfs2_local_alloc_count_bits(alloc));
goto bail;
}
#endif
Expand Down
8 changes: 4 additions & 4 deletions fs/ocfs2/quota_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ static int ocfs2_read_quota_block(struct inode *inode, u64 v_block,

if (i_size_read(inode) >> inode->i_sb->s_blocksize_bits <= v_block)
return ocfs2_error(inode->i_sb,
"Quota file %llu is probably corrupted! Requested to read block %Lu but file has size only %Lu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)v_block,
(unsigned long long)i_size_read(inode));
"Quota file %llu is probably corrupted! Requested to read block %Lu but file has size only %Lu\n",
(unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)v_block,
(unsigned long long)i_size_read(inode));

rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0,
ocfs2_validate_quota_block);
Expand Down

0 comments on commit a53159b

Please sign in to comment.