From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB99BC1B0D9 for ; Thu, 10 Dec 2020 11:51:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6578323D67 for ; Thu, 10 Dec 2020 11:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728477AbgLJLug (ORCPT ); Thu, 10 Dec 2020 06:50:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:53356 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727323AbgLJLuP (ORCPT ); Thu, 10 Dec 2020 06:50:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A377EAD87; Thu, 10 Dec 2020 11:49:33 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 1FA2FDA7D9; Thu, 10 Dec 2020 12:47:57 +0100 (CET) Date: Thu, 10 Dec 2020 12:47:57 +0100 From: David Sterba To: Goldwyn Rodrigues Cc: linux-btrfs@vger.kernel.org, Goldwyn Rodrigues , osandov@osandov.com Subject: Re: [PATCH 1/2] btrfs: Fold generic_write_checks() in btrfs_write_check() Message-ID: <20201210114756.GD6430@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Goldwyn Rodrigues , linux-btrfs@vger.kernel.org, Goldwyn Rodrigues , osandov@osandov.com References: <8dabce11b6bc9dc4ba534a2d5cf169ca3d0a812d.1607449636.git.rgoldwyn@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8dabce11b6bc9dc4ba534a2d5cf169ca3d0a812d.1607449636.git.rgoldwyn@suse.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Tue, Dec 08, 2020 at 12:42:40PM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > Code Cleanup. > > Fold generic_write_checks() in btrfs_write_check(), because > generic_write_checks() is called before btrfs_write_check() in both > cases. The prototype of btrfs_write_check() has been changed to return > ssize_t and it can return zero as a valid error code. btrfs_write_check > now returns the count of I/O to be performed. That's effectively reverting what Omar sent as a fix to your initial patch: https://lore.kernel.org/linux-btrfs/b096cecce8277b30e1c7e26efd0450c0bc12ff31.1605723568.git.osandov@fb.com/ fixing a problem. Now you revert that to fix another problem, now with the lock added. I'd rather have one patch without this cleanup and given that this is technically fixing a regression in the new 5.11 code it'll go to post rc1 pull request.