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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEE4AC433EF for ; Wed, 20 Apr 2022 08:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376821AbiDTIx0 (ORCPT ); Wed, 20 Apr 2022 04:53:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376899AbiDTIxY (ORCPT ); Wed, 20 Apr 2022 04:53:24 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F195A33EBE; Wed, 20 Apr 2022 01:50:36 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KjvW21g3Fz1J9sP; Wed, 20 Apr 2022 16:49:50 +0800 (CST) Received: from kwepemm600015.china.huawei.com (7.193.23.52) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 20 Apr 2022 16:50:34 +0800 Received: from [10.174.176.52] (10.174.176.52) by kwepemm600015.china.huawei.com (7.193.23.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 20 Apr 2022 16:50:34 +0800 Message-ID: Date: Wed, 20 Apr 2022 16:50:33 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 From: "chenxiaosong (A)" Subject: Re: [PATCH -next 1/2] nfs: nfs{,4}_file_flush should consume writeback error To: Trond Myklebust , "anna@kernel.org" , "smayhew@redhat.com" CC: "linux-nfs@vger.kernel.org" , "liuyongqiang13@huawei.com" , "linux-kernel@vger.kernel.org" , "yi.zhang@huawei.com" , "zhangxiaoxu5@huawei.com" References: <20220305124636.2002383-1-chenxiaosong2@huawei.com> <20220305124636.2002383-2-chenxiaosong2@huawei.com> <5666cb64-c9e4-0549-6ddb-cfc877c9c071@huawei.com> <037054f5ac2cd13e59db14b12f4ab430f1ddef5d.camel@hammerspace.com> <4a8e21fb-d8bf-5428-67e5-41c47529e641@huawei.com> <0528423f710cd612262666b1533763943c717273.camel@hammerspace.com> <9fc83915a24d7b65d743910dd0f0e5f3d0373596.camel@hammerspace.com> In-Reply-To: <9fc83915a24d7b65d743910dd0f0e5f3d0373596.camel@hammerspace.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.52] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600015.china.huawei.com (7.193.23.52) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/4/12 22:27, Trond Myklebust 写道: > > It will clear ENOSPC, EDQUOT and EFBIG. It should not clear other > errors that are not supposed to be reported by write(). > > As I keep repeating, that is _documented behaviour_! > Hi Trond: You may mean that write(2) manpage described: > Since Linux 4.13, errors from write-back come with a promise that > they may be reported by subsequent. write(2) requests, and will be > reported by a subsequent fsync(2) (whether or not they were also > reported by write(2)). The manpage mentioned that "reported by a subsequent fsync(2)", your patch[1] clear the wb err on _async_ write(), and wb err will _not_ be reported by subsequent fsync(2), is it documented behaviour? All other filesystems will _not_ clear any wb err on _async_ write(). [1] https://patchwork.kernel.org/project/linux-nfs/patch/20220411213346.762302-4-trondmy@kernel.org/