0

I'm writing a patch for VFS FAT implmentation on kernel 3.0 I want to add posix attributes to FAT files that are created in linux. to achive that, I must save a file that contains all the relevant information on the mounted drive.

I know that reading and writing files from kernel space is something normally shouldn't be done, and I'm looking for another way to read/write the data.

I saw articles on the net that suggested to use /proc or to create a userspace daemon that will do the IO for me. I wanted to know if anyone saw or know where can I look at an implmentation of a thing like that,because I didn't find any examples for that over the net. I'm not looking for a read/write to proc example, I want to see an entire solution for this issue.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
stdcall
  • 27,613
  • 18
  • 81
  • 125

1 Answers1

1

Have a look at the quota implementation; this is a mechanism (ok, presumably not available on vfat) which reads/writes files from the kernel.

Additionally, the "loop" block device is another example of a kernel facility which does file IO.

MarkR
  • 62,604
  • 14
  • 116
  • 151
  • I found an example on various places in the kernel. one can be found for example under /sound/firmware... – stdcall Aug 10 '11 at 16:59