From patchwork Fri Sep 7 06:16:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10591679 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 7BF625A4 for ; Fri, 7 Sep 2018 06:16:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69A8326530 for ; Fri, 7 Sep 2018 06:16:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B2752AE6F; Fri, 7 Sep 2018 06:16:38 +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=-7.9 required=2.0 tests=BAYES_00,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 F320126530 for ; Fri, 7 Sep 2018 06:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726031AbeIGKzx (ORCPT ); Fri, 7 Sep 2018 06:55:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:35532 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725831AbeIGKzx (ORCPT ); Fri, 7 Sep 2018 06:55:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7C91AE47 for ; Fri, 7 Sep 2018 06:16:30 +0000 (UTC) From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH v3.1 0/2] btrfs: trim enhancement to allow btrfs really trim block groups Date: Fri, 7 Sep 2018 14:16:22 +0800 Message-Id: <20180907061624.20604-1-wqu@suse.com> X-Mailer: git-send-email 2.18.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset can be fetched from github: https://github.com/adam900710/linux/tree/trim_fix Which is based on v4.19-rc1 tag. This patchset introduces 2 enhancement, one to output better error messages during trim, the other one is to ensure we could really trim block groups if logical bytenr of block groups are beyond physical device size. These two patches are in the wild for a long time, and are pretty small and the 2nd patch in facts fix a regression, and we already have test case for it (btrfs/156). Changelog: v2: Only report total number of errors and first errno to make it less noisy. Change message level from warning to debug v3: Rebase to v4.19-rc1. Change back message level from debug to warning since it's less noisy and will only report total failed bgs and devices. v3.1 Remove the "last error" output from first patch. Qu Wenruo (2): btrfs: Enhance btrfs_trim_fs function to handle error better btrfs: Ensure btrfs_trim_fs can trim the whole fs fs/btrfs/extent-tree.c | 65 ++++++++++++++++++++++++++---------------- fs/btrfs/ioctl.c | 11 ++++--- 2 files changed, 47 insertions(+), 29 deletions(-)