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, 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 C616BC433EF for ; Wed, 15 Sep 2021 08:05:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B064761185 for ; Wed, 15 Sep 2021 08:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236746AbhIOIG1 (ORCPT ); Wed, 15 Sep 2021 04:06:27 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:15419 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236763AbhIOIFg (ORCPT ); Wed, 15 Sep 2021 04:05:36 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4H8Xfp1ZFPzRB8v; Wed, 15 Sep 2021 15:59:14 +0800 (CST) Received: from dggpeml500023.china.huawei.com (7.185.36.114) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 15 Sep 2021 16:03:20 +0800 Received: from [10.174.176.83] (10.174.176.83) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 15 Sep 2021 16:03:20 +0800 To: Linux NFS Mailing List , Trond Myklebust , Anna Schumaker CC: Luo Meng , "zhangyi (F)" From: "zhangxiaoxu (A)" Subject: Questions about nfs_sb_active Message-ID: Date: Wed, 15 Sep 2021 16:03:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.83] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Trond, I have some confuse about 'nfs_sb_active'. The following commit increase the 'sb->s_active' to prevent concurrent with umount process when handle the callback rpc message. e39d8a186ed0 ("NFSv4: Fix an Oops during delegation callbacks") 113aac6d567b ("NFS: nfs_delegation_find_inode_server must first reference the superblock") But it also delay the process in function 'generic_shutdown_super', such as 'sync_filesystem' and 'fsnotify_sb_delete'. For the common file system, when umount success, the data should be stable to the disk, but in nfs, it maybe delay? I want know : 1. whether we _must_ stable the data to the server? 2. how to ensure the data not lost when umount success but client crash? 3. the delayed fsnotify umount event is reasonable or not? 4. the 'nfs_sb_active' should be used under what scenario? Thanks.