]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ceph: whitespace cleanup
authorSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 17:25:11 +0000 (10:25 -0700)
committerSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 17:25:11 +0000 (10:25 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/addr.c
fs/ceph/debugfs.c
fs/ceph/file.c
fs/ceph/mds_client.c
fs/ceph/messenger.c
fs/ceph/osd_client.c
fs/ceph/osdmap.c

index e00797eed29c076d2643319f78a6637eb8e772ff..5598a0d02295d11eaa3646e137497a083910251e 100644 (file)
@@ -309,7 +309,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping,
                        zero_user_segment(page, s, PAGE_CACHE_SIZE);
                }
 
-               if (add_to_page_cache_lru(page, mapping, page->index, GFP_NOFS)) {
+               if (add_to_page_cache_lru(page, mapping, page->index,
+                                         GFP_NOFS)) {
                        page_cache_release(page);
                        dout("readpages %p add_to_page_cache failed %p\n",
                             inode, page);
@@ -797,9 +798,12 @@ get_more_pages:
                        dout("%p will write page %p idx %lu\n",
                             inode, page, page->index);
 
-                       writeback_stat = atomic_long_inc_return(&client->writeback_count);
-                       if (writeback_stat > CONGESTION_ON_THRESH(client->mount_args->congestion_kb)) {
-                               set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC);
+                       writeback_stat =
+                              atomic_long_inc_return(&client->writeback_count);
+                       if (writeback_stat > CONGESTION_ON_THRESH(
+                                   client->mount_args->congestion_kb)) {
+                               set_bdi_congested(&client->backing_dev_info,
+                                                 BLK_RW_ASYNC);
                        }
 
                        set_page_writeback(page);
@@ -1036,7 +1040,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
                *pagep = page;
 
                dout("write_begin file %p inode %p page %p %d~%d\n", file,
-               inode, page, (int)pos, (int)len);
+                    inode, page, (int)pos, (int)len);
 
                r = ceph_update_writeable_page(file, pos, len, page);
        } while (r == -EAGAIN);
index 968dc5a86c3e56caeeb0a09c0b0295be4c1319c9..360c4f22718d5e079c2ce99c2484af9376751a76 100644 (file)
@@ -291,7 +291,7 @@ static int dentry_lru_show(struct seq_file *s, void *ptr)
        return 0;
 }
 
-#define DEFINE_SHOW_FUNC(name)                                                 \
+#define DEFINE_SHOW_FUNC(name)                                         \
 static int name##_open(struct inode *inode, struct file *file)         \
 {                                                                      \
        struct seq_file *sf;                                            \
@@ -432,11 +432,12 @@ int ceph_debugfs_client_init(struct ceph_client *client)
        if (!client->debugfs_caps)
                goto out;
 
-       client->debugfs_congestion_kb = debugfs_create_file("writeback_congestion_kb",
-                                                  0600,
-                                                  client->debugfs_dir,
-                                                  client,
-                                                  &congestion_kb_fops);
+       client->debugfs_congestion_kb =
+               debugfs_create_file("writeback_congestion_kb",
+                                   0600,
+                                   client->debugfs_dir,
+                                   client,
+                                   &congestion_kb_fops);
        if (!client->debugfs_congestion_kb)
                goto out;
 
@@ -466,7 +467,7 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
        debugfs_remove(client->debugfs_dir);
 }
 
-#else  // CONFIG_DEBUG_FS
+#else  /* CONFIG_DEBUG_FS */
 
 int __init ceph_debugfs_init(void)
 {
@@ -486,4 +487,4 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
 {
 }
 
-#endif  // CONFIG_DEBUG_FS
+#endif  /* CONFIG_DEBUG_FS */
index e850e63f9563b316c1b5e027ec7d3fdc053fdf9a..8c044a4f045751c62420e67664705f981efe238a 100644 (file)
@@ -665,7 +665,7 @@ more:
                 * throw out any page cache pages in this range. this
                 * may block.
                 */
-               truncate_inode_pages_range(inode->i_mapping, pos, 
+               truncate_inode_pages_range(inode->i_mapping, pos,
                                           (pos+len) | (PAGE_CACHE_SIZE-1));
        } else {
                pages = ceph_alloc_page_vector(num_pages, GFP_NOFS);
index 9f0833e1631a068fa98eb6fdda2801342742e541..a75ddbf9fe3743973c6fd02724f005b8504c3738 100644 (file)
@@ -1985,8 +1985,9 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
         */
        if (result == -ESTALE) {
                dout("got ESTALE on request %llu", req->r_tid);
-               if (!req->r_inode) ; //do nothing; not an authority problem
-               else if (req->r_direct_mode != USE_AUTH_MDS) {
+               if (!req->r_inode) {
+                       /* do nothing; not an authority problem */
+               } else if (req->r_direct_mode != USE_AUTH_MDS) {
                        dout("not using auth, setting for that now");
                        req->r_direct_mode = USE_AUTH_MDS;
                        __do_request(mdsc, req);
index 79b0995dc825bb66651405ad42336b5b704abaf8..2502d76fcec175ddb8500bcd1863c52add1208e5 100644 (file)
@@ -1302,8 +1302,8 @@ static void process_ack(struct ceph_connection *con)
 
 
 static int read_partial_message_section(struct ceph_connection *con,
-                                       struct kvec *section, unsigned int sec_len,
-                                       u32 *crc)
+                                       struct kvec *section,
+                                       unsigned int sec_len, u32 *crc)
 {
        int left;
        int ret;
@@ -1434,7 +1434,8 @@ static int read_partial_message(struct ceph_connection *con)
 
        /* middle */
        if (m->middle) {
-               ret = read_partial_message_section(con, &m->middle->vec, middle_len,
+               ret = read_partial_message_section(con, &m->middle->vec,
+                                                  middle_len,
                                                   &con->in_middle_crc);
                if (ret <= 0)
                        return ret;
@@ -1920,7 +1921,7 @@ out:
        /*
         * in case we faulted due to authentication, invalidate our
         * current tickets so that we can get new ones.
-         */
+        */
        if (con->auth_retry && con->ops->invalidate_authorizer) {
                dout("calling invalidate_authorizer()\n");
                con->ops->invalidate_authorizer(con);
index 707d2dbd87768542e87303c1c8ebe20060abf51b..bed6391e52c7109c966d5e642e472c665bd7d1f5 100644 (file)
@@ -1473,8 +1473,8 @@ static void put_osd_con(struct ceph_connection *con)
  * authentication
  */
 static int get_authorizer(struct ceph_connection *con,
-                         void **buf, int *len, int *proto,
-                         void **reply_buf, int *reply_len, int force_new)
+                         void **buf, int *len, int *proto,
+                         void **reply_buf, int *reply_len, int force_new)
 {
        struct ceph_osd *o = con->private;
        struct ceph_osd_client *osdc = o->o_osdc;
@@ -1494,7 +1494,7 @@ static int get_authorizer(struct ceph_connection *con,
                        &o->o_authorizer_reply_buf,
                        &o->o_authorizer_reply_buf_len);
                if (ret)
-               return ret;
+                       return ret;
        }
 
        *proto = ac->protocol;
index e94c6fb2e2a41e87c1032746c808b9d29bd1b469..e31f118f1392988351257d2385863c37228bc7df 100644 (file)
@@ -855,7 +855,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
                                                node)->pgid, pgid) <= 0) {
                        struct ceph_pg_mapping *cur =
                                rb_entry(rbp, struct ceph_pg_mapping, node);
-                       
+
                        rbp = rb_next(rbp);
                        dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid);
                        rb_erase(&cur->node, &map->pg_temp);