El miércoles, 23 de agosto de 2017 2:26:48 (CEST) Timofey Titovets escribió: > + for (i = 0; i < workspace->sample_size; i += sizeof(zero)) { > + if (memcmp(&workspace->sample[i], &zero, sizeof(zero))) > + return false;
Instead of just checking for 0, wouldn't it be a better idea to check for any kind of repetitions? As in, iterate over the sample and memcmp() each part of sample with the previous one. The cost would be the same, and it would detect not just zeros, but any kind of repeated data. Is there any reason I'm missing for not doing this? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html