Skip to content
Snippets Groups Projects
  1. Apr 28, 2014
  2. Apr 27, 2014
  3. Apr 25, 2014
  4. Apr 24, 2014
    • Gleb Natapov's avatar
      mmu: mark COW ptes to skip them during protection changes · dfb7b624
      Gleb Natapov authored
      
      Write permission should not be granted to ptes that has no write
      permission because they are COW, but currently there is no way to
      distinguish between write protection due to vma permission and write
      protection due to COW. Use bit reserved for software use in pte as a
      marker for COW ptes and check it during permission changes.
      
      Signed-off-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
      dfb7b624
    • Gleb Natapov's avatar
      mmu: map page as dirty on write fault · 17330251
      Gleb Natapov authored
      
      Mapping page as dirty saves CPU from doing additional memory access to
      write out dirty bit when access will succeed.
      
      Signed-off-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
      17330251
    • Nadav Har'El's avatar
      zfs: fix read() of directory to return EISDIR · 0ad78a14
      Nadav Har'El authored
      
      Posix allows read() on directories in some filesystems. However, Linux
      always returns EISDIR in this case, so because we're emulating Linux,
      so should we, for every filesystem. All our filesystems except ZFS
      (e.g., ramfs) already return EISDIR when reading a directory, but ZFS
      doesn't, so this patch adds the missing check in ZFS.
      
      This patch is related to issue #94: the first step to fixing #94 is to
      return the right error when reading a directory.
      
      This patch also adds a test case, which can be compiled both on OSv and
      Linux, to verify they both have the same behavior. Before the patch, the
      test succeeded on Linux but failed on OSv when the directory is on ZFS.
      
      Instead of fixing zfs_read like I do in this patch, I could have also fixed
      sys_read() in vfs_syscalls.cc which is the top layer of all read()
      operations, and I could have done there
         (fp->f_dentry && fp->f_dentry->d_vnode->v_type == VDIR) {
            return EISDIR;
         }
      to cover all the filesystems. I decided not to do that, because all
      filesystems except ZFS already have this check, and because the lower
      layers like zfs_read() already have more natural access to d_vnode.
      
      Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      0ad78a14
Loading