[Ocfs2-commits] manish commits r2229 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 12 16:05:12 CDT 2005
Author: manish
Signed-off-by: mfasheh
Date: 2005-05-12 16:05:10 -0500 (Thu, 12 May 2005)
New Revision: 2229
Modified:
trunk/fs/ocfs2/proc.c
Log:
Coding style consistency
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/proc.c
===================================================================
--- trunk/fs/ocfs2/proc.c 2005-05-12 21:02:19 UTC (rev 2228)
+++ trunk/fs/ocfs2/proc.c 2005-05-12 21:05:10 UTC (rev 2229)
@@ -87,15 +87,15 @@
* ocfs_proc_init()
*
*/
-int ocfs_proc_init (void)
+int ocfs_proc_init(void)
{
struct proc_dir_entry *parent = NULL;
ocfs_proc_list *p;
struct proc_dir_entry* entry;
- mlog_entry_void ();
+ mlog_entry_void();
- parent = proc_mkdir (OCFS2_PROC_BASENAME, NULL);
+ parent = proc_mkdir(OCFS2_PROC_BASENAME, NULL);
if (parent) {
ocfs2_proc_root_dir = parent;
for (p = top_dir; p->name; p++) {
@@ -111,7 +111,7 @@
}
}
- mlog_exit_void ();
+ mlog_exit_void();
return 0;
} /* ocfs_proc_init */
@@ -119,30 +119,30 @@
* ocfs_proc_deinit()
*
*/
-void ocfs_proc_deinit (void)
+void ocfs_proc_deinit(void)
{
struct proc_dir_entry *parent = ocfs2_proc_root_dir;
ocfs_proc_list *p;
- mlog_entry_void ();
+ mlog_entry_void();
if (parent) {
for (p = top_dir; p->name; p++)
- remove_proc_entry (p->name, parent);
- remove_proc_entry (OCFS2_PROC_BASENAME, NULL);
+ remove_proc_entry(p->name, parent);
+ remove_proc_entry(OCFS2_PROC_BASENAME, NULL);
}
- mlog_exit_void ();
+ mlog_exit_void();
} /* ocfs_proc_deinit */
/*
* ocfs_proc_calc_metrics()
*
*/
-static int ocfs_proc_calc_metrics (char *page, char **start, off_t off,
- int count, int *eof, int len)
+static int ocfs_proc_calc_metrics(char *page, char **start, off_t off,
+ int count, int *eof, int len)
{
- mlog_entry_void ();
+ mlog_entry_void();
if (len <= off + count)
*eof = 1;
@@ -157,7 +157,7 @@
if (len < 0)
len = 0;
- mlog_exit_void ();
+ mlog_exit_void();
return len;
} /* ocfs_proc_calc_metrics */
@@ -172,37 +172,37 @@
int ret;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
#define ALLOC_STATS_HDR "%-25s %10u\n"
- len = sprintf (page, "%s\n", "*** Disk Allocation Stats ***");
+ len = sprintf(page, "%s\n", "*** Disk Allocation Stats ***");
- len += sprintf (page + len, "\n%s\n", "(Data Allocs)");
- len += sprintf (page + len, "%-25s %10s\n", "Local Alloc Enabled",
- osb->have_local_alloc ? "yes" : "no");
- len += sprintf (page + len, ALLOC_STATS_HDR, "Window Moves",
- atomic_read (&osb->alloc_stats.moves));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Local Allocs",
- atomic_read (&osb->alloc_stats.local_data));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Bitmap Allocs",
- atomic_read (&osb->alloc_stats.bitmap_data));
+ len += sprintf(page + len, "\n%s\n", "(Data Allocs)");
+ len += sprintf(page + len, "%-25s %10s\n", "Local Alloc Enabled",
+ osb->have_local_alloc ? "yes" : "no");
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Window Moves",
+ atomic_read(&osb->alloc_stats.moves));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Local Allocs",
+ atomic_read(&osb->alloc_stats.local_data));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Bitmap Allocs",
+ atomic_read(&osb->alloc_stats.bitmap_data));
- len += sprintf (page + len, "\n%s\n", "(Metadata Allocs)");
- len += sprintf (page + len, ALLOC_STATS_HDR, "Bitmap Allocs",
- atomic_read (&osb->alloc_stats.bitmap_meta));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Ext bitmap Allocs",
- atomic_read (&osb->alloc_stats.ext_allocs));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Ext file Extends",
- atomic_read (&osb->alloc_stats.ext_extends));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Inode bitmap Allocs",
- atomic_read (&osb->alloc_stats.inode_allocs));
- len += sprintf (page + len, ALLOC_STATS_HDR, "Inode file Extends",
- atomic_read (&osb->alloc_stats.inode_extends));
+ len += sprintf(page + len, "\n%s\n", "(Metadata Allocs)");
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Bitmap Allocs",
+ atomic_read(&osb->alloc_stats.bitmap_meta));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Ext bitmap Allocs",
+ atomic_read(&osb->alloc_stats.ext_allocs));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Ext file Extends",
+ atomic_read(&osb->alloc_stats.ext_extends));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Inode bitmap Allocs",
+ atomic_read(&osb->alloc_stats.inode_allocs));
+ len += sprintf(page + len, ALLOC_STATS_HDR, "Inode file Extends",
+ atomic_read(&osb->alloc_stats.inode_extends));
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
}
@@ -211,18 +211,18 @@
* ocfs_proc_version()
*
*/
-static int ocfs_proc_version (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_version(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
- mlog_entry_void ();
+ mlog_entry_void();
len = ocfs2_str_version(page);
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_version */
@@ -230,19 +230,19 @@
* ocfs_proc_nodenum()
*
*/
-static int ocfs_proc_nodenum (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_nodenum(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
- len = sprintf (page, "%d\n", osb->node_num);
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ len = sprintf(page, "%d\n", osb->node_num);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_nodenum */
@@ -250,19 +250,19 @@
* ocfs_proc_slotnum()
*
*/
-static int ocfs_proc_slotnum (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_slotnum(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
- len = sprintf (page, "%d\n", osb->slot_num);
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ len = sprintf(page, "%d\n", osb->slot_num);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_slotnum */
@@ -270,14 +270,14 @@
* ocfs_proc_nodename()
*
*/
-static int ocfs_proc_nodename (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_nodename(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
struct nm_node *node;
- mlog_entry_void ();
+ mlog_entry_void();
node = nm_get_node_by_num(nm_this_node());
@@ -287,9 +287,9 @@
} else
len = sprintf(page, "(unknown)\n");
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_nodename */
@@ -297,7 +297,7 @@
* ocfs_proc_add_volume()
*
*/
-void ocfs_proc_add_volume (ocfs_super * osb)
+void ocfs_proc_add_volume(ocfs_super * osb)
{
char newdir[20];
struct proc_dir_entry *parent = NULL;
@@ -306,8 +306,8 @@
mlog_entry_void();
- snprintf(newdir, sizeof(newdir), "%u_%u", MAJOR(osb->sb->s_dev),
- MINOR(osb->sb->s_dev));
+ snprintf(newdir, sizeof(newdir), "%u_%u",
+ MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev));
parent = proc_mkdir(newdir, ocfs2_proc_root_dir);
osb->proc_sub_dir = parent;
@@ -337,23 +337,23 @@
* ocfs_proc_remove_volume()
*
*/
-void ocfs_proc_remove_volume (ocfs_super * osb)
+void ocfs_proc_remove_volume(ocfs_super * osb)
{
ocfs_proc_list *p;
char dir[20];
- mlog_entry_void ();
+ mlog_entry_void();
if (osb->proc_sub_dir) {
for (p = sub_dir; p->name; p++)
- remove_proc_entry (p->name, osb->proc_sub_dir);
+ remove_proc_entry(p->name, osb->proc_sub_dir);
- snprintf (dir, sizeof(dir), "%u_%u", MAJOR(osb->sb->s_dev),
- MINOR(osb->sb->s_dev));
- remove_proc_entry (dir, ocfs2_proc_root_dir);
+ snprintf(dir, sizeof(dir), "%u_%u",
+ MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev));
+ remove_proc_entry(dir, ocfs2_proc_root_dir);
}
- mlog_exit_void ();
+ mlog_exit_void();
} /* ocfs_proc_remove_volume */
/*
@@ -379,14 +379,14 @@
* ocfs_proc_statistics()
*
*/
-static int ocfs_proc_statistics (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_statistics(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret = 0;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
#define PROC_STATS \
"Number of nodes : %u\n" \
@@ -394,13 +394,13 @@
"Volume size : %"MLFu64"\n" \
"Open Transactions: : %u\n"
- len = sprintf (page, PROC_STATS, osb->num_nodes, osb->s_clustersize,
- ocfs2_clusters_to_bytes(osb->sb, osb->num_clusters),
- atomic_read(&osb->journal->j_num_trans));
+ len = sprintf(page, PROC_STATS, osb->num_nodes, osb->s_clustersize,
+ ocfs2_clusters_to_bytes(osb->sb, osb->num_clusters),
+ atomic_read(&osb->journal->j_num_trans));
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_statistics */
@@ -408,19 +408,19 @@
* ocfs_proc_device()
*
*/
-static int ocfs_proc_device (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_device(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
- len = snprintf (page, sizeof(osb->dev_str), "%s\n", osb->dev_str);
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ len = snprintf(page, sizeof(osb->dev_str), "%s\n", osb->dev_str);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_device */
@@ -428,8 +428,8 @@
* ocfs_proc_nodes()
*
*/
-static int ocfs_proc_nodes (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_nodes(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len = 0;
int i;
@@ -437,7 +437,7 @@
ocfs_super *osb = data;
char mount;
- mlog_entry_void ();
+ mlog_entry_void();
if (osb) {
for (i = 0; i < OCFS_NODE_MAP_MAX_NODES; i++) {
@@ -446,9 +446,9 @@
}
}
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_nodes */
@@ -456,19 +456,19 @@
* ocfs_proc_label()
*
*/
-static int ocfs_proc_label (char *page, char **start, off_t off,
- int count, int *eof, void *data)
+static int ocfs_proc_label(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
int len;
int ret;
ocfs_super *osb = data;
- mlog_entry_void ();
+ mlog_entry_void();
- len = sprintf (page, "%s\n", osb->vol_label);
- ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
+ len = sprintf(page, "%s\n", osb->vol_label);
+ ret = ocfs_proc_calc_metrics(page, start, off, count, eof, len);
- mlog_exit (ret);
+ mlog_exit(ret);
return ret;
} /* ocfs_proc_label */
More information about the Ocfs2-commits
mailing list