Currently I use:
while true; do
cat file >/dev/null
echo 3 | sudo tee /proc/sys/vm/drop_caches
done
to warm up ZFS's l2arc. When I can see accesses are primarily coming from the cache disk, it is done.
But I feel pretty silly doing that.
Is there a way I can tell ZFS: "Hey, could you please put this file into l2arc?"
I do not want to lock the file in l2arc. I just want have it in l2arc the same way it is in l2arc after running the above.