Does the File suystem do buffer cache for char device

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

 



Hi all,

I have completed reading the LLD3 and The Design of Unix Operating Sysem.
I have just started writing my own version of LLD example drivers.
My machine runs on FC8.

Theoritically, understand that the buffercache only avialable for
Block driver not char devices. I wrote a scull type char driver.

I do this from the APP:
  fwrite(buf, 1, 2, fd)
  rewind()
  fread(buf, 1, 1, fd)
  fwrite(buf, 1, 1, fd)

During the fread operation, driver gets a read of 4096 bytes from the
application whereas the application is trying ot read only 1 byte.
This looks like file system buffer cache.???

Regards,
Bhanu

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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