Skip to content

Commit 213c99e

Browse files
committed
ceph: whitespace cleanup
Signed-off-by: Sage Weil <sage@newdream.net>
1 parent 40819f6 commit 213c99e

7 files changed

Lines changed: 31 additions & 24 deletions

File tree

‎fs/ceph/addr.c‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping,
309309
zero_user_segment(page, s, PAGE_CACHE_SIZE);
310310
}
311311

312-
if (add_to_page_cache_lru(page, mapping, page->index, GFP_NOFS)) {
312+
if (add_to_page_cache_lru(page, mapping, page->index,
313+
GFP_NOFS)) {
313314
page_cache_release(page);
314315
dout("readpages %p add_to_page_cache failed %p\n",
315316
inode, page);
@@ -797,9 +798,12 @@ static int ceph_writepages_start(struct address_space *mapping,
797798
dout("%p will write page %p idx %lu\n",
798799
inode, page, page->index);
799800

800-
writeback_stat = atomic_long_inc_return(&client->writeback_count);
801-
if (writeback_stat > CONGESTION_ON_THRESH(client->mount_args->congestion_kb)) {
802-
set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC);
801+
writeback_stat =
802+
atomic_long_inc_return(&client->writeback_count);
803+
if (writeback_stat > CONGESTION_ON_THRESH(
804+
client->mount_args->congestion_kb)) {
805+
set_bdi_congested(&client->backing_dev_info,
806+
BLK_RW_ASYNC);
803807
}
804808

805809
set_page_writeback(page);
@@ -1036,7 +1040,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
10361040
*pagep = page;
10371041

10381042
dout("write_begin file %p inode %p page %p %d~%d\n", file,
1039-
inode, page, (int)pos, (int)len);
1043+
inode, page, (int)pos, (int)len);
10401044

10411045
r = ceph_update_writeable_page(file, pos, len, page);
10421046
} while (r == -EAGAIN);

‎fs/ceph/debugfs.c‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int dentry_lru_show(struct seq_file *s, void *ptr)
291291
return 0;
292292
}
293293

294-
#define DEFINE_SHOW_FUNC(name) \
294+
#define DEFINE_SHOW_FUNC(name) \
295295
static int name##_open(struct inode *inode, struct file *file) \
296296
{ \
297297
struct seq_file *sf; \
@@ -432,11 +432,12 @@ int ceph_debugfs_client_init(struct ceph_client *client)
432432
if (!client->debugfs_caps)
433433
goto out;
434434

435-
client->debugfs_congestion_kb = debugfs_create_file("writeback_congestion_kb",
436-
0600,
437-
client->debugfs_dir,
438-
client,
439-
&congestion_kb_fops);
435+
client->debugfs_congestion_kb =
436+
debugfs_create_file("writeback_congestion_kb",
437+
0600,
438+
client->debugfs_dir,
439+
client,
440+
&congestion_kb_fops);
440441
if (!client->debugfs_congestion_kb)
441442
goto out;
442443

@@ -466,7 +467,7 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
466467
debugfs_remove(client->debugfs_dir);
467468
}
468469

469-
#else // CONFIG_DEBUG_FS
470+
#else /* CONFIG_DEBUG_FS */
470471

471472
int __init ceph_debugfs_init(void)
472473
{
@@ -486,4 +487,4 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
486487
{
487488
}
488489

489-
#endif // CONFIG_DEBUG_FS
490+
#endif /* CONFIG_DEBUG_FS */

‎fs/ceph/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
665665
* throw out any page cache pages in this range. this
666666
* may block.
667667
*/
668-
truncate_inode_pages_range(inode->i_mapping, pos,
668+
truncate_inode_pages_range(inode->i_mapping, pos,
669669
(pos+len) | (PAGE_CACHE_SIZE-1));
670670
} else {
671671
pages = ceph_alloc_page_vector(num_pages, GFP_NOFS);

‎fs/ceph/mds_client.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,8 +1985,9 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
19851985
*/
19861986
if (result == -ESTALE) {
19871987
dout("got ESTALE on request %llu", req->r_tid);
1988-
if (!req->r_inode) ; //do nothing; not an authority problem
1989-
else if (req->r_direct_mode != USE_AUTH_MDS) {
1988+
if (!req->r_inode) {
1989+
/* do nothing; not an authority problem */
1990+
} else if (req->r_direct_mode != USE_AUTH_MDS) {
19901991
dout("not using auth, setting for that now");
19911992
req->r_direct_mode = USE_AUTH_MDS;
19921993
__do_request(mdsc, req);

‎fs/ceph/messenger.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,8 @@ static void process_ack(struct ceph_connection *con)
13021302

13031303

13041304
static int read_partial_message_section(struct ceph_connection *con,
1305-
struct kvec *section, unsigned int sec_len,
1306-
u32 *crc)
1305+
struct kvec *section,
1306+
unsigned int sec_len, u32 *crc)
13071307
{
13081308
int left;
13091309
int ret;
@@ -1434,7 +1434,8 @@ static int read_partial_message(struct ceph_connection *con)
14341434

14351435
/* middle */
14361436
if (m->middle) {
1437-
ret = read_partial_message_section(con, &m->middle->vec, middle_len,
1437+
ret = read_partial_message_section(con, &m->middle->vec,
1438+
middle_len,
14381439
&con->in_middle_crc);
14391440
if (ret <= 0)
14401441
return ret;
@@ -1920,7 +1921,7 @@ static void ceph_fault(struct ceph_connection *con)
19201921
/*
19211922
* in case we faulted due to authentication, invalidate our
19221923
* current tickets so that we can get new ones.
1923-
*/
1924+
*/
19241925
if (con->auth_retry && con->ops->invalidate_authorizer) {
19251926
dout("calling invalidate_authorizer()\n");
19261927
con->ops->invalidate_authorizer(con);

‎fs/ceph/osd_client.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,8 @@ static void put_osd_con(struct ceph_connection *con)
14731473
* authentication
14741474
*/
14751475
static int get_authorizer(struct ceph_connection *con,
1476-
void **buf, int *len, int *proto,
1477-
void **reply_buf, int *reply_len, int force_new)
1476+
void **buf, int *len, int *proto,
1477+
void **reply_buf, int *reply_len, int force_new)
14781478
{
14791479
struct ceph_osd *o = con->private;
14801480
struct ceph_osd_client *osdc = o->o_osdc;
@@ -1494,7 +1494,7 @@ static int get_authorizer(struct ceph_connection *con,
14941494
&o->o_authorizer_reply_buf,
14951495
&o->o_authorizer_reply_buf_len);
14961496
if (ret)
1497-
return ret;
1497+
return ret;
14981498
}
14991499

15001500
*proto = ac->protocol;

‎fs/ceph/osdmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
855855
node)->pgid, pgid) <= 0) {
856856
struct ceph_pg_mapping *cur =
857857
rb_entry(rbp, struct ceph_pg_mapping, node);
858-
858+
859859
rbp = rb_next(rbp);
860860
dout(" removed pg_temp %llx\n", *(u64 *)&cur->pgid);
861861
rb_erase(&cur->node, &map->pg_temp);

0 commit comments

Comments
 (0)