From patchwork Tue Oct 30 23:06:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10661793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91C4514BD for ; Tue, 30 Oct 2018 23:06:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 809C628CCE for ; Tue, 30 Oct 2018 23:06:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 709622A779; Tue, 30 Oct 2018 23:06:31 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 0EA9628CCE for ; Tue, 30 Oct 2018 23:06:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbeJaIB5 (ORCPT ); Wed, 31 Oct 2018 04:01:57 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41924 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727355AbeJaIB5 (ORCPT ); Wed, 31 Oct 2018 04:01:57 -0400 Received: by mail-pg1-f194.google.com with SMTP id 23-v6so6396117pgc.8 for ; Tue, 30 Oct 2018 16:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=XRkJFF3stD22lptdYkTatKQUzbNskuSZegD0aCVwQIE=; b=bZL5ihj+gH9ezCB1mvjOwfRQOXDtig8siuAOIaavp1IjYq3416l/HXilApmU3J60H0 tv15u7MX+vAzuYD7rlVpnzitj0NU9UehG1Qx9tJ/KLEkho/OcdpKSCgq3/3xCmt6e4r4 rP2X3ghRk9qJg3/7NCfxDbhG/tyiYz3XoMsjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XRkJFF3stD22lptdYkTatKQUzbNskuSZegD0aCVwQIE=; b=OSh866ylYX0utujDbeN7Yd0g84YzWV7AFKgHa0CGuuQjrNJvBPEr9BzF6i2SEGREFg NCH/YGwK9yA7KFZsh03YUguZsB625G2fKC6VCPdXEE8wTCLNhaEkHT0YcJwXKwitgpQN BQ0h7YMmEmUWXEdH/BYxjMpJCTbpql+4iW0Qkv62ZdGQZ+TST2IjAg3Q0OlqiJCAe59a 2fENVAg828G0GSin13wZQuOZO+K/nt1uVaBUzs8jxV32XElCys7ahazqvd+p6DM46L8c b6tUQvcwqwb0HCB9CPs0TOmOSEnxL2xKyazowfate2+kn+ttK4NBhZlbC9GV4toJiM0g xFAQ== X-Gm-Message-State: AGRZ1gII9ebLBLHfgvFwXxwPkePCQRrZ2MJNkziXCN9R0+UoClaA0Bz6 96+SUUOAVV/JGOcyDS7qhxFRpA== X-Google-Smtp-Source: AJdET5fMdjdFZd5XvGZZ4+IyWfmusBrdYcBCBNL4ca87zBscwZ8XmEme2RM9yrkjb4omtEjT/QaK+Q== X-Received: by 2002:a62:fd0b:: with SMTP id p11-v6mr658194pfh.167.1540940789652; Tue, 30 Oct 2018 16:06:29 -0700 (PDT) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:e418:c825:76cf:5f64]) by smtp.gmail.com with ESMTPSA id z15-v6sm27953490pfn.170.2018.10.30.16.06.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Oct 2018 16:06:28 -0700 (PDT) From: Evan Green To: Jens Axboe Cc: Gwendal Grignou , Alexis Savery , Evan Green , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] loop: Better discard for block devices Date: Tue, 30 Oct 2018 16:06:22 -0700 Message-Id: <20181030230624.61834-1-evgreen@chromium.org> X-Mailer: git-send-email 2.16.4 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series addresses some errors seen when using the loop device directly backed by a block device. The first change plumbs out the correct error message, and the second change prevents the error from occurring in many cases. Evan Green (2): loop: Report EOPNOTSUPP properly loop: Better discard support for block devices drivers/block/loop.c | 75 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 23 deletions(-)