All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: yanmin_zhang@linux.intel.com, jens.axboe@oracle.com, rjw@sisk.pl,
	tj@kernel.org, yanmin.zhang@linux.intel.com
Subject: + genhd-register-the-block_ext_major-blockdev.patch added to -mm tree
Date: Tue, 18 Nov 2008 14:02:37 -0800	[thread overview]
Message-ID: <200811182202.mAIM2bsS012327@imap1.linux-foundation.org> (raw)


The patch titled
     genhd: register the BLOCK_EXT_MAJOR blockdev
has been added to the -mm tree.  Its filename is
     genhd-register-the-block_ext_major-blockdev.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: genhd: register the BLOCK_EXT_MAJOR blockdev
From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>

We run into system boot failure with kernel 2.6.28-rc.  We found it on a
couple of machines, including T61 notebook, nehalem machine, and another
HPC NX6325 notebook.  All the machines use FedoraCore 8 or FedoraCore 9. 
With kernel prior to 2.6.28-rc, system boot doesn't fail.

I debug it and locate the root cause.  See
http://bugzilla.kernel.org/show_bug.cgi?id=11899
https://bugzilla.redhat.com/show_bug.cgi?id=471517

As a matter of fact, there are 2 bugs.

1) root=/dev/sda1, system boot randomly fails.  Mostly, boot for 5
   times and fails once.  nash has a bug.  Some of its functions misuse
   return value 0.  Sometimes, 0 means timeout and no uevent available. 
   Sometimes, 0 means nash gets an uevent, but the uevent isn't
   block-related (for exmaple, usb).  If by coincidence, kernel tells nash
   that uevents are available, but kernel also set timeout, nash might
   stops collecting other uevents in queue if current uevent isn't
   block-related.

   I work out a patch for nash to fix it. 
   http://bugzilla.kernel.org/attachment.cgi?id=18858

2) root=LABEL=/, system always can't boot.  initrd init reports
   switchroot fails.  Here is an executation branch of nash when booting:

    (1) nash read /sys/block/sda/dev; Assume major is 8 (on my desktop)

    (2) nash query /proc/devices with the major number; It found line  "8 sd";

    (3) nash use 'sd' to search its own probe table to find device
        (DISK) type for the device and add it to its own list;

    (4) Later on, it probes all devices in its list to get
        filesystem labels; scsi register "8 sd" always.

When major is 259, nash fails to find the device(DISK) type.  I enables
CONFIG_DEBUG_BLOCK_EXT_DEVT=y when compiling kernel, so 259 is picked up
for device /dev/sda1, which causes nash to fail to find device (DISK)
type.  To fixing issue 2), I create a patch for nash and another patch for
kernel.

http://bugzilla.kernel.org/attachment.cgi?id=18859
http://bugzilla.kernel.org/attachment.cgi?id=18837

This patch registers blkext, a new block device in proc/devices.

With 2 patches on nash and 1 patch on kernel, I boot my machines for
dozens of times without failure.

Signed-off-by Zhang Yanmin <yanmin.zhang@linux.intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 block/genhd.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN block/genhd.c~genhd-register-the-block_ext_major-blockdev block/genhd.c
--- a/block/genhd.c~genhd-register-the-block_ext_major-blockdev
+++ a/block/genhd.c
@@ -1028,6 +1028,7 @@ static int __init proc_genhd_init(void)
 {
 	proc_create("diskstats", 0, NULL, &proc_diskstats_operations);
 	proc_create("partitions", 0, NULL, &proc_partitions_operations);
+	register_blkdev(BLOCK_EXT_MAJOR, "blkext");
 	return 0;
 }
 module_init(proc_genhd_init);
_

Patches currently in -mm which might be from yanmin_zhang@linux.intel.com are

genhd-register-the-block_ext_major-blockdev.patch


                 reply	other threads:[~2008-11-18 22:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200811182202.mAIM2bsS012327@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=tj@kernel.org \
    --cc=yanmin.zhang@linux.intel.com \
    --cc=yanmin_zhang@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 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.