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>
31 /*****************************************************************************
34 * Define structures for taskclass root directory and its magic files
35 * In taskclasses, there is one set of magic files, created automatically under
36 * the taskclass root (upon classtype registration) and each directory (class)
37 * created subsequently. However, classtypes can also choose to have different
38 * sets of magic files created under their root and other directories under
39 * root using their mkdir function. RCFS only provides helper functions for
40 * creating the root directory and its magic files
42 *****************************************************************************/
44 #define TC_FILE_MODE (S_IFREG | S_IRUGO | S_IWUSR)
47 struct rcfs_magf tc_rootdesc[NR_TCROOTMF] = {
48 /* First entry must be root */
50 // .name = should not be set, copy from classtype name
51 .mode = RCFS_DEFAULT_DIR_MODE,
52 .i_op = &rcfs_dir_inode_operations,
53 .i_fop = &simple_dir_operations,
55 /* Rest are root's magic files */
59 .i_fop = &target_fileops,
60 .i_op = &rcfs_file_inode_operations,
65 .i_fop = &members_fileops,
66 .i_op = &rcfs_file_inode_operations,
71 .i_fop = &stats_fileops,
72 .i_op = &rcfs_file_inode_operations,
77 .i_fop = &shares_fileops,
78 .i_op = &rcfs_file_inode_operations,
80 // Config should be made available only at the root level
81 // Make sure this is the last entry, as rcfs_mkdir depends on it
85 .i_fop = &config_fileops,
86 .i_op = &rcfs_file_inode_operations,
90 struct rcfs_mfdesc tc_mfdesc = {
91 .rootmf = tc_rootdesc,
92 .rootmflen = NR_TCROOTMF,