Question about VFS

Pranay Srivastava pranjas at gmail.com
Tue Apr 29 23:56:29 EDT 2014


On Wed, Apr 30, 2014 at 9:14 AM, Adam Fowler <ajf2177 at columbia.edu> wrote:
> I've been trying to implement a file system using vfs and I've got mkdir and
> touch working but I can't seem to get echo blah > new file to create a new

Can you see if you are able to get the user space buffer and print it?
Would be better
if you can post some of your code.

> file with content blah. I tried to use printk to see what gets called during
> the creation process but it doesn't seem that write is getting called for my
> file, just open. When I ran strace I see a write call but it is to stdout
> and not to my file. Any tips on how to go about implementing the behavior
> I'm after?  I've been following the following tutorial with the changes
> necessary to work on kernel 3.10.34 http://lwn.net/Articles/57369/ . Any
> help is appreciated, thanks!

In case you have saved the user space contents and not set the inode->i_size
properly try to set that appropriately. But again it would be better
to have some code to look
at.

>
> --
>
> Adam Fowler<ajf2177 at columbia.edu>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
        ---P.K.S



More information about the Kernelnewbies mailing list