On Tue, Mar 17, 2020 at 06:16:49AM -0500, Eric Blake wrote:
 >+static void *
 >+tmpdisk_open (int readonly)
 >+{
 >+  struct handle *h;
 >+  CLEANUP_FREE char *disk = NULL;
 >+  const char *tmpdir;
 >+
 >+  tmpdir = getenv ("TMPDIR");
 >+  if (!tmpdir)
 >+    tmpdir = "/var/tmp";
 
 Rather than calling getenv() for every client, should we
 pre-populate a file-scope variable once during .get_ready? 
Is there a particular reason to do it in .get_ready instead
of .load?  In v3 I did it in .load
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
Read my programming and virtualization blog: 
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top