]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ceph: only dirty ITER_IOVEC pages for direct read
authorYan, Zheng <zyan@redhat.com>
Fri, 16 Mar 2018 03:22:29 +0000 (11:22 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 9 Apr 2018 13:41:10 +0000 (10:41 -0300)
commit5cabd8ac25613e19427d8cbfb8643c478c3c54ef
treec5b3fc3bef2345b59e156f08c9ca14cd0f230324
parent9d27ffa47f945172993083dc19ffa40b70664948
ceph: only dirty ITER_IOVEC pages for direct read

BugLink: http://bugs.launchpad.net/bugs/1762370
commit 85784f9395987a422fa04263e7c0fb13da11eb5c upstream.

If a page is already locked, attempting to dirty it leads to a deadlock
in lock_page().  This is what currently happens to ITER_BVEC pages when
a dio-enabled loop device is backed by ceph:

  $ losetup --direct-io /dev/loop0 /mnt/cephfs/img
  $ xfs_io -c 'pread 0 4k' /dev/loop0

Follow other file systems and only dirty ITER_IOVEC pages.

Cc: stable@kernel.org
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/ceph/file.c