CINXE.COM

LKML: "Randy.Dunlap": Re: Empty partition nodes not created (was device node issues with recent mm's and udev)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>LKML: "Randy.Dunlap": Re: Empty partition nodes not created (was device node issues with recent mm's and udev)</title><link href="/css/message.css" rel="stylesheet" type="text/css" /><link href="/css/wrap.css" rel="alternate stylesheet" type="text/css" title="wrap" /><link href="/css/nowrap.css" rel="stylesheet" type="text/css" title="nowrap" /><link href="/favicon.ico" rel="shortcut icon" /><script src="/js/simple-calendar.js" type="text/javascript"></script><script src="/js/styleswitcher.js" type="text/javascript"></script><link rel="alternate" type="application/rss+xml" title="lkml.org : last 100 messages" href="/rss.php" /><link rel="alternate" type="application/rss+xml" title="lkml.org : last messages by &quot;Randy.Dunlap&quot;" href="/groupie.php?aid=1262" /><!--Matomo--><script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setDoNotTrack", true]); _paq.push(["disableCookies"]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//m.lkml.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script><!--End Matomo Code--></head><body onload="es.jasper.simpleCalendar.init();" itemscope="itemscope" itemtype="http://schema.org/BlogPosting"><table border="0" cellpadding="0" cellspacing="0"><tr><td width="180" align="center"><a href="/"><img style="border:0;width:135px;height:32px" src="/images/toprowlk.gif" alt="lkml.org" /></a></td><td width="32">聽</td><td class="nb"><div><a class="nb" href="/lkml"> [lkml]</a> 聽 <a class="nb" href="/lkml/2005"> [2005]</a> 聽 <a class="nb" href="/lkml/2005/5"> [May]</a> 聽 <a class="nb" href="/lkml/2005/5/3"> [3]</a> 聽 <a class="nb" href="/lkml/last100"> [last100]</a> 聽 <a href="/rss.php"><img src="/images/rss-or.gif" border="0" alt="RSS Feed" /></a></div><div>Views: <a href="#" class="nowrap" onclick="setActiveStyleSheet('wrap');return false;">[wrap]</a><a href="#" class="wrap" onclick="setActiveStyleSheet('nowrap');return false;">[no wrap]</a> 聽 <a class="nb" href="/lkml/mheaders/2005/5/3/8" onclick="this.href='/lkml/headers'+'/2005/5/3/8';">[headers]</a>聽 <a href="/lkml/bounce/2005/5/3/8">[forward]</a>聽 </div></td><td width="32">聽</td></tr><tr><td valign="top"><div class="es-jasper-simpleCalendar" baseurl="/lkml/"></div><div class="threadlist">Messages in this thread</div><ul class="threadlist"><li class="root"><a href="/lkml/2005/5/2/205">First message in thread</a></li><li><a href="/lkml/2005/5/2/212">"Randy.Dunlap"</a><ul><li><a href="/lkml/2005/5/3/3">Joe</a><ul><li class="origin"><a href="">"Randy.Dunlap"</a></li><li><a href="/lkml/2005/5/6/18">Andries Brouwer</a><ul><li><a href="/lkml/2005/5/6/75">Bryan Henderson</a></li></ul></li></ul></li><li><a href="/lkml/2005/5/3/29">Paulo Marques</a><ul><li><a href="/lkml/2005/5/3/186">Joe</a></li></ul></li><li><a href="/lkml/2005/5/6/16">Andries Brouwer</a><ul><li><a href="/lkml/2005/5/6/19">Chris Wright</a><ul><li><a href="/lkml/2005/5/6/23">Andries Brouwer</a><ul><li><a href="/lkml/2005/5/6/26">Andrew Morton</a></li></ul></li><li><a href="/lkml/2005/5/6/71">Greg KH</a></li></ul></li></ul></li></ul></li></ul><div class="threadlist">Patch in this message</div><ul class="threadlist"><li><a href="/lkml/diff/2005/5/3/8/1">Get diff 1</a></li></ul></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerl.gif" width="32" height="32" alt="/" /></td><td class="c" rowspan="2" valign="top" style="padding-top: 1em"><table><tr><td><table><tr><td class="lp">Date</td><td class="rp" itemprop="datePublished">Mon, 2 May 2005 22:16:07 -0700</td></tr><tr><td class="lp">From</td><td class="rp" itemprop="author">"Randy.Dunlap" &lt;&gt;</td></tr><tr><td class="lp">Subject</td><td class="rp" itemprop="name">Re: Empty partition nodes not created (was device node issues with recent mm's and udev)</td></tr></table></td><td></td></tr></table><pre itemprop="articleBody">On Tue, 3 May 2005 00:18:05 -0400 Joe wrote:<br /><br />| On 5/2/05, Randy.Dunlap &lt;rddunlap&#64;osdl.org&gt; wrote:<br />| &gt; Could this 2.6.11.8 -stable patch fix it?<br />| &gt; Subject: [04/07] partitions/msdos.c fix<br />| &gt; <br />| &gt; Joe, can you test 2.6.11.8, please?<br />| &gt; <br />| &gt; ---<br />| &gt; ~Randy<br />| &gt; <br />| <br />| Randy, Can't run vanilla at the moment on this setup, any way you can<br />| get the patch seperate? I also don't think that will fix it because<br />| this is an empty, not a msdos partition.<br /><br />Yeah, I could be way off on this. Anyway, the patch is below.<br /><br />---<br />~Randy<br /><br /><br /><br />------------------<br /><br />Erik reports this fixes an oops on boot for him.<br /><br />From: Andries Brouwer &lt;Andries.Brouwer&#64;cwi.nl&gt;<br /><br />A well-known kernel bug is that it guesses at the partition type and the<br />partitions on any disk it encounters. This is bad because needless I/O is<br />done, slowing down the boot, sometimes quite a lot, especially when I/O<br />errors occur. And it is bad because sometimes we guess wrong.<br /><br />In other words, we need the user space command `partition', where<br />"partition -t dos /dev/sda" reads a DOS-type partition table. (And<br />"partition /dev/sda" tries all known heuristics to decide what type of<br />partitioning might be present.) The two variants are: (i) partition tells<br />the kernel to do the partition table reading, and (ii) partition uses partx<br />to read the partition table and tells the kernel one-by-one about the<br />partitions found this way.<br /><br />Since this is a fundamental change, a long transition period is needed, and<br />that period could start with a kernel boot parameter telling the kernel not<br />to do partition table parsing on a particular disk, or a particular type of<br />disks, or all disks.<br /><br />This could have been the intro to a patch doing that, but is not. (It is<br />just an RFC.)<br /><br />The tiny patch below prompted the above - it was suggested by Uwe Bonnes<br />who encountered USB devices without partition table where our present<br />heuristics did not suffice to stop partition table parsing. It causes the<br />kernel to ignore partitions of type 0. A band-aid.<br /><br />I think nobody uses such partitions seriously, but nevertheless this should<br />probably live in -mm for a while to see if anybody complains.<br /><br />Signed-off-by: Andrew Morton &lt;akpm&#64;osdl.org&gt;<br />Signed-off-by: Linus Torvalds &lt;torvalds&#64;osdl.org&gt;<br />Signed-off-by: Chris Wright &lt;chrisw&#64;osdl.org&gt;<br />Signed-off-by: Greg Kroah-Hartman &lt;gregkh&#64;suse.de&gt;<br />---<br /><br />===== fs/partitions/msdos.c 1.26 vs 1.27 =====<br />--- 1.26/fs/partitions/msdos.c 2004-11-09 12:43:17 -08:00<br />+++ 1.27/fs/partitions/msdos.c 2005-03-07 20:41:42 -08:00<br />&#64;&#64; -114,6 +114,9 &#64;&#64; parse_extended(struct parsed_partitions <br /> */<br /> for (i=0; i&lt;4; i++, p++) {<br /> u32 offs, size, next;<br />+<br />+ if (SYS_IND(p) == 0)<br />+ continue;<br /> if (!NR_SECTS(p) || is_extended_partition(p))<br /> continue;<br /> <br />&#64;&#64; -430,6 +433,8 &#64;&#64; int msdos_partition(struct parsed_partit<br /> for (slot = 1 ; slot &lt;= 4 ; slot++, p++) {<br /> u32 start = START_SECT(p)*sector_size;<br /> u32 size = NR_SECTS(p)*sector_size;<br />+ if (SYS_IND(p) == 0)<br />+ continue;<br /> if (!size)<br /> continue;<br /> if (is_extended_partition(p)) {<br />-<br />-<br />To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br />the body of a message to majordomo&#64;vger.kernel.org<br />More majordomo info at <a href="http://vger.kernel.org/majordomo-info.html">http://vger.kernel.org/majordomo-info.html</a><br />Please read the FAQ at <a href="http://www.tux.org/lkml/">http://www.tux.org/lkml/</a><br /></pre></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerr.gif" width="32" height="32" alt="\" /></td></tr><tr><td align="right" valign="bottom"> 聽 </td></tr><tr><td align="right" valign="bottom">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerl.gif" width="32" height="32" alt="\" /></td><td class="c">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerr.gif" width="32" height="32" alt="/" /></td></tr><tr><td align="right" valign="top" colspan="2"> 聽 </td><td class="lm">Last update: 2005-05-03 07:20 聽聽 [from the cache]<br />漏2003-2020 <a href="http://blog.jasper.es/"><span itemprop="editor">Jasper Spaans</span></a>|hosted at <a href="https://www.digitalocean.com/?refcode=9a8e99d24cf9">Digital Ocean</a> and my Meterkast|<a href="http://blog.jasper.es/categories.html#lkml-ref">Read the blog</a></td><td>聽</td></tr></table><script language="javascript" src="/js/styleswitcher.js" type="text/javascript"></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10