Really, the guarantee is "the kernel will tell you about those runs of zeros that it can identify more quickly than you could". Note that the kernel can't really detect actual blocks full of zeros and faster than userspace can -- memcmp doesn't magically run faster just because you're in kernel-land. But it can exploit knowledge of internal fs data structures (like holes) that aren't otherwise exposed to userspace.