]> git.baikalelectronics.ru Git - 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)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 30 Mar 2018 09:17:48 +0000 (11:17 +0200)
commit6cc5e64fb44f5e2c651c9720fc60dc7987684bd5
treef8f998acb306c25992468d0a52e9082616b37ea5
parente05fd6bfc428a5168ab1176dd8a88eb8301fc2a1
ceph: only dirty ITER_IOVEC pages for direct read

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>
fs/ceph/file.c