From patchwork Mon Nov 6 15:51:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 10043749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5CB80603FF for ; Mon, 6 Nov 2017 15:51:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43F8629B30 for ; Mon, 6 Nov 2017 15:51:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3877829D9A; Mon, 6 Nov 2017 15:51:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E94C29B30 for ; Mon, 6 Nov 2017 15:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932192AbdKFPve (ORCPT ); Mon, 6 Nov 2017 10:51:34 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:47155 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753877AbdKFPvd (ORCPT ); Mon, 6 Nov 2017 10:51:33 -0500 Received: by mail-wr0-f196.google.com with SMTP id k61so3210840wrc.4 for ; Mon, 06 Nov 2017 07:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=1gKE6Wf37GYaUluVa94S73Oigu4P1/6u5JpE/iV5qEQ=; b=QRBgOknwJKbgFmq2PZilLrTfCcmKv4xXJiEzyk0HbzhROMs7NHc/F177AkuxfSTdoQ 8mk+fPhSrk7VoR4SXW6hEs65bATYn/fcxxBOrleRSEEDKd16TR80AGixPosxZpTx4QOx iO5zGJNNX0oWTRPw3FrssFhRiaWyAX1WjYBN0GsqCbs+BL1OEVugoZr0cQUSYdC/VX2K y9gRvV4hzX9d4REeqe7MjIrMNQ/aqMInACTVQ2sypuQNweK3fZSa/5k8wWd0u16GSPIF FUvLwnUQpUv+VMcechw8xFF2wecZBonmwqRvl4s6/ysJEHAR0POq9ZemfnZs1gbWwUht lFXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=1gKE6Wf37GYaUluVa94S73Oigu4P1/6u5JpE/iV5qEQ=; b=bxeaMh4sICaTdoqjnqxnF9AZcGqeYHziD/wVB4FIydjJea+rOeDXLPowrlZHH744xE 0gxNrbxA2O5adDAHIKQZ/SNt6l0Us91zCbaub8l/9vc/4Si6t5pX3ZzC+IYGh3DlTrT0 3BSrb9Xp2T78LmqkOVM8kz/cZQJAqADpXh4SpwjpLXDr09/+5NTimxdmKedA9NZR1wdI cRi3u7W6srLmXA0gMJpjnmRFqC87wVjxyKiZGpBPEyBGq49pZgOvbFKR1nbFPHUK8H4o y07nElj5vfhnBGMzcrWYUEWD0ec2hrl+A7yEKAt67flqkzaTCXtGhow3qB8yqv+o69yY rIww== X-Gm-Message-State: AMCzsaXzqVUr1C9pBs/t2fGI8OdxXEmhPeFIRybuET28pneZOXlRR1VL goohnQkSrBsLnPITHJDjZdR4nnkt X-Google-Smtp-Source: ABhQp+Q4qgOowfHqjwNZitVu7GVvtvuv/dnUNN8hzLJhdqT/f70uYuVBRvRAum5Z4L0QfAw7hmmaYg== X-Received: by 10.223.148.38 with SMTP id 35mr14136281wrq.49.1509983491939; Mon, 06 Nov 2017 07:51:31 -0800 (PST) Received: from orange.brq.redhat.com. (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 31sm8274329wrm.0.2017.11.06.07.51.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Nov 2017 07:51:31 -0800 (PST) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH] rbd: use GFP_NOIO for parent stat and data requests Date: Mon, 6 Nov 2017 16:51:20 +0100 Message-Id: <1509983480-2051-1-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/22014 Signed-off-by: Ilya Dryomov Reviewed-by: David Disseldorp --- drivers/block/rbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index fd3b9af610d2..57275298d9fc 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2666,7 +2666,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; @@ -2801,7 +2801,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)) { ret = PTR_ERR(pages); goto fail_stat_request;