Print this page
OS-5343 dockerinit gets stuck in zfd_ready, zfd devices not showing up after > 1 hour
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
        
@@ -20,11 +20,11 @@
  */
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 /*
- * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
+ * Copyright 2016, Joyent, Inc.
  */
 
 /*
  * vnode ops for the /dev filesystem
  *
@@ -862,10 +862,13 @@
                             "disk %s\n", nm, parent->sdev_path));
                         error = 0;
                 }
         }
 
+        if (error == 0)
+                i_ddi_di_cache_invalidate();
+
         return (error);
 }
 
 /*
  * Some restrictions for this file system:
@@ -1186,10 +1189,11 @@
         sdev_update_timestamps(SDEVTOV(self), kcred,
             AT_CTIME|AT_MTIME|AT_ATIME);
         sdev_update_timestamps(dvp, kcred, AT_MTIME|AT_ATIME);
         if (SDEV_IS_GLOBAL(parent))
                 atomic_inc_ulong(&parent->sdev_gdir_gen);
+        i_ddi_di_cache_invalidate();
 
         /* wake up other threads blocked on looking up this node */
         mutex_enter(&self->sdev_lookup_lock);
         SDEV_UNBLOCK_OTHERS(self, SDEV_LOOKUP);
         mutex_exit(&self->sdev_lookup_lock);
@@ -1258,10 +1262,11 @@
         sdev_update_timestamps(SDEVTOV(self), kcred,
             AT_CTIME|AT_MTIME|AT_ATIME);
         sdev_update_timestamps(dvp, kcred, AT_MTIME|AT_ATIME);
         if (SDEV_IS_GLOBAL(parent))
                 atomic_inc_ulong(&parent->sdev_gdir_gen);
+        i_ddi_di_cache_invalidate();
 
         /* wake up other threads blocked on looking up this node */
         mutex_enter(&self->sdev_lookup_lock);
         SDEV_UNBLOCK_OTHERS(self, SDEV_LOOKUP);
         mutex_exit(&self->sdev_lookup_lock);
@@ -1373,10 +1378,13 @@
                 if (error == EBUSY)
                         error = 0;
 
         }
 
+        if (error == 0)
+                i_ddi_di_cache_invalidate();
+
         return (error);
 }
 
 /*
  * read the contents of a symbolic link