Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2534655ybm; Thu, 23 May 2019 19:33:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6Am9Hv29kCCuTjnb672Ygt5tEVUjxcoisGhaXkY8nVj4gcoEJb5qXHuiZAQub+DAw6GjW X-Received: by 2002:a17:902:8210:: with SMTP id x16mr28532399pln.306.1558665235702; Thu, 23 May 2019 19:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558665235; cv=none; d=google.com; s=arc-20160816; b=xL/ceXgOg43/Ncq6MsuBhZujhz81pfck0QFtsvyePshDNnDyylrIrx8iJARdNtA43O uAbkNhIfAENpaEAmPpjDLlqAnl2/8z6DAQjoYsT91vUa9/wbwjW6jWmoSJDhAhF7YcoC HS6yxtnsw0pF6CMZHZot+sTasiUKchKH6XP6dzz5CZ1nr61yyAy0ZGbFERlPJG/91QBw OmASNUlzeNBDMmdNrDSop30h5vV+eozTP5018uo/9E8ko50lC1AL0SUPHCDRz2Wz/Fzg iv4kRDRI67bAFnpLSrAAr4Kqvqx4+QKqbRW4lOTTU3K8MXMtnCQzz0FNanWndQIeAcCK 5PMA== 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:cc:from:references:to:subject; bh=aShFphmsbO96TQ8S5nJe5DouAb6F8B5zt9sErU3jvE0=; b=zpaqFiMzSp7+fy4hL5+lo4CBZ6pmn/k0JxRCSQcd/dXjbKFZgtl9xAIWi7lWCvHL+Y NA/l4YK8jaWMcPIjrLxkGnSJQT+qHoL78oPKgHyhygAr6OOZuJN3VBg7PLCXYdNr52Ag M4nS/HxIGTWQD95hp5rtVmloOr7ee6pZeXWOdYDXMB0nTWo8rtSqCMZ5U+4tvPYQOra/ 9jr+IV5U3yfpMMEVAarIKKLn9lSV4AaN7dDkfqSI3bgdx63k2g/AJLJWeVY3iSj0yoh7 TEEZFbU0CcLyG2KW/KmaD/TwQgpCSX2VJBz4sbuoS8yat9bIm7KX0MBO0qYCPRrRQ4s4 IJ+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d124si2350029pfd.29.2019.05.23.19.33.36; Thu, 23 May 2019 19:33:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731816AbfEXCbr (ORCPT + 99 others); Thu, 23 May 2019 22:31:47 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:6535 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731604AbfEXCbr (ORCPT ); Thu, 23 May 2019 22:31:47 -0400 Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 08CDACD0FCDCB345E1F8; Fri, 24 May 2019 10:31:45 +0800 (CST) Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by DGGEMM405-HUB.china.huawei.com (10.3.20.213) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 May 2019 10:31:44 +0800 Received: from [10.134.22.195] (10.134.22.195) by dggeme763-chm.china.huawei.com (10.3.19.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 24 May 2019 10:31:43 +0800 Subject: Re: [PATCH v6 1/1] f2fs: ioctl for removing a range from F2FS To: sunqiuyang , , , References: <20190524015555.12622-1-sunqiuyang@huawei.com> From: Chao Yu CC: Sahitya Tummala Message-ID: Date: Fri, 24 May 2019 10:32:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190524015555.12622-1-sunqiuyang@huawei.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-ClientProxiedBy: dggeme718-chm.china.huawei.com (10.1.199.114) To dggeme763-chm.china.huawei.com (10.3.19.109) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Cc Sahitya, On 2019/5/24 9:55, sunqiuyang wrote: > From: Qiuyang Sun > > This ioctl shrinks a given length (aligned to sections) from end of the > main area. Any cursegs and valid blocks will be moved out before > invalidating the range. > > This feature can be used for adjusting partition sizes online. > -- > Changlog v1 ==> v2: > > Sahitya Tummala: > - Add this ioctl for f2fs_compat_ioctl() as well. > - Fix debugfs status to reflect the online resize changes. > - Fix potential race between online resize path and allocate new data > block path or gc path. > > Others: > - Rename some identifiers. > - Add some error handling branches. > - Clear sbi->next_victim_seg[BG_GC/FG_GC] in shrinking range. > -- > Changelog v2 ==> v3: > Implement this interface as ext4's, and change the parameter from shrunk > bytes to new block count of F2FS. > -- > Changelog v3 ==> v4: > - During resizing, force to empty sit_journal and forbid adding new > entries to it, in order to avoid invalid segno in journal after resize. > - Reduce sbi->user_block_count before resize starts. > - Commit the updated superblock first, and then update in-memory metadata > only when the former succeeds. > - Target block count must align to sections. > -- > Changelog v4 ==> v5: > Write checkpoint before and after committing the new superblock, w/o > CP_FSCK_FLAG respectively, so that the FS can be fixed by fsck even if > resize fails after the new superblock is committed. > -- > Changelog v5 ==> v6: > - In free_segment_range(), reduce granularity of gc_mutex. > - Add protection on curseg migration. > > Signed-off-by: Qiuyang Sun > Signed-off-by: Chao Yu > Signed-off-by: Sahitya Tummala Looks good to me now, Reviewed-by: Chao Yu To Sahitya, is it okay to you merging all your fixes and adding Signed-off in original patch? We can still separate them from this patch if you object this, let us know. Thanks,