On Jan 11, 2008 10:10 AM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote: > > On Jan 11, 2008 2:40 AM, ilya <jibberboosh@xxxxxxxxx> wrote: > > hello, > > > > > I am unable to find the generic_file_read/write functions for the VFS > > > layer. Could anyone please help me with what should they be replaced > > > for the new kernel version. googling I could not find much neither I > > > could find any text about replacement of these functions in the > > > documentation. I am trying to port a module from 2.4 to 2.6. > > > > i did a quick search through 2.6.23 headers and the generic_file_read() > > is still in fs.h but no generic_file_write(). what about using vfs_read() and > > vfs_write()? > > > > Hi Ilya, > > Which version of kernel headers did you get generic_file_read. I am > looking at include/linux/fs.h (kernel 2.6.23.11) and can only find > do_generic_file_read . Though I got a link > (http://forums.gentoo.org/viewtopic-p-3767131.html?sid=d5cfe4877e1aec54496fbf8169b121c7#3767131) > saying that generic_file_read should be replaced with do_sync_read in > the newer versions. Also vfs_read internally also calls do_sync_read > with some more checks, so I think it is better to use vfs_read rather > than do_sync_read. :-( My bad...... you cannot use vfs_{read/write} as that would make your program to fall in an infinite recursive loop as vfs_write internally again calls file->f_op->write if it is there . Right now i am using do_sync_write() in my test program and things appear to work till now .. > > If I know a change, how do I find under which patch/version of the > kernel has a particular change gone into. > > Gurus any suggestions ?? Thanks in advance. > > > -- ilya > > > > > > > -- > Thanks & Regards, > ******************************************** > Manish Katiyar ( http://mkatiyar.googlepages.com ) > 3rd Floor, Fair Winds Block > EGL Software Park > Off Intermediate Ring Road > Bangalore 560071, India > *********************************************** > -- Thanks & Regards, ******************************************** Manish Katiyar ( http://mkatiyar.googlepages.com ) 3rd Floor, Fair Winds Block EGL Software Park Off Intermediate Ring Road Bangalore 560071, India *********************************************** -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ