From patchwork Thu Jan 22 12:39:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 5684621 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 81E1CC058E for ; Thu, 22 Jan 2015 12:39:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A72C2034B for ; Thu, 22 Jan 2015 12:39:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6419D2035B for ; Thu, 22 Jan 2015 12:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbbAVMjZ (ORCPT ); Thu, 22 Jan 2015 07:39:25 -0500 Received: from mail-we0-f176.google.com ([74.125.82.176]:55472 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751737AbbAVMjX (ORCPT ); Thu, 22 Jan 2015 07:39:23 -0500 Received: by mail-we0-f176.google.com with SMTP id w62so1507310wes.7 for ; Thu, 22 Jan 2015 04:39:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=jSXcFwOji3qiC6CvkYMBHJP5v+IgkPy+k+Yc/zc4uws=; b=khtaRC1ShCRpX1TdsTSSoAuiLnl9n2BWexVKFmDtTEhvKF2G60ZJ4mOY7S7VywLubc /TsEFuPmQWFrbddr0KTLJj9L2C/bUaNYTL+zgKqRPfa6IwxbvjqRGRueek4/qJnHko6Y gJ14IqmdZ3848UJYARIky4j3BsSsjsq8M2QZdrYPmvN2uxOU30m7JT7gL3EVqtqYXDcK YVdzD83UVpk2ZAULuwNv+SesqiphLUnZyOXYlvjVGiC0Tf+xxz0Ji4IV/L+j6KDKPI2U OjpkUiUNg35oaNPBNWvoA9fcbh+mwAZQ+oCOCjEQlqG9JgdDGBYYfgL6y5Tk5lrIP6nq c6OA== X-Gm-Message-State: ALoCoQmYqxKSefN9K4CPj22t1m2jjTxVNZRfm9DUzdzKUuXO9jKG2HNs0jim6fW7HnSiguHz3Ddp X-Received: by 10.180.89.41 with SMTP id bl9mr458263wib.75.1421930362127; Thu, 22 Jan 2015 04:39:22 -0800 (PST) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id d7sm3845176wjs.2.2015.01.22.04.39.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 04:39:21 -0800 (PST) Message-ID: <54C0EF78.4030203@plexistor.com> Date: Thu, 22 Jan 2015 14:39:20 +0200 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Jens Axboe , Christoph Hellwig CC: Tony Luck , Matthew Wilcox , Dmitry Monakhov , linux-kernel , linux-fsdevel , "Martin K. Petersen" Subject: [PATCH] block: Remove annoying "unknown partition table" message References: <54AD5893.9040701@plexistor.com> <54AD59DC.4020703@plexistor.com> <54B99591.7080007@fb.com> <54BBB048.7010207@plexistor.com> <20150118151059.GA17263@infradead.org> <54BBD225.3080200@plexistor.com> <54BBD5D7.6000802@plexistor.com> <54BECD89.7030404@fb.com> In-Reply-To: <54BECD89.7030404@fb.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Boaz Harrosh As Christoph put it: Can we just get rid of the warnings? It's fairly annoying as devices without partitions are perfectly fine and very useful. Me too I see this message every VM boot for ages on all my devices. Would love to just remove it. For me a partition-table is only needed for a booting BIOS, grub, and stuff. CC: Christoph Hellwig Signed-off-by: Boaz Harrosh --- block/partitions/check.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/partitions/check.c b/block/partitions/check.c index 9ac1df7..16118d1 100644 --- a/block/partitions/check.c +++ b/block/partitions/check.c @@ -184,12 +184,12 @@ check_partition(struct gendisk *hd, struct block_device *bdev) if (err) /* The partition is unrecognized. So report I/O errors if there were any */ res = err; - if (!res) - strlcat(state->pp_buf, " unknown partition table\n", PAGE_SIZE); - else if (warn_no_part) - strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE); - - printk(KERN_INFO "%s", state->pp_buf); + if (res) { + if (warn_no_part) + strlcat(state->pp_buf, + " unable to read partition table\n", PAGE_SIZE); + printk(KERN_INFO "%s", state->pp_buf); + } free_page((unsigned long)state->pp_buf); free_partitions(state);