Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2353808ybv; Mon, 24 Feb 2020 03:49:56 -0800 (PST) X-Google-Smtp-Source: APXvYqy3lxh/uMRmAX2pqL2tLZJBcWffTLwfLJwXcVeNsKDuDZZe+afp0ttmbnNtr+TyUS2VSl8J X-Received: by 2002:aca:f517:: with SMTP id t23mr11757892oih.160.1582544996228; Mon, 24 Feb 2020 03:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582544996; cv=none; d=google.com; s=arc-20160816; b=pGuaS2zSDFV3cxQ2E9UyH1g8S4v6fWpJUkURBMxzGRzFsqfcKvhS7O4/2jLtwr4fhy M7BLUfsRnH1NFTSS4AEfSURcTlib82V8UCq+sOWB5aQE9FxMS63r726DyP9nlh5oHb2x 9Z/DMfTXqsnBbTgIcJANEs/9IRN1jkH4FJEFeKKYYZdECiT4/SfKPdQzTPAL595ke662 xECbFDdozM96xwp5eBFP7uKOOu5c43q9aWNhvBWzuyaQoW8ogb9Gtk0fWAB9YmdiTxau xuKR6pRI09cjBiRY+y2rMBUBj98o1B8vdBvaQrJFWRb0FhQpOc9t2kJN/zZSSpb6eFY+ vN0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=sFBo8lhD+3kQHkOAOMdu3dSIY7qpjVmNUZOR+tH8FH0=; b=y/TskLh0bEoOWGqFAYxmTaObfi6iFlwlRy5b2EmefIh3gQ2qfC0f1VUM+wdafYMi1u 9y8l6cTqSJkoSs8UgS9EsYD2C/m01uq4k/5G2ICt1S4Pdid8Zqc/HXlUasoViFmmFYgN PVanrW1m6/9Gwmq4HlWWD66MNciA9TLseUQjLUnRu/aV8fmQKJ3wVnhzYCL3W1Qd1dWL glUCtmlu7ZwdgtQoBMdmDWjWMIrnsqJpHkFyr96gsND+g63ic0TewEGW2Ej6IYPML+SU 5JPCJZIpkEw2iLaG92FSS5bGXXK+T++L137xnYM/oF4HSdROxWqhBy4Eh9hcry5g0gzR rWPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si735662otp.189.2020.02.24.03.49.35; Mon, 24 Feb 2020 03:49:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727299AbgBXLta (ORCPT + 99 others); Mon, 24 Feb 2020 06:49:30 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:58798 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727282AbgBXLta (ORCPT ); Mon, 24 Feb 2020 06:49:30 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A64588F09A17B4D6FF50; Mon, 24 Feb 2020 19:31:12 +0800 (CST) Received: from [127.0.0.1] (10.173.220.179) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 24 Feb 2020 19:31:07 +0800 Subject: Re: [PATCH] ext4/021: make sure the fdatasync subprocess exits To: Eryu Guan CC: , References: <20200214022001.15563-1-yi.zhang@huawei.com> <20200223123411.GA3840@desktop> From: "zhangyi (F)" Message-ID: <2c2b8a1b-64a3-8fd7-948f-ea7a777e2cf0@huawei.com> Date: Mon, 24 Feb 2020 19:31:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200223123411.GA3840@desktop> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.220.179] X-CFilter-Loop: Reflected Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, On 2020/2/23 20:34, Eryu Guan wrote: > On Fri, Feb 14, 2020 at 10:20:01AM +0800, zhangyi (F) wrote: >> Now we just kill fdatasync_work process and wait nothing after the >> test, so a busy unmount failure may appear if the fdatasync syscall >> doesn't return in time. >> >> umount: /tmp/scratch: target is busy. >> mount: /tmp/scratch: /dev/sdb already mounted on /tmp/scratch. >> !!! failed to remount /dev/sdb on /tmp/scratch >> >> This patch kill and wait the xfs_io fdatasync subprocess to make sure >> _check_scratch_fs success. > > Yeah, that's a problem. > > I think you could add another "trap" in fdatasync_work, as what > btrfs/036 does: > > trap "wait; exit" SIGTERM > > So xfs_io will be waited by fdatasync_work before exiting. > Thanks for your suggestion, I will do that. Thanks, Yi.