473,327 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Creating a file system with FUSE.

78
Hi all. I'm not sure if this is the right place to ask, but here it goes.
I'm trying to create a file system using the File System in User Space (FUSE) kernel module. From what i have understood, i need to implement certain functions, like the read, write, and delete that should be referenced by the fuse_main function. Now whenever my program uses the standard C functions, it references the functions i created to manipulate the file in my file system (passed to the program as an arguement).

My question is about the implementation of the functions. There are multiple layers that need to be implemented, each responsible for certain functionalitlies. I am having a hard time figuring out how to implement the functions. I downloaded the fuse from sourceforge, and i installed it. It seems to have a library of functions. These functions do contain read, write functions. The layer i'm supposed to implement is an interface for the fuse kernel module.

Now am i supposed to use the functions in the fuse kernel to implement my functions or should i use the standard C lib functions? I'm confused cause the example in the downloaded fuse archive was using the C lib functions to implement the fuse functions.

I'm sorry it's a little vague, i don't know how to explain it better.
I guess i want to know how to implement the functions.

Thanks alot.
May 23 '07 #1
2 5506
weaknessforcats
9,208 Expert Mod 8TB
My guess is you are to use the C lib functions that are provided by FUSE.

Your code should be independent of the file system.

As I say, this is a guess ut I have used files with several operating systems and all provide a set of C lib functions for the particular operatint system.
May 24 '07 #2
Sebouh
78
Well, after some thorough analysis, I've understood that I have to implement these functions using Linux system calls just like in here.
But i have trouble understanding how FUSE works. I've read some stuff on it, but I can't seem to wrap my brain around it. When does my function get called really? Let's say i have a program that reads from a file. When the program calls fopen, does the FUSE take over? What does it do then? It's said:
In user space, FUSE implements a library which manages communications with the kernel module. It accepts filesystem requests from the FUSE device and translates them into a set of function calls which look similar (but not identical) to the kernel's VFS interface. These functions have names like open(), read(), write(), rename(), symlink(), etc.
link
FUSE "dereferences" the function call to the one i've implemented, but what's that got to do with my partition and my file system? What will be so special about making a system call through the implemented function and not the program itself?

Thanks a lot.
May 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris Kennedy | last post by:
How do create a dataset from scratch based on an XML schema. This will not be filled by a dataadapter. It will be a dataset which I add rows to and then save as an XML file. All the example depend...
7
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving,...
15
by: David Thielen | last post by:
Hi; My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a subdirectory to display as part of the created page. However, the bitmap will not display due to a security violation. ...
16
by: pukivruki | last post by:
hi, I wish to create a temporary table who's name is dynamic based on the argument. ALTER PROCEDURE . @PID1 VARCHAR(50), @PID2 VARCHAR(50), @TICKET VARCHAR(20)
5
by: Kevin Walzer | last post by:
I want to write some variables (user preferences, specifically) to a text file and then read the values from that file. Here is my code to write the data: verbosemodes= """ Detailed = "-vv"...
6
by: Richard | last post by:
Which way would you guys recommened to best parse a multiline file which contains two fields seperated by a tab. In this case its the linux/proc/filesystems file a sample of which I have included...
2
by: anthony.cutrone | last post by:
Hi group, I have a development with a file system in Python, accessible from a graphic web application. I mustn't use an NTFS or EXT3 system, because those are not adapted for my use. Indeed,...
1
by: Thomas W | last post by:
I want to create a virtual filesystem based on a relational database. It might run as a server on a different machine, but it has to be available like a normal filesystem, either shared using...
20
by: Kevin Walzer | last post by:
>>import os kevin 0 The standard output of the system command 'whoami' is my login name. Yet the value of the 'foo' object is '0,' not 'kevin.' How can I get the value of 'kevin' associated...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.