4 * Copyright (C) Shailabh Nagar, IBM Corp. 2004
5 * (C) Vivek Kashyap, IBM Corp. 2004
6 * (C) Chandra Seetharaman, IBM Corp. 2004
7 * (C) Hubertus Franke, IBM Corp. 2004
10 * define magic fileops for taskclass classtype
12 * Latest version, more details at http://ckrm.sf.net
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
28 #include <linux/rcfs.h>
29 #include <linux/ckrm_tc.h>
32 /*******************************************************************************
35 * Define structures for taskclass root directory and its magic files
36 * In taskclasses, there is one set of magic files, created automatically under
37 * the taskclass root (upon classtype registration) and each directory (class)
38 * created subsequently. However, classtypes can also choose to have different
39 * sets of magic files created under their root and other directories under root
40 * using their mkdir function. RCFS only provides helper functions for creating
41 * the root directory and its magic files
43 *******************************************************************************/
45 #define TC_FILE_MODE (S_IFREG | S_IRUGO | S_IWUSR)
48 struct rcfs_magf tc_rootdesc[NR_TCROOTMF] = {
49 /* First entry must be root */
51 // .name = should not be set, copy from classtype name
52 .mode = RCFS_DEFAULT_DIR_MODE,
53 .i_op = &rcfs_dir_inode_operations,
54 .i_fop = &simple_dir_operations,
56 /* Rest are root's magic files */
60 .i_fop = &target_fileops,
61 .i_op = &rcfs_file_inode_operations,
66 .i_fop = &config_fileops,
67 .i_op = &rcfs_file_inode_operations,
72 .i_fop = &members_fileops,
73 .i_op = &rcfs_file_inode_operations,
78 .i_fop = &stats_fileops,
79 .i_op = &rcfs_file_inode_operations,
84 .i_fop = &shares_fileops,
85 .i_op = &rcfs_file_inode_operations,
89 struct rcfs_mfdesc tc_mfdesc = {
90 .rootmf = tc_rootdesc,
91 .rootmflen = NR_TCROOTMF,