Hello, How do you want me to do this? I started writing stuff and then realized I've got two options
1) for every superblock we create a directory inside /sys/fs/btrfs with the sb->s_id (so the device name), and then in there we have the random info like blocks_used, total_blocks, etc. Then for every subvol/snapshot created inside that super block (ie every btrfs_root item associated with that super_block) we have another sysfs directory, with all of its individual information, and do something ugly like root->inode->i_dentry->d_name.name for the name of the directory. The only problem I'm having with this is where to store the kobj for the super_block. I could keep a running list of the super_block kobj's within the sysfs code, or change btrfs_super_block into btrfs_super_block_item and make a seperate btrfs_super_block struct for the in memory superblock. 2) ignore the superblock, and just create sysfs directories for the btrfs_root's. This means the only ugly thing we are doing is getting the root item's name, we dont have to do all the weird stuff to keep track of the super block, but we lose the ability to report certain things about the superblock (not that I think that matters too much b/c df and such should take care of all of that anyway). Let me know which way you want to go and I'll do whats needed. Josef P.S. is there a public IRC channel/AIM/gtalk/anything I can reach you on so I don't have to send all these quick question emails? _______________________________________________ Btrfs-devel mailing list [email protected] http://oss.oracle.com/mailman/listinfo/btrfs-devel
