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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 767EEC0650F for ; Tue, 6 Aug 2019 02:12:36 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4553D20717; Tue, 6 Aug 2019 02:12:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="bUSyfHqJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="kRP5Lnev"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="cjs7CVba" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4553D20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1huoxn-0003qR-Tp; Tue, 06 Aug 2019 02:12:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1huoxm-0003qE-Ty for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Aug 2019 02:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gmwGsFqFZ7nzpjOWzRwd6IYfbRzy87TFiebrWrphqHI=; b=bUSyfHqJxMoSugV+umNfiZd+jl k72L59k4mSKihhkDCJCQJG90AcRCoPQtpXthdFqFXwqCplnLoATRCGF3E6VCm79xB5b0q8IRA2q2x PvjdCfIa0Q3FWdQkfGqbClZQh5X5dWz2UsEFcAMlt6c2Bh5JvR4++SdeTovIY+mzFkBc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gmwGsFqFZ7nzpjOWzRwd6IYfbRzy87TFiebrWrphqHI=; b=kRP5LnevWPI7BqqKHbsO05OLHV wRw4bEgYknL/eaRQC8RnKThG9tAQurIuG2IwFdwRiBmGZD9DpdYydTogbubQ6pf49JORlBbPrMPf3 xodq0QsiW92TaBfr2RVNoFDZhbcFu/Trw2jE9DKcdl1evFGxEkPuL+abJ/hyET9LFV4k=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1huoxk-00COE4-HS for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Aug 2019 02:12:34 +0000 Received: from localhost (unknown [104.132.0.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF32720717; Tue, 6 Aug 2019 02:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565057547; bh=a90y+EZY+e5lAWMlP4qUmzP8NCq8B5CEmSwEkT+O3/Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cjs7CVbaPFifamVuh6cwiUxgTlU5rHF5VappgxC985dZ0kwJbqk4vMEv3ry9bhPgq h36Z/ZK2DA5lrhgoM0OmwL7l1IhorTLFB66x1Th1eg2grsZF1zPvniqAyMzVcPUaJq LCVzn+INDMZH7ndN4JOLrswytbcm+sKjw60u/gz0= Date: Mon, 5 Aug 2019 19:12:26 -0700 From: Jaegeuk Kim To: Chao Yu Message-ID: <20190806021226.GC7280@jaegeuk-macbookpro.roam.corp.google.com> References: <20181002020223.76087-1-jaegeuk@kernel.org> <20190806004742.GD98101@jaegeuk-macbookpro.roam.corp.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-Headers-End: 1huoxk-00COE4-HS Subject: Re: [f2fs-dev] [PATCH] fsck.f2fs: don't allocate new blocks on unclean shutdown X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 08/06, Chao Yu wrote: > On 2019/8/6 8:47, Jaegeuk Kim wrote: > > On 08/05, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2018/10/2 10:02, Jaegeuk Kim wrote: > >>> + if (!is_set_ckpt_flags(cp, CP_UMOUNT_FLAG)) { > >>> + c.alloc_failed = 1; > >>> + return -EINVAL; > >>> + } > >> > >> When I test por_fsstress case w/ quota feature enabled, I suffer below error > >> during repair: > >> > >> Info: superblock features = f8 : extra_attr project_quota inode_checksum > >> flexible_inline_xattr quota_ino > >> Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000 > >> Info: total FS sectors = 2097152 (8192 MB) > >> Info: CKPT version = 452b7568 > >> Info: checkpoint state = 846 : quota_need_fsck crc compacted_summary > >> orphan_inodes sudden-power-off > >> [fsck_chk_quota_files:1784] Fixing Quota file ([ 0] ino [0x4]) > >> [ERROR] quotaio_tree.c:83:write_blk:: Cannot write block (7188): Inappropriate > >> ioctl for device > >> [ERROR] quotaio_tree.c:110:get_free_dqblk:: Cannot allocate new quota block (out > >> of disk space). > >> > >> I found new_data_block() will reject block allocation on an unclean umounted > >> image, result in quota file repair failure. > >> > >> With current implementation, I think we should mount that image again for > >> recovery, then umount and run fsck on it again to repair quota file. > > > > Yes. > > > >> > >> However, user didn't be noticed that how to fix this... I know there is no such > >> report tho, I think we'd better fix this case in fsck, any thoughts? let > >> allocation skip fsynced datas? > > > > Actually, that was my TODO, but I had no time to fix it, but had to stop it to > > avoid further corruption. > > Copied, maybe I can help to fix it. It looks it will be easy to skip fsyned > datas during block allocation than porting recovery flow from kernel to tools. Cool, thanks. :) > > Thanks, > > > > >> > >> Thanks, > > . > > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel