Re: init scripts problems ?

"Peter T. Breuer" <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
"Also sprach Peter T. Breuer:"
> You are here:
> 
>         ENBD_ALERT("INVALIDATE DEVICE nd%s\n", lo->devnam);
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
>         __invalidate_device(lo->inode->i_bdev, 0);
> #else
>         __invalidate_device(lo->inode->i_bdev);
> #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) */
> 

Make THAT crud look like THIS crud:

        ENBD_ALERT("INVALIDATE DEVICE nd%s\n", lo->devnam);
        if (1) {
                struct inode *inode = lo->inode;
                struct block_device *bdev = inode ? inode->i_bdev : NULL;
                struct inode *inodetoo = bdev ? bdev->bd_inode : NULL;

                if (!inodetoo || inode != inodetoo) {
                        ENBD_WARN(
                            "invalidate would crash on device with inode %p\n",
                            inodetoo);
                        ENBD_WARN( "aborting invalidate\n")
                } else {    
        
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
        __invalidate_device(lo->inode->i_bdev, 0);
#else
        __invalidate_device(lo->inode->i_bdev);
                }
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) */
        }

And _maybe_ that will stop your oops (I doubt it). At least it will
yell a bit and give us some info. 

But it's not the point of interest.

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.