Changes made to KFS for upgrading to Linux 2.6
kfs/Makefile.linux:
obj-y -> kfs-y
- replace hard coded .c .o rule, instead just specify EXTRA_CFLAGS,
- include files referenced from top of the linux kernel source directory (e.g -Ifs/kfs).
1. kdev_t -> bdev
- 2.6 no longer uses kdev_t, instead dev_t is an index rather than actual device number, and many functions that used to take a kdev_t parameter now work with struct block_device *bdev (One can get a bdev by issuing bdget(dev_t), but since the super block structure
contains an ->sb_bdev field, we can just use that directly in most places). This change affects a lot of places ...
2. stat/statfs -> kstat/kstatfs
- VFS interfaces for stat/statfs now expect and return a kstat/kstatfs structure instead of the user stat/statfs structure. I couldn't find a very nice nice way to handle this, other than manually setting the fields from one to the other.
3. page->buffers is gone - replaced by page_buffers() and page_has_buffers()
wrappers around page->private
4. ctime, mtime, atime now use timespec (tv_sec and tv_nsec)
5. create_empty_buffers prototype from (page, dev, size) ->(page, size, bstate)
6. ->lookup() and ->create() take an additional nameidata parameter
- currently ignored in KFS
7. ->follow_link() now returns a cookie to be passed to ->put_link()
KFS doesn't have ->put_link() so have ignored it for now, just return a cast to ERR_PTR
8. ->write_inode() and now has a return value, ->release_page() takes gfp_t
instead, ->writepage() takes an additional param, writeback control structure.
9. inode is now located by the filp's f_mapping's host instead of
file->f_dentry->d_inode. i.e.: struct address_space *mapping = file->f_mapping; struct inode *inode = mapping->host;
10. kfs_read_super() is actually fill_super(), has a return value,
- DECLARE_FSTYPE_DEV is gone, needs to be setup by hand, daemonize takes a process name argument
11. getblk -> __getblk; bread -> __bread (now uses bdev)
12. mark_buffer_clean() (am not too sure if clear_buffer_dirty()
is enough; tbd) , mark_buffer_uptodate() -> set/clear_buffer_uptodate set_buffer_async_io->mark_buffer_async_read/write
13. buffer_insert_inode_data_queue() is gone -> TBD ?? FIXME
14. get_hardsect_size -> bdev_hardsect_size
