diff options
author | Tristan Ye <tristan.ye@oracle.com> | 2011-05-24 03:25:54 -0400 |
---|---|---|
committer | Tristan Ye <tristan.ye@oracle.com> | 2011-05-25 00:18:02 -0400 |
commit | 3e5db17d4da7f45c454940096d9e429cca12ef9f (patch) | |
tree | e808424de357b1140817341675b8624292c6c7b2 /fs/ocfs2/ocfs2_ioctl.h | |
parent | 8aa1fa360d0e2b31891f180d8b8e0f8d38f9243c (diff) |
Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl.
The new code is dedicated to calculate free inodes number of all inode_allocs,
then return the info to userpace in terms of an array.
Specially, flag 'OCFS2_INFO_FL_NON_COHERENT', manipulated by '--cluster-coherent'
from userspace, is now going to be involved. setting the flag on means no cluster
coherency considered, usually, userspace tools choose none-coherency strategy by
default for the sake of performace.
Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_ioctl.h')
-rw-r--r-- | fs/ocfs2/ocfs2_ioctl.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_ioctl.h b/fs/ocfs2/ocfs2_ioctl.h index b46f39bf7438..6b4b39a83662 100644 --- a/fs/ocfs2/ocfs2_ioctl.h +++ b/fs/ocfs2/ocfs2_ioctl.h | |||
@@ -142,6 +142,16 @@ struct ocfs2_info_journal_size { | |||
142 | __u64 ij_journal_size; | 142 | __u64 ij_journal_size; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | struct ocfs2_info_freeinode { | ||
146 | struct ocfs2_info_request ifi_req; | ||
147 | struct ocfs2_info_local_freeinode { | ||
148 | __u64 lfi_total; | ||
149 | __u64 lfi_free; | ||
150 | } ifi_stat[OCFS2_MAX_SLOTS]; | ||
151 | __u32 ifi_slotnum; /* out */ | ||
152 | __u32 ifi_pad; | ||
153 | }; | ||
154 | |||
145 | /* Codes for ocfs2_info_request */ | 155 | /* Codes for ocfs2_info_request */ |
146 | enum ocfs2_info_type { | 156 | enum ocfs2_info_type { |
147 | OCFS2_INFO_CLUSTERSIZE = 1, | 157 | OCFS2_INFO_CLUSTERSIZE = 1, |
@@ -151,6 +161,7 @@ enum ocfs2_info_type { | |||
151 | OCFS2_INFO_UUID, | 161 | OCFS2_INFO_UUID, |
152 | OCFS2_INFO_FS_FEATURES, | 162 | OCFS2_INFO_FS_FEATURES, |
153 | OCFS2_INFO_JOURNAL_SIZE, | 163 | OCFS2_INFO_JOURNAL_SIZE, |
164 | OCFS2_INFO_FREEINODE, | ||
154 | OCFS2_INFO_NUM_TYPES | 165 | OCFS2_INFO_NUM_TYPES |
155 | }; | 166 | }; |
156 | 167 | ||