scst_calc_block_shift: Log block shift and sector size upon mismatch

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5959 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-01-06 13:25:28 +00:00
parent fa29d4cd3d
commit aed1b2f332

View File

@@ -7523,7 +7523,8 @@ int scst_calc_block_shift(int sector_size)
sector_size = 512;
block_shift = ilog2(sector_size);
WARN_ON(1 << block_shift != sector_size);
WARN_ONCE(1 << block_shift != sector_size, "1 << %d != %d\n",
block_shift, sector_size);
if (block_shift < 9) {
PRINT_ERROR("Wrong sector size %d", sector_size);