Skip to content

Commit 493cb19

Browse files
idryomovgregkh
authored andcommitted
rbd: use GFP_NOIO for parent stat and data requests
commit 1e37f2f84680fa7f8394fd444b6928e334495ccc upstream. rbd_img_obj_exists_submit() and rbd_img_obj_parent_read_full() are on the writeback path for cloned images -- we attempt a stat on the parent object to see if it exists and potentially read it in to call copyup. GFP_NOIO should be used instead of GFP_KERNEL here. Link: http://tracker.ceph.com/issues/22014 Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: David Disseldorp <ddiss@suse.de> [idryomov@gmail.com: backport to < 4.9: context] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ba4828a commit 493cb19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/block/rbd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,7 +2736,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request)
27362736
* from the parent.
27372737
*/
27382738
page_count = (u32)calc_pages_for(0, length);
2739-
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
2739+
pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
27402740
if (IS_ERR(pages)) {
27412741
result = PTR_ERR(pages);
27422742
pages = NULL;
@@ -2863,7 +2863,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request)
28632863
*/
28642864
size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32);
28652865
page_count = (u32)calc_pages_for(0, size);
2866-
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
2866+
pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
28672867
if (IS_ERR(pages))
28682868
return PTR_ERR(pages);
28692869

0 commit comments

Comments
 (0)