LWN: Comments on "A simple block driver" https://lwn.net/Articles/58719/ This is a special feed containing comments posted to the individual LWN article titled "A simple block driver". en-us Fri, 26 Sep 2025 09:12:43 +0000 Fri, 26 Sep 2025 09:12:43 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net A simple block driver https://lwn.net/Articles/386083/ https://lwn.net/Articles/386083/ metadaddy I just ported the simple block driver to 2.6.31 - see <a rel="nofollow" href="http://blog.superpat.com/2010/05/04/a-simple-block-driver-for-linux-kernel-2-6-31/">A Simple Block Driver for Linux Kernel 2.6.31</a> Tue, 04 May 2010 16:08:28 +0000 -ENOTTY ? https://lwn.net/Articles/295353/ https://lwn.net/Articles/295353/ strcmp because it's the documented behaviour we have to implement here. the man page ioctl(2) says: <pre> ENOTTY The specified request does not apply to the kind of object that the descriptor d references. </pre> Mon, 25 Aug 2008 13:07:39 +0000 sdb_init() - Queue removal on error https://lwn.net/Articles/257391/ https://lwn.net/Articles/257391/ bigguiness <div class="FormattedComment"><pre> Just a minor comment/question. In the sbd_init() function, if the register_blkdev() call fails shouldn't the Queue be removed (blk_cleanup_queue(Queue);) before the function exits? </pre></div> Tue, 06 Nov 2007 16:54:01 +0000 insmod sbd.ko error ?? https://lwn.net/Articles/256979/ https://lwn.net/Articles/256979/ rbartlett <div class="FormattedComment"><pre> The "sbd0: unknown partition table" is normal. The allocated memory is uninitialized when the module is first loaded so it can't contain a valid partition table. You can either use sfdisk or mkfs to create a partition table or file system in the allocated memory. If mkfs is used, the driver may subsequently be mounted. I had to make a few minor changes to the driver to get it to this point. I had to add the following line to the sbd_ops structure: ".getgeo = sbd_blk_getgeo" Then I had to create a function sbd_blk_getgeo with the code from the HDIO_GETGEO case from the sbd_ioctl function. This was because sfdisk complained that "Disk /dev/sbd0: cannot get geometry". The last thing I had to do was change "geo.start = 4" to geo.start = 0". This was because sfdisk complained that "Warning: start=4 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless." Once these changes were made, I was able to use sfdisk and mkfs on the device and mount it as well. </pre></div> Sat, 03 Nov 2007 00:39:22 +0000 insmod sbd.ko error ?? https://lwn.net/Articles/245305/ https://lwn.net/Articles/245305/ midhun001 Hi All,<br> <p> Even I got the same error. Please share it with me if you tion for this.<br> <p> -Midhun<br> Mon, 13 Aug 2007 08:48:09 +0000 insmod sbd.ko error ?? https://lwn.net/Articles/184701/ https://lwn.net/Articles/184701/ sahib HI<br> ITS ALI, I ALSO ENCOUNTERED THE SAME ERROR WHILE LOADING THAT SIMPLE BLOCK DEVICE DRIVER THAT SHOWS MSG LIKE "sbd0: unknown partition table" yet i came to know that it is due to the (add_disk)function call in the init function add_disk is necessary as it provide a block disk for block I/O's. now i am trying to solve it further if u have solved it! let me know coz i am also trying to learn this.<br> ALI(SAHIB) <br> Tue, 23 May 2006 06:01:06 +0000 insmod sbd.ko error ?? https://lwn.net/Articles/180519/ https://lwn.net/Articles/180519/ gg940231 I make ok sbd.c &lt;<a rel="nofollow" href="http://lwn.net/Articles/58720/">http://lwn.net/Articles/58720/</a>&gt;<br> linux 2.6.9<br> but some error:<br> <p> <font class="QuotedText">&gt; insmod sbd.ko</font><br> devfs_mk_dir: invalid argument.&lt;6&gt; sbd0: unknown partition table<br> <p> &gt;<br> Wed, 19 Apr 2006 08:33:11 +0000 -ENOTTY ? https://lwn.net/Articles/66514/ https://lwn.net/Articles/66514/ xav I don't understand the -ENOTTY in the sbd_ioctl(). Why not simply a -EINVAL ? Thu, 15 Jan 2004 22:54:38 +0000