[LU-1025] Lustre crc32c implementation not use final bit inversion Created: 24/Jan/12  Updated: 27/Mar/12  Resolved: 08/Feb/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.2.0
Fix Version/s: Lustre 2.2.0

Type: Improvement Priority: Blocker
Reporter: Alexander Boyko Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-241 support crc32c with hardware accelera... Resolved
Rank (Obsolete): 4747

 Description   

LU-241 add crc32c crypto hash algorithm to ost(osc) checksum. But this implementation differ from base crc32c at linux kernel(intel implementation on crc32 instruction and table crc32c implementation) at final bit inversion.



 Comments   
Comment by Andreas Dilger [ 24/Jan/12 ]

Alexander,
thanks for the bug report. Fortunately, since the CRC32C feature was landed after the 2.1.0 release, there is still time to fix this before 2.2.0 is released.

Can you please describe the difference in the implementation in more detail. Are you planning to submit a patch?

Comment by Alexander Boyko [ 25/Jan/12 ]

Sure, the kernel implementation example is below.

crc = crc32c(~0, part1, len1);
crc = crc32c(crc, part2, len2);
crc = crc32c(crc, part3, len3);
crc = ~crc;

Lustre implementation doesn`t do crc = ~crc. Simple fix is to add fini_cksum(cksum, cksum_type) at obd_cksum.h and call it after cksum calculation loop at osc_request.c and ost_handler.c.

u32 fini_cksum(cksum, cksum_type)
{
   if (cksum_type == OBD_CKSUM_CRC32C)
         return ~cksum;
   return cksum;
}
Comment by Peter Jones [ 25/Jan/12 ]

Alexander

I appreciate that this is a simple tweak to the existing code, but it would still expedite us reviewing and landing the correction if you could upload it into gerrit.

Thanks

Peter

Comment by Alexander Boyko [ 26/Jan/12 ]

patch submitted to http://review.whamcloud.com/2018

Comment by Peter Jones [ 26/Jan/12 ]

Thanks!

Comment by Peter Jones [ 02/Feb/12 ]

Alex

Could you please rebase your patch on the tip of master? The landing of the fix for LU1048 should have now addressed the reason behind the autotest failure.

Thanks

Peter

Comment by Alexander Boyko [ 03/Feb/12 ]

done

Comment by Peter Jones [ 03/Feb/12 ]

Thanks Alex!

Comment by Peter Jones [ 08/Feb/12 ]

Landed for 2.2

Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,client,el5,ofa #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
  • lustre/ost/ost_handler.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,client,el6,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
  • lustre/ost/ost_handler.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/osc/osc_request.c
  • lustre/include/obd_cksum.h
  • lustre/ost/ost_handler.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,server,el5,ofa #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,server,el5,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/osc/osc_request.c
  • lustre/include/obd_cksum.h
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,server,el6,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/ost/ost_handler.c
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,server,el5,ofa #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/osc/osc_request.c
  • lustre/include/obd_cksum.h
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/ost/ost_handler.c
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,client,el5,inkernel #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/osc/osc_request.c
  • lustre/include/obd_cksum.h
  • lustre/ost/ost_handler.c
Comment by Build Master (Inactive) [ 08/Feb/12 ]

Integrated in lustre-master » i686,client,el5,ofa #459
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = SUCCESS
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/ost/ost_handler.c
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 17/Feb/12 ]

Integrated in lustre-master » x86_64,server,el6,ofa #480
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = FAILURE
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
  • lustre/ost/ost_handler.c
Comment by Build Master (Inactive) [ 17/Feb/12 ]

Integrated in lustre-master » x86_64,client,el6,ofa #480
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = FAILURE
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Comment by Build Master (Inactive) [ 17/Feb/12 ]

Integrated in lustre-master » i686,client,el6,ofa #480
LU-1025 checksum: add final bit inversion for crc32c (Revision 864516e29129cb209435b4cc3ba513a9f453d383)

Result = ABORTED
Oleg Drokin : 864516e29129cb209435b4cc3ba513a9f453d383
Files :

  • lustre/ost/ost_handler.c
  • lustre/include/obd_cksum.h
  • lustre/osc/osc_request.c
Generated at Sat Feb 10 01:12:46 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.