Jens Axboe <axboe@xxxxxxxxx> writes: > Another idea would be to ensure that we do the bdev cache invalidation > at a safe point. But that is done at open time right now, which should > invalidate any cache mappings for the device. If the file close triggers > blkid and there are no further opens of the device, then those mappings > would remain. > > Would the below work for you? It looks like it's not enough; the BLKFLSBUF ioctl winds up happening before blkid runs. I added some instrumentation to the patch and saw that one thread took the "f->fd != -1" path and then, after add_file_hash failed, came back to the "from_hash" path. But all of that seems to finish before blkid gets going, so the pages it pulls in still won't get invalidated. Ken -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html