Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2051851imm; Mon, 28 May 2018 00:12:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrTQf2w7QplhWDrADxHSwVMmWDT+qCcbCN5BT3KViPdiqxB2EWYWAXo2ivDWq1isBVJUPPJ X-Received: by 2002:a63:7741:: with SMTP id s62-v6mr9817987pgc.103.1527491556894; Mon, 28 May 2018 00:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527491556; cv=none; d=google.com; s=arc-20160816; b=pHo0WUNos/4mgzQxPPSXKvMij22h730jwBhJmCLEqgJZOOoyZ+9i+f3tyOO+FJEPey E63InYSGaMvTlrgfh2ChJJPqx/kXJH9BezA7Nn0XBGFOFc1TWF+afSf45HiiSszoZkBa PsBPBCdRxaWEKKvVl5H5hFqVJHHG6XirrU+RI4hDUL/SRspwZQOQExxwV8p1HRhHwx3J 830Zmx3h2JKZ/hQjvSu89ibKU9wjne96oa//0yJZwH5UZq+Sb4JIKVJR4KsrMrdkE6xj hgMLgWEDxUwDzykwn7X3vCSOe9ZJsXxHiAIp68c0OkyMtDI6lt6yfITLcrRVVtaDr0xK 88ZQ== 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:arc-authentication-results; bh=OmbAHbZTFlfjLBmMJYEpIzNnCq0nOGXpl2l7mhtujXc=; b=fiUh+fH9W1sfTA+6+9EmuMsOmMVRyEewz8SDSS+Q8wjp7u2MmOUWxYz4tH66lEnSJN VZZu/GXfVeqbRfSr2fB+Hxpn31eKI5MwFoSrRZNJHALqhGmYex0PiHeoO2o9VOj017CL QWcipMOsDdYC6k6OjIThQ5UEaBv4LUzQxxmEGHfTb1UfZ/vrYIVhQQUY9RSAmrPF5KCp 2u8TzqDPQB8ZaP6/TRkUTaCLOf9YhEeXH8nSRFzkRgyiZytoJXW9DlrQdms8ECNQYpMi MTCl1H0wlXFBInlyuY4faSUmytce/hXrD3AkFBkH6BHk/kD6GQmAXoGdH26hzPPIOMan dOWQ== 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 f5-v6si29319138pfb.314.2018.05.28.00.12.22; Mon, 28 May 2018 00:12:36 -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 S1753977AbeE1HMP (ORCPT + 99 others); Mon, 28 May 2018 03:12:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33926 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753786AbeE1HMI (ORCPT ); Mon, 28 May 2018 03:12:08 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6994479B5A071; Mon, 28 May 2018 15:12:03 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.382.0; Mon, 28 May 2018 15:11:54 +0800 Subject: Re: [PATCH v2] f2fs-tools: fix to match with the start_sector To: Yunlong Song , , , CC: , , , , , References: <1525425645-127945-1-git-send-email-yunlong.song@huawei.com> <1525659336-145433-1-git-send-email-yunlong.song@huawei.com> From: Chao Yu Message-ID: Date: Mon, 28 May 2018 15:11:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1525659336-145433-1-git-send-email-yunlong.song@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-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/5/7 10:15, Yunlong Song wrote: > f2fs-tools uses ioctl BLKSSZGET to get sector_size, however, this ioctl > will return a value which may be larger than 512 (according to the value > of q->limits.logical_block_size), then this will be inconsistent with > the start_sector, since start_sector is got from ioctl HDIO_GETGEO and > is always in 512 size unit for a sector. To fix this problem, just > change the sector_size to the default value when computing with > start_sector. And fix sectors_per_blk as well. > > Signed-off-by: Yunlong Song Reviewed-by: Chao Yu Thanks,