From patchwork Thu Jan 3 08:49:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10747029 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 4C7761399 for ; Thu, 3 Jan 2019 08:50:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E0F728791 for ; Thu, 3 Jan 2019 08:50:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 329C22879C; Thu, 3 Jan 2019 08:50:18 +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 E09AC28791 for ; Thu, 3 Jan 2019 08:50:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbfACIuI (ORCPT ); Thu, 3 Jan 2019 03:50:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:60060 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726876AbfACIuI (ORCPT ); Thu, 3 Jan 2019 03:50:08 -0500 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 0BDC1AEBC for ; Thu, 3 Jan 2019 08:50:07 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 0/7] More misc fixes Date: Thu, 3 Jan 2019 10:49:58 +0200 Message-Id: <20190103085005.32053-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 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 Here is an assortment of fixes, mainly around the async (compressed) cow path. Just removes some redundant arguments/local variables, makes shrink_delalloc a bit more readable by simplifying variable usage and giving more appropriate names. Also documents the ->inode null check in async_cow_submit and cleans up open-coded usage of DIV_ROUND_UP. No functional changes to any of the patches. Nikolay Borisov (7): btrfs: Remove inode argument from async_cow_submit btrfs: Remove isize local variable in compress_file_range btrfs: Use ihold instead of igrab in cow_file_range_async btrfs: Remove WARN_ON in btrfs_alloc_delalloc_work btrfs: Document logic in async_cow_submit btrfs: Replace open-coded maths with DIV_ROUND_UP btrfs: Refactor shrink_delalloc fs/btrfs/extent-tree.c | 33 ++++++++++++++++++++++----------- fs/btrfs/extent_io.c | 7 +++---- fs/btrfs/inode.c | 27 +++++++++++++++------------ 3 files changed, 40 insertions(+), 27 deletions(-)