Backport of 1e37f2f84680
Hi stable,
Please apply the following backport of 1e37f2f84680 ("rbd: use GFP_NOIO for parent stat and data requests") to 4.4, 4.1 and earlier kernels.
Thanks,
Ilya
PATCH 1/1 rbd: use GFP_NOIO for parent stat and data requests
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.
--- drivers/block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/rbd.c +2 -2
@@ -2736,7 +2736,7 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request)* from the parent. */ page_count = (u32 )calc_pages_for (0 , length); - pages =ceph_alloc_page_vector (page_count,GFP_KERNEL ); + pages =ceph_alloc_page_vector (page_count,GFP_NOIO );if (IS_ERR (pages)) { result =PTR_ERR (pages); pages =NULL ;
@@ -2863,7 +2863,7 @@ static int rbd_img_obj_exists_submit(struct rbd_obj_request *obj_request)*/ size =sizeof (__le64) +sizeof (__le32) +sizeof (__le32); page_count = (u32 )calc_pages_for (0 , size); - pages =ceph_alloc_page_vector (page_count,GFP_KERNEL ); + pages =ceph_alloc_page_vector (page_count,GFP_NOIO );if (IS_ERR (pages))return PTR_ERR (pages);
Signature · 1 line
2.4.3
Greg KH
maintainerRe: [PATCH for < 4.9] rbd: use GFP_NOIO for parent stat and data requests
Quoted 5 lines · Ilya Dryomov
rbd_img_obj_exists_submit()andrbd_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_NOIOshould be used instead ofGFP_KERNELhere.
Quoted 8 lines
Signed-off-by Ilya Dryomov <[email protected]>Reviewed-by David Disseldorp <[email protected]>[[email protected]: backport to < 4.9: context]--- drivers/block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Now queued up, thanks for the backport.
greg k-h