On Tue 14 Apr 2020 02:29:13 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >>> Hmm. How to avoid it? Maybe, at least, refactor the code, to drop all >>> sizeof(uint64_t), converting them to L2_ENTRY_SIZE, L1_ENTRY_SIZE, >>> REFTABLE_ENTRY_SIZE etc? >> >> That wouldn't be a bad thing I guess but, again, for a separate patch or >> series. >> >>> And all occurrences of pure '8' (not many of them exist) >> >> I think most/all nowadays only refer to the number of bits per byte. >> >> Maybe there's a couple that still need to be fixed, but we have been >> removing a lot of numeric literals from the qcow2 code (see for example >> b6c246942b, 3afea40243 or a35f87f50d). >> > > > git grep '\<8\>' block/qcow2* > > shows at least > > qcow2-cluster.c: s->l1_table_offset + 8 * l1_start_index, bufsize, > false); > qcow2-cluster.c: s->l1_table_offset + 8 * > l1_start_index,
I see, worth replacing with L1_ENTRY_SIZE as you suggest. I can take of writing the patches if you want. Berto