On Wed, Dec 04, 2019 at 05:30:23PM +0900, Naohiro Aota wrote: > while(mag && mag->magic) { > unsigned char *buf; > - > - off = (mag->kboff + (mag->sboff >> 10)) << 10; > + uint64_t kboff; > + > + if (!mag->is_zone) > + kboff = mag->kboff; > + else { > + uint32_t zone_size_sector; > + int ret; > + > + ret = ioctl(pr->fd, BLKGETZONESZ, &zone_size_sector); I guess this ioctl returns always the same number, right? If yes, than you don't want to call it always when libmount compares any magic string. It would be better call it only once from blkid_probe_set_device() and save zone_size_sector to struct blkid_probe. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com