Re: Accessing a File System/ Files from kernel space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2006-03-21 at 02:59 -0800, George Joseph wrote:
>    I am a relatively new entry to Linux kernel space programming and
> have worked on RTOSs like os20,vxworks etc etc...
>  
>    I would like to know whether it is possible to access a file on a
> filesystem by a driver loaded in the kernel and what would be the
> issues I face while doing so - practically and theoritically. Sorry
> the question is a bit blunt since this is a new activity I am planning
> to pursue. TIA.BTW I am planning to use kernel 2.6.15 for
> developement. 

I don't know much about drivers so I'll let someone else answer that,
but from a file system perspective:
1. I assume this is for an exercise, otherwise, why not just use the
file system?
2. What do you mean by "access"?  Do you mean read?  Read/write?  Stat?
I'll assume you don't want to make changes to the file system, since you
will need to duplicate the whole file system within the driver.
3. You should be aware that each file system has its own meta-data, it's
own on-disk format, etc.  Unless your driver simply uses the file system
methods, it will by specific to file systems that use a single format
that you code.
4. You will need to be familiar with where meta-data is stored on the
file system, how to parse it, how to use it to find data blocks, and any
other quirks that the specific file system has.

Hope that helps - will provide more specific answers for more specific
questions :)

Avishay Traeger
http://www.fsl.cs.sunysb.edu/~avishay/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux