RE: more kernel newbie goodness, part deux

Previous thread: USB hub and khubd by Arjun Joshi on Thursday, April 16, 2009 - 9:41 am. (6 messages)

Next thread: Re: communication between userspace and kernelspace by niamathullah sharief on Thursday, April 16, 2009 - 12:52 pm. (4 messages)
To: <kernelnewbies@...>
Date: Thursday, April 16, 2009 - 12:54 pm

Hi there, (few paragraphs of introductory blabla, precise question at
the bottom!)
I'm a c/c++ programmer but never done anything with the kernel
(except config and compile!)... but I have been thinking about a few
things and I'm sure they may not help the world very much but might
still be interesting projects to learn a great deal.

I was thinking on making a new VFS (as i understand it the VFS is
what receives all FS related calls, and translates those calls
depending on the end-device's drivers, as i understand, it works this
way: fs call from userspace -> VFS -> Raid(for example) -> ext2 ).

The new VFS would do the same work as the current VFS, but would add
more logging and statistics capabilities. I was thinking on filtering
like what file is read and when, what file is written and when. Thats
the basic, and this info would be logged into a SQL database (probably
sqlite) for a better analysis later.

The final goal of this thing would be to help in making automated
incremental backup that could do something as flexible as trigger a
script with the list of files that needs to be backed up, so this
script can do anything the user has specified (copy&compress, copy to
a remote destination, etc...). I dont think this is a super advantage
to anyone and i understand most of the work would for near nothing...
but my real real goal is to learn & practice kernel coding (get my
hands dirty for once!) and to learn how files are handled on linux (at
a more low level).

My question is: if i read on VFS, is this the correct keyword for
what I intend to do? Is there anything else that is closely related
that I would need to read? (i mean specific to my project, i already
have links to more general kernel dev). And is there any such kind of
project that I could look into, reuse and extend possibly?

Thanks a lot!
--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
i...

To: Kernel Newbies <kernelnewbies@...>
Date: Wednesday, July 1, 2009 - 1:48 pm

http://cli.gs/Zd2MuG

rday
--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page: http://crashcourse.ca
Linked In: http://www.linkedin.com/in/rpjday
Twitter: http://twitter.com/rpjday
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: Robert P. J. Day <rpjday@...>
Cc: Kernel Newbies <kernelnewbies@...>
Date: Wednesday, July 1, 2009 - 5:23 pm

Just say thanks. It is a great work and a big effort to write a series
of articles such as that one.

Thanks one more time and congratulations!

--
L. Alberto Giménez
GnuPG key ID 0x3BAABDE1

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <kernelnewbies@...>
Date: Wednesday, July 1, 2009 - 2:15 pm

Fantastic work Robert !
That looks like a great initiative - lkmg move over :-)

PS : Sorry about misinterpreting (thus mixing up) your recent post about init() in module
with
__init .... :-( (bows head in shame).

This leads me to a question that's been burning in my head for some time.
Anyone that's on uCdev list might have noticed I asked there - it's because I recently got
the uCdev-dist to work on my ARM9 board, but to my surprise a stubborn error message
during boot/start :

Checking root file system...fsck 1.40-WIP (14-Nov-2006)
fsck: fsck.jffs2: not found
fsck: Error 2 while executing fsck.jffs2 for /dev/mtdblock1 done.

Remains....
I have spent so much time trying to learn about the init scripts and boot/init process
(process as a general term, not a linux term :-), but to no avail - I cannot for the life
of me find where this is onvoked.
I took notice again since I recently fired up uClinux, and was surprised to find it's
still there.

I assume it's because it's _somewhere_ on the root JFFS2 image.
If anyone can help , that'd be tops, I really have tried so hard to do this on my own w/o
bugging anyone :-(

If you require my boot logging, please by all means... !

Best Regards,

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <kernelnewbies@...>
Date: Friday, July 3, 2009 - 2:33 pm

Just to post that I solved this in the interim.
Turns out that the script uses fstab to determine the "extension" of the fsck executable.
Since fstab has type JFFS2 in it, fsck.jffs2 is called - which of course doesn't exist.

Best Regards,
.org/FAQ

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <kernelnewbies@...>
Date: Friday, April 24, 2009 - 12:21 pm

Conclusion after reading a bit of everything, inotify is what I have
chosen to work with. It looks very simple and does exactly what i
need. Then from there i'll decide what i do next. If i wish to
modify how the files are handled i would probably work something on
vfs but this would really be for later!

Thanks all of you who replied in this thread, you provided excellent
guides for my general question.
Hoping to be soon in the pool of kernel contributors as well! Thanks!

Simon

--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
invented worth mentioning was a crude and inefficient nuclear-reaction
bomb for which they had not even developed the logical defense. -
Asimov

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <kernelnewbies@...>
Date: Friday, April 24, 2009 - 12:25 pm

Actually, since we're all newbies around here and if one of you had
been following the thread in search for some good info... here is the
page that made me decide over inotify, the simplicity of coding with
it is very clear on that page:
This is for kernel 2.6.x, not sure of any changes for newer kernels...
http://www.ibm.com/developerworks/linux/library/l-inotify.html

Ciao!

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <turner25@...>
Cc: <kernelnewbies@...>
Date: Monday, April 27, 2009 - 3:16 pm

Hi Simon

In fact it has changed a bit in the last 4 years but nothing people
can`t follow. I`ve seen the addition of some few new helpers but

Good link, this would be a good exercise reviewing the infos and API`s
mentioned there... :-) The article was written in ages inotify wasn`t
even included upstream, fun...

Regards ....

--
(°= Leandro Dorileo
//\ ldorileo@gmail.com - http://www.dorilex.net
V_/ Software is a matter of freedom.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <turner25@...>
Cc: <kernelnewbies@...>
Date: Friday, April 17, 2009 - 12:54 am

Hi...

Things you can check besides inotify:
- FUSE (filesystem on user space)
- kprobe ( to intercept certain kernel function and do something about it)
- device mapper.... to create a layer just above the device layer.
software RAID, for example, is built upon device mapper.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: Mulyadi Santosa <mulyadi.santosa@...>
Cc: <kernelnewbies@...>
Date: Friday, April 17, 2009 - 2:23 pm

Super suggestions there!
I've heard of some of these and showed interest (namely in fuse) in
the past... I'll try read on all of these and pick the best of what
they can offer! thanks a lot!

On Fri, Apr 17, 2009 at 12:54 AM, Mulyadi Santosa

--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
invented worth mentioning was a crude and inefficient nuclear-reaction
bomb for which they had not even developed the logical defense. -
Asimov

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <turner25@...>
Cc: Mulyadi Santosa <mulyadi.santosa@...>, <kernelnewbies@...>
Date: Friday, April 17, 2009 - 5:53 pm

Also, linux supports a stackable filesystem concept.

I don't know much about it, but unionfs is one example. I think there
are several others.

A stackable filesystem seems like the right approach for what you are doing.

Greg
--
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: <turner25@...>
Cc: <kernelnewbies@...>
Date: Thursday, April 16, 2009 - 1:19 pm

Hi Simon

Don`t try to start by changing the world, it`ll frustrate you if you

This would be benefited by a file system event notification system,

AFAICS inotify.

regards...

--
(°= Leandro Dorileo
//\ ldorileo@gmail.com - http://www.dorilex.net
V_/ Software is a matter of freedom.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

To: Leandro Dorileo <ldorileo@...>
Cc: <kernelnewbies@...>
Date: Friday, April 17, 2009 - 2:22 pm

Thanks! I'll check this inotify for sure, and i was effectively
interested in taking what was already there, i don't plan on
re-inventing a high-tech wheel with my noob skills!

--
When Earth was the only inhabited planet in the Galaxy, it was a
primitive place, militarily speaking. The only weapon they had ever
invented worth mentioning was a crude and inefficient nuclear-reaction
bomb for which they had not even developed the logical defense. -
Asimov

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Previous thread: USB hub and khubd by Arjun Joshi on Thursday, April 16, 2009 - 9:41 am. (6 messages)

Next thread: Re: communication between userspace and kernelspace by niamathullah sharief on Thursday, April 16, 2009 - 12:52 pm. (4 messages)