Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp556463ybl; Wed, 8 Jan 2020 01:53:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxDtAVcrAVetDn39qLNdZGLm7M346SGjNpSAw0qM7vICSC6mYgbBREfSNOXwLKOhjPCyZKb X-Received: by 2002:a05:6808:30d:: with SMTP id i13mr2253359oie.144.1578477228471; Wed, 08 Jan 2020 01:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578477228; cv=none; d=google.com; s=arc-20160816; b=Bg+6ToDd3kn5aUkqge03oAZVCEaIi4xVx5KsaVmjoFIgIVypeDYYVUVrzW4TYApA3S s+XiIAjNJXIHo52cK2S1c9v0m0+IGFHSoiBJwFoqupITaC1V05SCDAqh9XH5CA6f3rG7 3gnTS2Bf2ArpFm99YRWaIA9KkpGUoPW1UZVmfpcmR6TzCa2p+920jv3nXtdSng1OyJee 8vWaQ5fXyPp9YYUyHKuC0g6OGajy47PDkar8tfNtFk8OpFTO2iYRHRCXAmC+3YVcWxVP 9xIygFg7e/tWUJ6lhyOx7hhbCsaxFPXK4mJr037qbaTuq0zcifMw2s673HgyMzkClApO WR7g== 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=UdfnUKV8GEPVho7FkEM0EiDyJ8Cns0mvBKHhVItfELA=; b=M0oNkAIbG6IIvLU304TnupGJ2L5OZCj/aZL8fdXIiBihkhIqWryEbciuUSXV7u6uVY uXqgVCSQfTPWzm0/ABnmNCj8gzhCeeYJXQnPnBnxkcG8THfrn4YNroep8Yf5X17FSXgG NhTalgHD+L/WONl5mkekSKlYtcNrQCTRSgHiUo7PCC73JhZf/soVvGWioI84v7hPbju6 EVl7+NtUMki4femFH7MBQr7kAbi1uWYaSV49n3FN+hsHtBQGJjNuIcP19Pc1fwcGtkuv gBkBVVOjkMy4tn0ncv6JewJg8psxijs6lpzuRZ2h5jDszZQZ6hm2EN7iw9u9cM0HZCtH l6Rg== 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 e24si1382149otl.62.2020.01.08.01.53.36; Wed, 08 Jan 2020 01:53:48 -0800 (PST) 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 S1727436AbgAHIwm (ORCPT + 99 others); Wed, 8 Jan 2020 03:52:42 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9124 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726481AbgAHIwm (ORCPT ); Wed, 8 Jan 2020 03:52:42 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A6AEBACE85B0BE60A8FB; Wed, 8 Jan 2020 16:52:39 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jan 2020 16:52:36 +0800 Subject: Re: [f2fs-dev] Multidevice f2fs mount after disk rearrangement To: Oleksandr Natalenko , Jaegeuk Kim CC: , References: <4c6cf8418236145f7124ac61eb2908ad@natalenko.name> <2c4cafd35d1595a62134203669d7c244@natalenko.name> <20200106183450.GC50058@jaegeuk-macbookpro.roam.corp.google.com> From: Chao Yu Message-ID: <815fbd14-0fbd-9c44-8d86-4ab13a12dc7f@huawei.com> Date: Wed, 8 Jan 2020 16:52:35 +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: Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/1/7 2:40, Oleksandr Natalenko via Linux-f2fs-devel wrote: > Hi. > > On 06.01.2020 19:34, Jaegeuk Kim wrote: >> Thank you for investigating this ahead of me. :) Yes, the device list >> is stored >> in superblock, so hacking it manually should work. >> >> Let me think about a tool to tune that. > > Thank you both for the replies. > > IIUC, tune.f2fs is not there yet. I saw a submission, but I do not see > it as accepted, right? > > Having this in tune.f2fs would be fine (assuming the assertion is > replaced with some meaningful hint message), but wouldn't it be more > convenient for an ordinary user to have implemented something like: > > # mount -t f2fs /dev/sdb -o nextdev=/dev/sdc /mnt/fs Hmm... sounds reasonable, however, the risk is obvious, if we mount with wrong primary device, filesystem can be aware that with metadata sanity check, if we mount with wrong secondary/... devices by mistake (or intentionally, people may think filesystem should be aware illegal parameters....), filesystem won't be aware of that, then metadata/data will be inconsistent... Although that may also happen when we use tunesb.f2fs, but fsck.f2fs can be followed to verify the modification of tunesb.f2fs, that would be much safer. So I suggest we can do that in tools first, maybe implement nextdev mount option if we have added metadata in secondary/... device. Thanks, > > Hm? >