All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <boaz@plexistor.com>
To: Jens Axboe <axboe@fb.com>, Dave Chinner <david@fromorbit.com>
Cc: Brian Foster <bfoster@redhat.com>,
	fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH] brd: Re-instate ram disk visibility option (part_show)
Date: Thu, 26 Feb 2015 10:14:46 +0200	[thread overview]
Message-ID: <54EED5F6.2030804@plexistor.com> (raw)
In-Reply-To: <20150225223248.GH4251@dastard>


This re-enables part_show option, so we can keep it false by
default.

Here is what Dmitry said in the original patch:
  [aeac318] brd: add ram disk visibility option
	Currently ram disk is not visible inside /proc/partitions.
	This was done for compatibility reasons here: 53978d0a7a27.
	But some utilities expect disk presents in /proc/partitions.
	Let's add module's option and let's administrator chose
	visibility behavior. By default, old behavior preserved.

Dave Chinner and other have reported problems with current system
when udev events start firing for ramdisk:
	http://marc.info/?l=linux-fsdevel&m=142490357918672&w=2

It was me who enabled these notifications through this patch:
   [937af5e] brd: Fix all partitions BUGs
Sorry for the mess.

CC: Dave Chinner <david@fromorbit.com>
CC: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
---
 drivers/block/brd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 64ab495..6e0775b 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -450,6 +450,10 @@ static int max_part = 1;
 module_param(max_part, int, S_IRUGO);
 MODULE_PARM_DESC(max_part, "Num Minors to reserve between devices");
 
+static int part_show = 0;
+module_param(part_show, int, S_IRUGO);
+MODULE_PARM_DESC(part_show, "Control RAM disk visibility in /proc/partitions");
+
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
 MODULE_ALIAS("rd");
@@ -513,6 +517,8 @@ static struct brd_device *brd_alloc(int i)
 	disk->private_data	= brd;
 	disk->queue		= brd->brd_queue;
 	disk->flags		= GENHD_FL_EXT_DEVT;
+	if (!part_show)
+		disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
 	sprintf(disk->disk_name, "ram%d", i);
 	set_capacity(disk, rd_size * 2);
 
-- 
1.9.3


  parent reply	other threads:[~2015-02-26  8:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 22:54 [PATCH v2 0/4] fstests: sector size fixes and whiteouts Dave Chinner
2015-02-24 22:54 ` [PATCH 1/4] xfs/104: log size too small for 4k sector drives Dave Chinner
2015-02-25 16:11   ` Brian Foster
2015-02-25 22:32     ` ramdisk problems in 4.0-rc1? (was Re: [PATCH 1/4] xfs/104: log size too small for 4k sector drives) Dave Chinner
2015-02-25 23:31       ` Brian Foster
2015-02-25 23:43         ` Dave Chinner
2015-02-26  7:46           ` Boaz Harrosh
2015-02-26 17:23             ` Brian Foster
2015-03-01  8:49               ` Boaz Harrosh
2015-03-01 14:28                 ` Brian Foster
2015-02-27  0:58             ` Dave Chinner
2015-03-01  8:27               ` Boaz Harrosh
2015-03-02  1:09                 ` Dave Chinner
2015-03-02  9:40                   ` Boaz Harrosh
2015-02-26  8:14       ` Boaz Harrosh [this message]
2015-02-26  8:41         ` [PATCH] brd: Only request 4K sectors if DAX is enabled Boaz Harrosh
2015-02-26  8:48           ` Boaz Harrosh
2015-02-27  0:23           ` Dave Chinner
2015-03-01  8:30             ` Boaz Harrosh
2015-02-24 22:54 ` [PATCH 2/4] xfs: don't output mkfs sector sizes into golden output Dave Chinner
2015-02-27 18:56   ` Brian Foster
2015-02-24 22:54 ` [PATCH 3/4] xfs/049: umount -d fails when kernel wins teardown race Dave Chinner
2015-02-27 18:56   ` Brian Foster
2015-02-24 22:54 ` [PATCH 4/4] generic: Add rudimetary RENAME_WHITEOUT test Dave Chinner
2015-02-27 18:57   ` Brian Foster

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=54EED5F6.2030804@plexistor.com \
    --to=boaz@plexistor.com \
    --cc=axboe@fb.com \
    --cc=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-fsdevel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.