[LU-14895] dump T10 guard tags on checksum error and flush pages Created: 30/Jul/21  Updated: 14/Jan/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Dongyang Li Assignee: Dongyang Li
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-14924 LustreError: 133-1: nbp17-OST0064-osc... Resolved
is related to LU-14912 client picking other checksum type ov... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

When there is a server-side corruption of pages in the read cache, particularly with T10-PI, it appears that we do not properly handle this case. The client will detect the corruption due to the RPC checksum mismatch, and will resend the RPC, but will re-read the same data from the cache each time. If the server is using the (incorrect) GRD tags on the pages to generate the RPC checksum, the RPC checksum will consistently be incorrect:

nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 
nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 
nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 
nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 
nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 
nbp17-OST0065: BAD READ CHECKSUM: from [10.151.27.142@o2ib] inode [0x20000948a:0x3:0x0] object 0x0:141666 extent [503316480-1509953535], client 73006b, server 10500b1, cksum_type 80 

What should happen in this case is that if the client sends the OBD_FL_RECOV_RESEND flag in the OST_READ RPC, then the server should discard any cached pages in that range from cache, re-read the pages/sectors from the underlying storage (without using the cache), and then verify the GRD tags for each sector locally (calculate in osd-ldiskfs and compare to the GRD tags returned by the kernel), and print an error immediately about which sector(s) do not match, instead of depending on the client to do this again.

It would be useful to be able to (somehow) send a block command (FUA?) to also flush the SFA cache in this case, but that would need some help from the SFA team, and still depends on Lustre handling this correctly.



 Comments   
Comment by Gerrit Updater [ 30/Jul/21 ]

Li Dongyang (dongyangli@ddn.com) uploaded a new patch: https://review.whamcloud.com/44429
Subject: LU-14895 brw: dump T10 guard tags on checksum error
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 761d52d80292d26c65fbdcaebf2d17a10d369a7d

Comment by Gerrit Updater [ 08/Aug/21 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/44530
Subject: LU-14895 client: allow case-insensitive checksum types
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c5e50c4366ddbc418fb6c4178914725d1fcf815c

Comment by Gerrit Updater [ 13/Aug/21 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/44655
Subject: LU-14895 brw: log T10 GRD tags during checksum calcs
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2a9f79f3fbe711c91190f33092893da7d8f4f26b

Comment by Gerrit Updater [ 13/Aug/21 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/44656
Subject: LU-14895 osd-ldiskfs: combine checksum functions
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2b9f76557fa695b33817d4a40b52b63f91f222e2

Comment by Gerrit Updater [ 22/Sep/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44655/
Subject: LU-14895 brw: log T10 GRD tags during checksum calcs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 75ebfb994fb0bce8a0f0400429f04127ead50ea4

Comment by Gerrit Updater [ 22/Sep/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44656/
Subject: LU-14895 osd-ldiskfs: combine checksum functions
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7fdd664b3518e5e8d8a243898d48d9c62c22e18a

Comment by Gerrit Updater [ 10/Oct/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44530/
Subject: LU-14895 client: allow case-insensitive checksum types
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1cf7a8d46ca7a5b446e4f579c82f5f643f4c8650

Generated at Sat Feb 10 03:13:41 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.