lkml.org 
[lkml]   [1997]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectwritepage in inode_operations - never used?
Date
From

I was expecting that the writepage member of inode_operations was used
to write out pages to disk, presumably after they had been written by
readpage. However, examination of existing code in 2.1.26 (find
/usr/src/linux -name *.[ch] -exec grep writepage "{}" \; -print)
reveals that no filesystem code implements it (it is always set to
NULL) and furthermore, that nothing in the kernel ever calls it. I
looked in fs/buffer.c and mm/filemap.c where I expected stuff would
get flushed to disk, and it seems this always happens with ll_rw_block
to flush buffers directly to the block device they come from, without
checking for or ever using writepage. Is this functionality that was
planned but never implemented? I have one additional question. My goal
in investigating this is that I would like to write a filesystem that
wants to do something other than the default when buffers it read get
flushed to disk. NFS clearly manages to achieve this somehow, despite
the lack of writepage, but how this happens was not clear to me from
the NFS and buffer cache/page cache code.
- Maciej Stachowiak


\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2011 Jasper Spaans