[LU-10837] no bitmap check if block bitmap is uninitialized Created: 22/Mar/18 Updated: 20/Jul/18 Resolved: 09/Apr/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.12.0, Lustre 2.10.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Wang Shilong (Inactive) | Assignee: | Wang Shilong (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
Following commit:
Tried to expose a problem that we should be careful with block bitmap uninitialized. However, it only tried to skip 0 in @free_gdp, at some customer site, we observed cases Mar 13 13:59:29 oss2c105 kernel: LDISKFS-fs error (device sfa0002): ldiskfs_mb_check_ondisk_bitmap:3605: comm ll_ost_io01_057: on-disk bitmap for group 420934corrupted: 32768 blocks free in bitmap, 559 - in gd\x0a Mar 13 13:59:29 oss2c105 kernel: LDISKFS-fs error (device sfa0002): ldiskfs_mb_check_ondisk_bitmap:3605: comm ll_ost_io00_056: on-disk bitmap for group 420938corrupted: 32768 blocks free in bitmap, 680 - in gd\x0a And also, I did a very simple reformat and tried to dumpe2fs OST: ... Group 158: (Blocks 5177344-5210111) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Checksum 0x0617, unused inodes 1920 Block bitmap at 1182 (bg #0 + 1182), Inode bitmap at 1342 (bg #0 + 1342) Inode table at 40512-40751 (bg #1 + 7744) 32768 free blocks, 1920 free inodes, 0 directories, 1920 unused inodes Free blocks: 5177344-5210111 Free inodes: 303361-305280 Group 159: (Blocks 5210112-5242 .... With more check, I did not see any 0 counters... See comments in ext4_free_clusters_after_init: /* Return the number of free blocks in a block group. It is used when * the block bitmap is uninitialized, so we can't just count the bits * in the bitmap. */ So extra check we enhanced here is wrong if this block group bitmap is uninitialized, since we only check bitmaps here.
Further, Looking at EXT4_BG_BLOCK_UNINIT clear codes, Kernel will reinit free_clusters_count when tried to clear the flag, so extra check for uninited block bitmaps dosen't make much sense.
Let's skip uninited block bitmap check if EXT4_BG_BLOCK_UNINIT is set, whatever free count group desc recorded is untrustable somehow. |
| Comments |
| Comment by Gerrit Updater [ 22/Mar/18 ] |
|
Wang Shilong (wshilong@ddn.com) uploaded a new patch: https://review.whamcloud.com/31720 |
| Comment by Peter Jones [ 22/Mar/18 ] |
|
Thanks wangshilong
|
| Comment by Gerrit Updater [ 09/Apr/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31720/ |
| Comment by Peter Jones [ 09/Apr/18 ] |
|
Landed for 2.12 |
| Comment by Gerrit Updater [ 11/Apr/18 ] |
|
Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/31957 |
| Comment by Gerrit Updater [ 03/May/18 ] |
|
John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/31957/ |