[pso] [Tema4] Probleme la mount

Marius Ion marius.ion85 at gmail.com
Sat Aug 23 18:52:05 EEST 2008


Am implementat urmatoarele functii din super_operations :
struct super_operations pitix_sops = {
        .alloc_inode            = pitix_new_inode,              // DONE
        .destroy_inode          = pitix_destroy_inode,          // DONE
        .read_inode             = pitix_read_inode,             // DONE
        .write_inode            = pitix_write_inode,            // DONE
        .delete_inode           = pitix_delete_inode,           // TODO
        .put_super              = pitix_put_super,              // DONE
        .statfs                 = simple_statfs,                // DONE
};

In functia fill super, dupa ce am citit superblock-ul de pe disc, am setat
blocksize-ul, am citit imap si dmap
si am completat campul ptr super_operations, fac urmatoarele :

root_inode = iget(sb,0);
si apoi
sb->s_root = d_alloc_root(root_inode);

Imi da kernel panic in d_alloc_root, d_instantiate, la linia
list_add(&entry->d_alias, &inode->i_dentry); (
http://cs.pub.ro/~pso/lxr/source/fs/dcache.c?v=linux-2.6.24.2#985 )

Pentru inode_operations si file_operations la directoare am folosit
structurile generice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080823/28f525f5/attachment.html 


More information about the pso mailing list