From: Jens Axboe <axboe@fb.com>
To: Boaz Harrosh <boaz@plexistor.com>, Christoph Hellwig <hch@infradead.org>
Cc: Tony Luck <tony.luck@gmail.com>,
Matthew Wilcox <willy@linux.intel.com>,
Dmitry Monakhov <dmonakhov@openvz.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [RFC] block: Remove annoying "unknown partition table" message
Date: Tue, 20 Jan 2015 14:50:01 -0700 [thread overview]
Message-ID: <54BECD89.7030404@fb.com> (raw)
In-Reply-To: <54BBD5D7.6000802@plexistor.com>
On 01/18/2015 08:48 AM, Boaz Harrosh wrote:
> On 01/18/2015 05:32 PM, Boaz Harrosh wrote:
>> From: Boaz Harrosh <boaz@plexistor.com>
>>
>> As Christoph put it best:
>> 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.
>>
>> (NOT Yet Tested)
>>
>> CC: Christoph Hellwig <hch@infradead.org>
>> Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
>> ---
>> block/partitions/check.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/block/partitions/check.c b/block/partitions/check.c
>> index 9ac1df7..e3a9077 100644
>> --- a/block/partitions/check.c
>> +++ b/block/partitions/check.c
>> @@ -184,9 +184,7 @@ 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)
>> + if (warn_no_part)
>> strlcat(state->pp_buf, " unable to read partition table\n", PAGE_SIZE);
>>
>> printk(KERN_INFO "%s", state->pp_buf);
>>
>
> Off course that was untested crap something like:
> ---
> 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);
> ---
> Not-Signed-off-yet: Boaz Harrosh <boaz@plexistor.com>
Were you going to send a tested patch with the commit message?
--
Jens Axboe
next prev parent reply other threads:[~2015-01-20 21:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 16:02 [PATCHSET 0/4 v4] brd: partition fixes Boaz Harrosh
2015-01-07 16:04 ` [PATCH 1/4 v4] axonram: Fix bug in direct_access Boaz Harrosh
2015-01-07 16:05 ` [PATCH 2/4 v4] block: Change direct_access calling convention Boaz Harrosh
2015-01-07 16:07 ` [PATCH 3/4 v4] brd: Fix all partitions BUGs Boaz Harrosh
2015-01-16 22:32 ` Tony Luck
2015-01-16 22:49 ` Jens Axboe
2015-01-18 13:08 ` Boaz Harrosh
2015-01-18 15:10 ` Christoph Hellwig
2015-01-18 15:32 ` [RFC] block: Remove annoying "unknown partition table" message Boaz Harrosh
2015-01-18 15:48 ` Boaz Harrosh
2015-01-20 21:50 ` Jens Axboe [this message]
2015-01-22 12:39 ` [PATCH] " Boaz Harrosh
2015-01-22 12:47 ` Boaz Harrosh
2015-01-07 16:09 ` [PATCH 4/4 v4] brd: Request from fdisk 4k alignment Boaz Harrosh
2015-01-08 15:37 ` Martin K. Petersen
2015-01-08 20:56 ` [PATCHSET 0/4 v4] brd: partition fixes Jens Axboe
2015-01-11 9:30 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54BECD89.7030404@fb.com \
--to=axboe@fb.com \
--cc=boaz@plexistor.com \
--cc=dmonakhov@openvz.org \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tony.luck@gmail.com \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).