Linux-Development-Sys Digest #772, Volume #8 Tue, 5 Jun 01 09:13:13 EDT
Contents:
Reboot from driver module (Steve Helding)
Re: Rescuing an e2fs with damaged superblocks? (Frank Ranner)
Re: ext2 performance with large directories
Compile problem in 2.4.5, es1371 (Clifford Kite)
Re: where can I find information for kernel hackers?
Re: ext2 performance with large directories (cLIeNUX user)
Re: where can I find information for kernel hackers? (cLIeNUX user)
distros we'd like to see (cLIeNUX user)
Re: Rescuing an e2fs with damaged superblocks? (Florian Kirstein)
Porting solaris software to Linux ("jamal")
differece between a kernel module and an application (Mohammed Khalid Ansari)
Re: tabstops (Charles Wilkins)
Re: differece between a kernel module and an application (Josef Moellers)
Re: How to access argc,argv,envp without glibc (Basile STARYNKEVITCH)
Re: Porting solaris software to Linux (phil)
Re: Rescuing an e2fs with damaged superblocks? ("Gene Heskett")
----------------------------------------------------------------------------
From: Steve Helding <[EMAIL PROTECTED]>
Subject: Reboot from driver module
Date: 05 Jun 2001 01:12:49 GMT
Reply-To: [EMAIL PROTECTED]
This is a multi-part message in MIME format.
==============7A1984B5B64AC8C20953C4A1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I'm having trouble figuring out how to reboot a RH 6.2 system from a
driver. When I get an interrupt from our hardware (telling me something
is horribly wrong with our system) I want to reboot the system. I tried
machine_restart with varying success. It seemed to work but when the
system reboots it needs to run fsck because I didn't sync the disk.
When I tried using sys_reboot I can't seem to get the symbol recognized
by the compiler or insmod loader. Same goes for sys_sync. Does anyone
know the proper way of performing a system reboot from within a driver
module?
==============7A1984B5B64AC8C20953C4A1
Content-Type: text/x-vcard; charset=us-ascii;
name="stephen.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Steve Helding
Content-Disposition: attachment;
filename="stephen.vcf"
begin:vcard
n:Helding;Steve
tel;work:925-737-1531 x214
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Steve Helding
end:vcard
==============7A1984B5B64AC8C20953C4A1==
------------------------------
From: Frank Ranner <[EMAIL PROTECTED]>
Subject: Re: Rescuing an e2fs with damaged superblocks?
Date: Tue, 05 Jun 2001 11:18:13 +1000
Florian Kirstein wrote:
>
> Hi,
>
> something silly happened (a broken IDE cable) and stupid me thought it
> would be best to shut down and fix it. But on shutdown the e2fs driver
> obviously tried to update the superblock (marking the fs as cleanly
> unmounted) and doing so obviousle severely damaged it, when trying to
> mount the fs now I get
> mount: you must specify the filesystem type
> and using -t e2fs
> mount: wrong fs type, bad option, bad superblock on /dev/hdc
>
> and even using standard locations for superblock backups doesn't help.
> I then found the findsuper tool, which also didn't help really (it
> shows somewhat strange values and the found superblocks also don't
> help), and in the sourcecode there's a hint that linux updates all
> superblock backups on unmount, so I think all my superblocks
> are damaged.
>
> Besides the superblocks I'm quite sure the filesystems should be
> completely OK, because I didn't write to them the days before the
> crash.
>
> So my question: does anyone here see any chance to get my data back?
> I searched the net for tools doing ext2 rescues (like scanning the whole
> disk and rebuilding the data from there), but didn't find anything
> so far :/ I can't be the first one needing something like that?
>
> Thanx & (:ul8er, r@y
man mke2fs and check out the -S option.
Here it is anyway:
-S Write superblock and group descriptors only. This
is useful if all of the superblock and backup
superblocks are corrupted, and a last-ditch recov-
ery method is desired. It causes mke2fs to reini-
tialize the superblock and group descriptors, while
not touching the inode table and the block and
inode bitmaps. The e2fsck program should be run
immediately after this option is used, and there is
no guarantee that any data will be salvageable.
Frank
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: ext2 performance with large directories
Date: Tue, 05 Jun 2001 01:58:14 -0000
In article <9ff6aq$2l3$[EMAIL PROTECTED]>,
Linus Torvalds <[EMAIL PROTECTED]> wrote:
>Depending on your access patterns, the directory cache will kick in, and
>do most of the real work.
>
>And the dcache uses a pretty efficient hashing mechanism, regardless of
>what the underlying filesystem is doing.
>
>But you should realize that the dcache is nothing but a cache, and while
>very good for most normal loads you can still get into nasty performance
>behaviour by having the "wrong" access patterns.
IIRC inn was great at having the "wrong" patterns. But storing news as
one file per article is probably one of the worst things you can do.
------------------------------
From: Clifford Kite <[EMAIL PROTECTED]>
Subject: Compile problem in 2.4.5, es1371
Date: Mon, 4 Jun 2001 21:55:13 -0500
I have a problem compiling the 2.4.5 kernel that seems to have
it's roots in code required for my sound card. Here is the
complete error log for "make bzImage":
corncob:/usr/src/linux# less bzImage.errs
super.c:385: warning: `move_vfsmnt' defined but not used
{standard input}: Assembler messages:
{standard input}:827: Warning: indirect lcall without `*'
{standard input}:910: Warning: indirect lcall without `*'
{standard input}:1009: Warning: indirect lcall without `*'
{standard input}:1052: Warning: indirect lcall without `*'
{standard input}:1083: Warning: indirect lcall without `*'
{standard input}:1114: Warning: indirect lcall without `*'
{standard input}:1146: Warning: indirect lcall without `*'
{standard input}:1176: Warning: indirect lcall without `*'
{standard input}:1206: Warning: indirect lcall without `*'
{standard input}:1511: Warning: indirect lcall without `*'
{standard input}:1609: Warning: indirect lcall without `*'
drivers/sound/sounddrivers.o: In function `es1371_probe':
drivers/sound/sounddrivers.o(.text+0x624c): undefined reference to
`gameport_register_port'
drivers/sound/sounddrivers.o: In function `es1371_remove':
drivers/sound/sounddrivers.o(.text+0x63ae): undefined reference to
`gameport_unregister_port'
make: *** [vmlinux] Error 1
The es1371.c code has changed from the 2.4.3 kernel, which compiles
without a problem, and there are now "extern inline void" definitions
for gameport_register_port and gameport_unregister_port that have
no code. I'm not a programmer and don't understand just what is
intended but something is wrong.
Anyone able to help?
--
Clifford Kite <Email: [EMAIL PROTECTED] with X=kite, Y=inetport, Z=com>
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: where can I find information for kernel hackers?
Date: Tue, 05 Jun 2001 03:46:02 -0000
In article <9ffdlg$2n38$[EMAIL PROTECTED]>,
wang yin <[EMAIL PROTECTED]> wrote:
> I'm looking for "Linux kernel hacker's guide". But it seems it's not on
>the Internet anymore! Only very old mirrors. And where's Michael Johnson?
>www.redhat.com:8080 can't be visited anymore.
> The kernel change too much these days. Where can I find all the
>information I need?
Try here:
http://www.linuxdoc.org/LDP/khg/HyperNews/get/khg.html
--
http://www.spinics.net/linux/
------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: ext2 performance with large directories
Date: Tue, 05 Jun 2001 04:03:23 -0000
[EMAIL PROTECTED]
>In article <[EMAIL PROTECTED]>,
>Anonymous <[EMAIL PROTECTED]> wrote:
>>[EMAIL PROTECTED] wrote:
>>
>>> It's a linear lookup, i.e. it gets very slow.
>>
>>One thing I noticed is that even for as many
>>as 60,000 directory entries, the performance
>>isn't all that bad.
>>
>>I wonder why?
>
>Depending on your access patterns, the directory cache will kick in, and
>do most of the real work.
>
>And the dcache uses a pretty efficient hashing mechanism, regardless of
>what the underlying filesystem is doing.
>
>But you should realize that the dcache is nothing but a cache, and while
>very good for most normal loads you can still get into nasty performance
>behaviour by having the "wrong" access patterns.
>
> Linus
How was Japan?
Rick Hohensee
301-595-4063
------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: where can I find information for kernel hackers?
Date: Tue, 05 Jun 2001 04:22:58 -0000
[EMAIL PROTECTED]
>Hi,
> I'm looking for "Linux kernel hacker's guide". But it seems it's not on
>the Internet anymore! Only very old mirrors. And where's Michael Johnson?
>www.redhat.com:8080 can't be visited anymore.
> The kernel change too much these days. Where can I find all the
>information I need?
>
>
The sourcecode cross-reference sites are awesome.
http://lxr.linux.no/source/fs/ext2/
There's not much you can do about rapid change.
Rick Hohensee
------------------------------
From: r@cLIeNUX. (cLIeNUX user)
Subject: distros we'd like to see
Date: Tue, 05 Jun 2001 04:24:24 -0000
AOLinux
American Federation of Linux and Congress of International OSen
American Telephone and Linux Corporation
Apricot Linux Company
Bavarian Linux Works
Bechtelinux Group
Borlinux International
Briggs, Linux and Stratton
Bristol-Linux Squibb
Cargillinux
Caterpillinux Infotractor Company
Chevrolinux
Coca-Linux Bottling Company
Daimlinux Chrysler
Disneylinux
Exxon Linux Mobil
Federal Linux
Ford Linux Company
Friedman, Billings, Linux Group
Frito-Linux
Generalinux Electric
Generalinux Mills
Harlinux Davidson
I.E. Linux de Nemours &Co.
International Linux Machines
Interstate Linux Commission
JP Linux Chase
Jack in the Linux Box
Lintelux
Linux Aerospeciale
Linux Broadcasting Company
Linux du Soleil
Linux Scouts of America
Linux Zepplin
Linux-Suisse
LinuxDesk Inc.
Llynux of London
M&M Linux
McGraw Linux
Mercedes Linux
Metro Goldwyn Linux
Minnesota Mining and Linux Company
Motorolinux
Motown Linux
Neiman Linux
Northrop Linux Grumman
Oldsmolinux
Paramount Linux
Price-Linuxhouse
Proctor, Linux and Gamble
Prudential Linux Company
RJ Linux NaOSco
Sears, Linux and Company
Southwest Linux
Standard Linux of Ohio
The New York Linux Exchange
The United States Linux Corps
This Old Linux
U.S. Dept. of Linux
United Linux Service
Weyerlinux
XerolinuX
Rick Hohensee
------------------------------
From: [EMAIL PROTECTED] (Florian Kirstein)
Subject: Re: Rescuing an e2fs with damaged superblocks?
Date: 5 Jun 2001 04:34:56 GMT
Hi,
> man mke2fs and check out the -S option.
This looks promising, but only on the first look... I tried it on a copy of
one of my damaged filesystems with no real success, I think my problem here
is that I don't know the original parameters I used to create the
filesystems :/ Is there a way to find them? I think I might have
specified non-default values for -i and -m.
Thanx & (:ul8er, r@y
------------------------------
From: "jamal" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,comp.unix.solaris
Subject: Porting solaris software to Linux
Date: Tue, 5 Jun 2001 15:03:39 +0900
Reply-To: "jamal" <[EMAIL PROTECTED]>
Hi ,
I am new in linux or unix programming in general.
My company has an application written for Windows and Solaris.
We plan to port it to Linux. So the easiest should be porting
Solaris version into Linux version. I wonder what the main issues that I
should take care of for doing the porting.
Is it just compatibility between solaris system library and linux system
library or is there any specific
problem?
As I know that all unix system should have the similar API right? So in what
part they differ?
For your imformation the solaris software is compiled using sun cc compiler,
but there are some error when I tried to compile
using gcc, so obviously the compiler difference is one of the consideration.
regards
Jamal
------------------------------
From: Mohammed Khalid Ansari <[EMAIL PROTECTED]>
Subject: differece between a kernel module and an application
Date: Tue, 5 Jun 2001 05:38:38 GMT
Hi,
I am confused between the kernel module and an application.
what is the difference between the two?
Can I not convert a kernel module into a program which does the same job
as that of module?
Please reply
--
**************************************************************************
Mohammed Khalid Ansari Tel (res) : 0091-022-3051360
Assistant Manager II (off) : 0091-022-2024641
National Centre for Software Technology Fax : 0091-022-2049573
8th flr,Air India Build. Nariman Point, E-Mail : [EMAIL PROTECTED]
Mumbai 400021. HomePage : www.khalidansari.com
**************************************************************************
------------------------------
From: [EMAIL PROTECTED] (Charles Wilkins)
Subject: Re: tabstops
Date: Tue, 05 Jun 2001 07:15:35 GMT
Reply-To: [EMAIL PROTECTED]
I should be more specific with what I am trying to do. I am in fact
running vim on Mandrake 8. I have made some progress for setting the
behaviour that I prefer, but there is still a minor catch.
With vim, while editing .c and .cpp files specifically, I would like
the following behavior to be the default:
Tabstops to be 5 spaces instead of 8.
No autoindenting at all OR autoindenting to 5 spaces only while in
functions or subroutines.
Here is what I have done so far, and what it has accomplished.
In the .vimrc file, I have added the following lines:
" my settings
set tabstop=5
set noautoindent
and under this section, I have modified one line:
augroup cprog
" autocmd BufRead *.c,*.h set formatoptions=croql cindent
comments=sr:/*,mb:*,el:*/,://
autocmd BufRead *.c,*.h set formatoptions=croql nocindent
comments=sr:/*,mb:*,el:*/,://
What this has done is when I open up a previously saved .c or .cpp
file, tabstops are in fact 5 spaces and autoindent is off, yay.
When I start a new .c or .cpp file however, tabstops are at 5 spaces,
but autoindent is on and it autoindents to 8. This tells me that
there is still a more global tabstop setting that needs to be changed.
I would not mind the autoindent for c programs, if only the tabstops
were at 5 instead of 8. I am pretty anal about the way my code looks,
especially when I start nesting some loops inside of functions. I
hate wasting terminal space on greedy tabstops.
Any help at all is greatly appreciated.
Charles
On Mon, 4 Jun 2001 17:27:17 +0100, "Neil Butterworth"
<[EMAIL PROTECTED]> wrote:
>"Charles Wilkins" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>> I am not sure this pertains to vi or bash, but when i write scripts,
>> the tabstops are set at 8 spaces. How can I reset the tab stops to a
>> lower number?
>
>Edit your .exrc file and add these lines:
>
>set ts=4
>set sw=4
>
>or you can type them in as commands at the vi colon prompt.
>
>NeilB
>
>
>
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: differece between a kernel module and an application
Date: Tue, 05 Jun 2001 10:31:11 +0200
Mohammed Khalid Ansari wrote:
> =
> Hi,
> =
> I am confused between the kernel module and an application.
> what is the difference between the two?
> Can I not convert a kernel module into a program which does the same jo=
b
> as that of module?
The major distinction between the two is that a kernel module runs in
kernel mode with more privileges than a user level program.
This has several implications: a kernel module has direct access to
resources that a user program doen't have, e.g. IO ports, certain kernel
data structures and, most important, because a user program might get
access to these, too, interrupts. A user level program can never
directly process interrupts while a kernel module can.
Also, a kernel module can provide functions and data structures to other
kernel components by registering itself with the kernel. A kernel
component will most ceratinly not call a user level function.
Also, a user level program is interruptible and needs to be rescheduled
to run, making it almost impossible to handle real-time tasks while a
kernel module is uninterruptible, afaik.
HTH,
Josef
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
From: Basile STARYNKEVITCH <[EMAIL PROTECTED]>
Subject: Re: How to access argc,argv,envp without glibc
Date: 05 Jun 2001 10:58:33 +0200
>>>>> "Eric" == Eric Buddington <[EMAIL PROTECTED]> writes:
Eric> I am trying to write minimalist programs for use on boot
Eric> floppies. I have found that by stealing the assembler
Eric> syscall macros from glibc, I can write miniscule (about 2k)
Eric> and functional programs to do the basics of mount, swapon,
Eric> execve, all that.
Eric> I can't, however, figure out how to access command-line
Eric> arguments or environment without using glibc (which is a
Eric> beast) Can someone point me to the relevant sources in glibc
Eric> or gcc?
Read the Linux Assembly-HOWTO which answers these questions in details
"http://www.linuxdoc.org/HOWTO/Assembly-HOWTO/"
N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
=====================================================================
Basile STARYNKEVITCH ---- Commissariat � l Energie Atomique * France
DRT/LIST/DTSI/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX
work email: Basile point Starynkevitch at cea point fr
home email: Basile point Starynkevitch at wanadoo point fr
------------------------------
From: [EMAIL PROTECTED] (phil)
Crossposted-To: comp.os.linux.development.apps,comp.unix.programmer,comp.unix.solaris
Subject: Re: Porting solaris software to Linux
Date: 5 Jun 2001 13:23:58 GMT
Reply-To: [EMAIL PROTECTED]
jamal -[[EMAIL PROTECTED]]- spewed forth
the following lines of wisdom:
> Hi ,
>
> I am new in linux or unix programming in general.
> My company has an application written for Windows and Solaris.
> We plan to port it to Linux. So the easiest should be porting
> Solaris version into Linux version. I wonder what the main issues that I
> should take care of for doing the porting.
> Is it just compatibility between solaris system library and linux system
> library or is there any specific
> problem?
> As I know that all unix system should have the similar API right? So in what
> part they differ?
> For your imformation the solaris software is compiled using sun cc compiler,
> but there are some error when I tried to compile
> using gcc, so obviously the compiler difference is one of the consideration.
Hi Jamal,
Having generally ported applications from Liunx *to* Solaris, I'll
try and explain the differences I have encountered..
One good thing about this could be GNU. If you have been using GNU
development tools on Solaris, your work is made much easier.
One huge section that is completely different on Linux and Solaris,
is threads. Solaris has it's own thread Library, while Linux uses
it's POSIX thread library.
Semaphores are another area where this happens again, Linux
conforming somewhat to the POSIX standard and Solaris with it's own
semaphore functions.
What kind of application is it, what kind of libraries does it
use.. that kind of thing.
Phil.
------------------------------
Date: 5 Jun 2001 5:33:53 -0500
From: "Gene Heskett" <[EMAIL PROTECTED]>
Subject: Re: Rescuing an e2fs with damaged superblocks?
Gene Heskett sends Greetings to Florian Kirstein;
FK> Hi,
>> man mke2fs and check out the -S option.
FK> This looks promising, but only on the first look... I tried it on
FK> a copy of one of my damaged filesystems with no real success, I
FK> think my problem here is that I don't know the original
FK> parameters I used to create the filesystems :/ Is there a way to
FK> find them? I think I might have specified non-default values for
FK> -i and -m.
FK> Thanx & (:ul8er, r@y
I don't think it hurts to give it the wrong value. Most modern, read BIG
drives will have a superblock somewhere around 65536.
Cheers, Gene
--
Gene Heskett, CET, UHK |Amiga A2k Zeus040, 70MB ram, 31 gigs
| Linux @ 500mhz, 320MB ram, 50 gigs
email gene underscore heskett at iolinc dot net
#Amiga based X10 home automation program EZHome, see at:#
<http://www.iolinc.net/gene_heskett>
This messages reply content, but not any previously quoted material,
is � 2001 by Gene Heskett, all rights reserved.
--
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************