Skip to content
Snippets Groups Projects
  1. Jan 23, 2014
    • Raphael S. Carvalho's avatar
      zfs: Fix zfs_inactive on unlinked znode cases · 08290fd5
      Raphael S. Carvalho authored
      
      This patch addresses a corner-case in our zfs_inactive which can potentially
      leak a znode object.
      
      *** Some background on znode/zfs_inactive ***
      - Used to deallocate fs-specific data.
      
      - Before destroying the znode, a DMU transaction is created to sync the znode
      to the backing store *if* its z_atime_dirty is set (Not relevant to this
      patch though).
      
      - When removing a link, zfs_remove sets the field zp->z_unlinked of the
      underlying znode if the number of links reached 0 (Simply put, not present in
      the fs anymore).
      
      *** The problem ***
      The actual problem shows up when zfs_inactive is used on znodes with the
      unlinked field set.
      
      The code wrapped around by this patch was previously added to speed up the call
      to vrecycle, whose name partially explains itself. Its first functionality is
      to eliminate all activity associated to the vnode, then put the vnode back into
      a list of free vnodes.
      
      OSv VFS layer doesn't support vrecycle, but our zfs_inactive is acting as if it
      were supported. Another thing is that vrecycle call was also removed.
      
      *** Solution ***
      Let's fix this problem by simply wrapping around the test which prevented
      zfs_inactive from working properly on unlinked znodes, thus leaking references
      to the underlying mount point afterwards.
      
      The commentary added into zfs_inactive also explains why these changes are
      needed. It would also make things easier when people look at it in the future,
      and try to understand why things are the way they are.
      
      Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      08290fd5
    • Raphael S. Carvalho's avatar
      zfs: Fix znode reference count leaks · 76c0caa7
      Raphael S. Carvalho authored
      
      The zfs_remove() function calls zfs_dirent_lock, which in turn calls
      zfs_zget() which bumps up the underlying znode reference count once.
      
      However, neither zfs_remove() or zfs_rmdir() release the reference count
      after using it. This prevents zfs_zinactive() which is used to destroy
      the znode object from working properly. Another consequence is that each
      znode holds a reference to the underlying mount point, keeping it busy
      for unmount.
      
      Fix the znode refcnt by calling zfs_zinactive after znode usage.
      
      Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      76c0caa7
    • Amnon Heiman's avatar
      Add boost license to license directory · ef9b2317
      Amnon Heiman authored
      
      In the Http server implementation, some of the code was
      based on an example from the boost library.
      
      The boost license itself was not included in the license
      directory.
      
      Signed-off-by: default avatarAmnon Heiman <amnon@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      ef9b2317
    • Dmitry Fleytman's avatar
      netfront: get IOCTL definitions from proper place · 75311f28
      Dmitry Fleytman authored
      
      There were 2 places with ioctl definitions, Xen netfront driver
      was compiled with IOCTL definitions from wrong place.
      
      Fixed by changing include and deleting file with improper definitions
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      75311f28
  2. Jan 22, 2014
  3. Jan 21, 2014
Loading