]> www.infradead.org Git - users/jedix/linux-maple.git/commit
block: update integrity interval after queue limits change
authorRitika Srivastava <ritika.srivastava@oracle.com>
Tue, 3 Jul 2018 19:05:39 +0000 (12:05 -0700)
committerBrian Maly <brian.maly@oracle.com>
Thu, 5 Jul 2018 19:22:24 +0000 (15:22 -0400)
commit32382b52d87a2882dd0f9f769eca325ea1632d49
tree1340a60493341e2571214b0e2ed109f87499e511
parent98efd2b6edb623116fb63c69841d316dba25211e
block: update integrity interval after queue limits change

A disk's integrity interval is calculated based on the logical block
size of it's queue. If the queue or it's block size is not set, default
512 integrity interval is set.
The issue is that the integrity interval of dm device is set before it's
queue limits are set and it is not updated once the appropriate queue
limits are set.
So, dm integrity interval is set to 512 by default. This causes
following integrity mismatch errors for devices with logical block size
!=512.
This further leads to dm paths not being setup correctly.

blk_integrity_compare: dm-X/sdx protection interval 512 != 4096

Solution is to set integrity interval all the time in
blk_integrity_register() according to the logical block size of the
queue. Once logical block size of the queue is updated, the integrity
interval will be set correctly on the next blk_integrity_register().

This issue does not occur in UEK5 or upstream as they contain the
following
commits which resolve the current and couple of other issues as well.
These when backported to UEK4 cause KABI breakage. To work around it,
the current patch resolves this issue.

aff34e192e4eeacfb8b5ffc68e10a240f2c0c6d7
0f8087ecdeac921fc4920f1328f55c15080bc6aa
a48f041d91bf1aee599fa2adb53b780ed20c2ee5
4c241d08dbfcbdc7a949b91d72707a289d464954
25520d55cdb6ee289abc68f553d364d22478ff54
2859323e35ab5fc42f351fbda23ab544eaa85945

Orabug: 27586756

Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
block/blk-integrity.c