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=-9.6 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 42AB5C19759 for ; Fri, 2 Aug 2019 02:48:03 +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 106EA20665; Fri, 2 Aug 2019 02:48:02 +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="SxfLfaea"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="MSAXHToL"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZPwYVwgp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 106EA20665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1htNbu-0001Me-Ey; Fri, 02 Aug 2019 02:48:02 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1htNbt-0001MN-8l for linux-f2fs-devel@lists.sourceforge.net; Fri, 02 Aug 2019 02:48:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=VwqKG558nLeKLuEFTGZ1/PZ+IKHuSabqyA67HnHb3os=; b=SxfLfaeaVJWe7It6ap5+cYnSFj EJxH1GsmDMUa5PUidL9Fid1j4kV+35Z5BDxyXqsklEqtI1GUz2S4D90uIrTu1q7UOw9UJm1uf71Fl SFknZQVIK6CbPbvG9yBfbT/cB7vxoA7oE/pGw/xFVWM1t0THw8jVwl0UZoccPLJSwgMU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=VwqKG558nLeKLuEFTGZ1/PZ+IKHuSabqyA67HnHb3os=; b=MSAXHToLgajjt/e7XPAqP5aRwU +gy8tghRR9rVw091Qq9oXekDo72pwnSn1ZI1jmZG/M/yGSBFTBuNY/GexUGrZGlOI1fTUTXwJ33pt ZJekVnw+Sci7kbgsq9GFEacTedMg+9wb/1FEeOBuDsPkv4IPCg7GWc88Ax1Sz7/RpsRk=; Received: from mail-pf1-f193.google.com ([209.85.210.193]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1htNbp-007fIq-Tu for linux-f2fs-devel@lists.sourceforge.net; Fri, 02 Aug 2019 02:48:01 +0000 Received: by mail-pf1-f193.google.com with SMTP id f17so31198664pfn.6 for ; Thu, 01 Aug 2019 19:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VwqKG558nLeKLuEFTGZ1/PZ+IKHuSabqyA67HnHb3os=; b=ZPwYVwgp9vOeecl6hiieQ7v82BbOqVzNtQzCouGOpLR2CutANaasTwqmvNP9bVurk+ gYGbx+zMcjcvp/qty/EqjTf/i0SYzdYsZRU7G+V8ceTLFTYGir3MWyMKxo4bV1KvK/A7 fsKQPgkzU+V+o6STGOGVtBz+rpRGLy1CQNbJ7XzkdcxAq1+g2XfBKMJAxtka2LCVsQx6 x8JSlGm4d1W/IV7Vj1PzB62feouReAGMiQdidBAp/5qJEPeNoD3KNrk5wxBwoaZ3W2gA jNutVAz0mCDYtUDExu8VYzhK2vO22JQV8gScTm0J5k9tdoq6WV6g9wh73D9D6j7H8snW eT0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VwqKG558nLeKLuEFTGZ1/PZ+IKHuSabqyA67HnHb3os=; b=IpSIeb0QXwXQ7gEV8wTfkGpt7BxKH3PLSwulxOooFn4Fx0a2cEUvbpx67DXTRqeBLR xRcjC42dZyUFX/R18oHeieyNmrzEK5OvOK0kiyF12coQA+Vaih9LC3XPJMPENrgwIZHM Zoups1kNPiDL3d6/vsSqCpHcaSwiFrvcr28TSEJhkGJkKm7AFD2+9nc++4zRlwPDZDSM uclXg97fd9zt2n2QebehHq7hi7nukPWgt+73MNna7vhwpPKkozjXkjLpv87H4CNgBluZ 3gK5Nqs7HOd+eYiRdc1cGHID3nrlfltF7OmZU0yzrB+IJUb8uObgfVX1sRsq6emccY10 I3uQ== X-Gm-Message-State: APjAAAVC1Yi9ar+1Uyl9k7yrIY4QLsduaRcYkipFHYIg0r02M6Mh15iY 1R+nK1CsEd9bxGTYSjVbWxrETXZ9 X-Google-Smtp-Source: APXvYqzFR18PJ6RzslwipJixOSKLzeJG0xNZctAGpuPeEBzIJ2fx6xAgze5JQQt+GlF/LnI1AIIYtQ== X-Received: by 2002:a63:de43:: with SMTP id y3mr59582332pgi.211.1564714071797; Thu, 01 Aug 2019 19:47:51 -0700 (PDT) Received: from curare.nss.cs.ubc.ca (coconut.cs.ubc.ca. [198.162.52.139]) by smtp.gmail.com with ESMTPSA id z13sm5643095pjn.32.2019.08.01.19.47.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 19:47:51 -0700 (PDT) From: Surbhi Palande To: linux-f2fs-devel@lists.sourceforge.net Date: Thu, 1 Aug 2019 19:47:48 -0700 Message-Id: <20190802024748.17987-1-f2fsnewbie@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-Headers-End: 1htNbp-007fIq-Tu Subject: [f2fs-dev] [f2fs-tools][PATCH] libf2fs: Throw an error when zone dev info not found 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: Surbhi Palande , Jaegeuk Kim , Damien Le Moal Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Surbhi Palande When the -m option is specified to format a Zoned device, do not fall back to the non-zoned mode in case information about the device is not found. Explicitly specify this error to the user. Signed-off-by: Surbhi Palande --- lib/libf2fs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libf2fs.c b/lib/libf2fs.c index 6b5badf..4966dee 100644 --- a/lib/libf2fs.c +++ b/lib/libf2fs.c @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef HAVE_MNTENT_H #include #endif @@ -1140,7 +1141,11 @@ int f2fs_get_device_info(void) c.segs_per_sec = c.zone_blocks / DEFAULT_BLOCKS_PER_SEGMENT; c.secs_per_zone = 1; } else { - c.zoned_mode = 0; + if(c.zoned_mode != 0) { + MSG(0, "\n Error: %s may not be a zoned block device \n", + c.devices[0].path); + return -1; + } } c.segs_per_zone = c.segs_per_sec * c.secs_per_zone; -- 2.20.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel