On Wed, Dec 8, 2010 at 8:00 AM, sanoj <k.u.sanoj@xxxxxxxxx> wrote: > Hello all, > I want to track the read/write operations for a particular inode at the vfs > layer. > I added the following structure as a field to struct inode. > struct meta_info > { > unsigned int read_count; > unsigned int write_count; > }; Looking at the fields it seems you want this only incore...and I guess you want to count how many reads or writes came to a particular file. > This caused a problem in mounting the root device , what could be the cause > ? Can you tell us what was the error/problem ? Stack trace would be better. > Am i allowed modify the struct inode by adding a new field ? Sure :-) ... you are allowed to modify incore ondisk anything as long as you make code understand those structures (or if you are adding something in spare bytes which might get ignored). If you change something ondisk structure you will need to fix other userspace utilities which may parse this (in the worst case throw away your old filesystem and create new one if it changes the size of ondisk inode). > Also, i would like to know if there are any existing mechanisms that can > help me track the workload . > at various levels > Thanks, HTH > sanoj > -- Thanks - Manish ================================== [$\*.^ -- I miss being one of them ================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ