Commit Graph

10 Commits

Author SHA1 Message Date
Ziye Yang
e35816b4be bdev/gpt: change the log level.
Change it from error_log to debug_log level to
avoid missleading while there does not have
GPT_PROTECTIVE_MBR type.

Change-Id: I51f7bf2994db227b4c9f1bf80d3bb0e05c047e59
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/382080
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-11 14:00:16 -04:00
Daniel Verkamp
d92f0f75ca log: rename SPDK_TRACELOG to SPDK_DEBUGLOG
This matches the name to the behavior and prepares for addition of a new
log macro for "info" log level.

Change-Id: I94ccd49face4309d3368e399528776ab140748c4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375833
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-29 13:25:58 -04:00
Daniel Verkamp
ae60710ab8 util: add CRC32 utility functions
Factor out the iSCSI and GPT CRC32 functions into generic library
functions.

Change-Id: I1f1a5f3968a983b663a51bd984500492eeb12605
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370765
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-02 19:47:35 -04:00
Daniel Verkamp
f7cfd3a434 bdev/gpt: compare the correct MBR entry start LBA
The protective MBR entry may not be the first one.  This is already
handled correctly when comparing the total size field, but the start LBA
field was always looking at the first entry.

Change-Id: Ie54e424b2e9cb546b1ed04192662936e04e08b6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370747
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
94174eec71 bdev/gpt: remove unused gpt->mbr field
Change-Id: If3cd7ee8251b5e311d5e1e9210085f8c2cbc83e1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370746
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
13a622a591 bdev/gpt: clean up #includes
Remove unnecessary headers and order the remaining #includes correctly.

Change-Id: I6b331aa1514e55e7bf56a07be23f630e4ae3fcdb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370731
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
d695182200 bdev/gpt: fix MBR start_lba endian conversion
The message printed when start_lba doesn't match the expected value
would print byte-swapped values on big-endian architectures.  On
little-endian architectures, the problem would not be noticeable, since
the conversion doesn't do anything.

Change-Id: I9e8d4485b5710f4333d04bb006bc204416c689cd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370730
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
7ae3fcd02a gpt: fix naming of CRC32 polynomial #define
GPT uses the standard IEEE CRC-32 polynomial, not CRC-32C.

Change-Id: I94dae01ec7b31cb3c3efc735d9dfa4e0cfea9ce4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369306
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-17 17:58:19 -04:00
Ziye Yang
da1c360de1 bdev, gpt: change SPDK_ERRLOG to SPDK_TRACE_LOG
It should not print error if there is no GPT
signature

Change-Id: I6e5f8d31aed62dfb420f0ff0560bfbf8a7e8afb3
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/368476
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-07 17:10:56 -04:00
Ziye Yang
26d6770f1c GPT: add GPT bdev support
Change-Id: I6a138e1c1d775e8c8bfeede9600f8b0f799ecdad
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/362445
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-07-06 13:44:37 -04:00