public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Hunt <johunt@akamai.com>
To: "jaxboe@fusionio.com" <jaxboe@fusionio.com>
Cc: Josh Hunt <johunt@akamai.com>,
	"kay.sievers@vrfy.org" <kay.sievers@vrfy.org>,
	"tj@kernel.org" <tj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] block: Restore /proc/partitions to not display non-partitionable removable devices
Date: Tue, 27 Nov 2012 09:58:33 -0600	[thread overview]
Message-ID: <50B4E329.7020502@akamai.com> (raw)
In-Reply-To: <1353380209-23799-1-git-send-email-johunt@akamai.com>

ping?

On 11/19/2012 08:56 PM, Josh Hunt wrote:
> We found with newer kernels we started seeing the cdrom device showing
> up in /proc/partitions, but it was not there before. Looking into this I found
> that commit d27769ec... block: add GENHD_FL_NO_PART_SCAN introduces this change
> in behavior. It's not clear to me from the commit's changelog if this change was
> intentional or not. This comment still remains:
> /* Don't show non-partitionable removeable devices or empty devices */
> so I've decided to send a patch to restore the behavior of not printing
> unpartitionable removable devices.
>
> Thanks
> Josh
> ---
>
> After commit d27769ec... block: add GENHD_FL_NO_PART_SCAN, /proc/partitions
> started printing removable devices with only one partition. This is different
> than prior to the commit. This restores /proc/partitions to behave as it did before.
>
> Signed-off-by: Josh Hunt <johunt@akamai.com>
> ---
>   block/genhd.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 6cace66..6bfeb2a 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -851,7 +851,7 @@ static int show_partition(struct seq_file *seqf, void *v)
>   	char buf[BDEVNAME_SIZE];
>
>   	/* Don't show non-partitionable removeable devices or empty devices */
> -	if (!get_capacity(sgp) || (!disk_max_parts(sgp) &&
> +	if (!get_capacity(sgp) || (!(disk_max_parts(sgp) > 1) &&
>   				   (sgp->flags & GENHD_FL_REMOVABLE)))
>   		return 0;
>   	if (sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)
>

  reply	other threads:[~2012-11-27 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20  2:56 [PATCH] block: Restore /proc/partitions to not display non-partitionable removable devices Josh Hunt
2012-11-27 15:58 ` Josh Hunt [this message]
2012-12-04  0:06 ` Andrew Morton
2012-12-04  0:40   ` Josh Hunt
2012-12-04  0:54     ` Andrew Morton

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=50B4E329.7020502@akamai.com \
    --to=johunt@akamai.com \
    --cc=jaxboe@fusionio.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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