Re: Re: Access content of file via inodes

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

 



On Apr 6, 2005 3:49 AM, Kathy KN (HK) <kathy.kn@xxxxxxxxx> wrote:
> Seems like it is not going to be easy. I don't have much parameters
> required to be able to perform similarly to what generic_file_*[1] did,
> particularly count, ppos, etc.
> 
> [1] i.e.
> 2201 ssize_t generic_file_write(struct file *file, const char __user *buf,
> 2202                            size_t count, loff_t *ppos)

I was not suggesting you call the method directly as it copies data to
userspace, I just wanted to show you code that may inspire you. The
function uses pos to find the appropriate page and writes data there.

Anyway, if marking buffers dirty works for you, go for it. However,
what are you going to do if the part of the file you are intereste in
is not cached in memory yet?

Good luck,

Martin Jambor

--
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