+ * Get a buffer for link info array, btree iterator and a direntry.
+ *
+ * We impose an cap of 3000 link entries when trying to compute
+ * the total number of hardlink entries that we'll allow in the
+ * linkinfo array.
+ *
+ * Note that in the case where there are very few hardlinks,
+ * this does not restrict or prevent us from vending out as many entries
+ * as we can to the uio_resid, because the getdirentries callback
+ * uiomoves the directory entries to the uio itself and does not use
+ * this MALLOC'd array. It also limits itself to maxlinks of hardlinks.