ceph: whitespace cleanup

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2010-08-03 10:25:11 -07:00
parent 40819f6fb2
commit 213c99ee0c
7 changed files with 31 additions and 24 deletions

View file

@ -309,7 +309,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping,
zero_user_segment(page, s, PAGE_CACHE_SIZE); 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); page_cache_release(page);
dout("readpages %p add_to_page_cache failed %p\n", dout("readpages %p add_to_page_cache failed %p\n",
inode, page); inode, page);
@ -797,9 +798,12 @@ static int ceph_writepages_start(struct address_space *mapping,
dout("%p will write page %p idx %lu\n", dout("%p will write page %p idx %lu\n",
inode, page, page->index); inode, page, page->index);
writeback_stat = atomic_long_inc_return(&client->writeback_count); writeback_stat =
if (writeback_stat > CONGESTION_ON_THRESH(client->mount_args->congestion_kb)) { atomic_long_inc_return(&client->writeback_count);
set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC); 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); set_page_writeback(page);

View file

@ -432,7 +432,8 @@ int ceph_debugfs_client_init(struct ceph_client *client)
if (!client->debugfs_caps) if (!client->debugfs_caps)
goto out; goto out;
client->debugfs_congestion_kb = debugfs_create_file("writeback_congestion_kb", client->debugfs_congestion_kb =
debugfs_create_file("writeback_congestion_kb",
0600, 0600,
client->debugfs_dir, client->debugfs_dir,
client, client,
@ -466,7 +467,7 @@ void ceph_debugfs_client_cleanup(struct ceph_client *client)
debugfs_remove(client->debugfs_dir); debugfs_remove(client->debugfs_dir);
} }
#else // CONFIG_DEBUG_FS #else /* CONFIG_DEBUG_FS */
int __init ceph_debugfs_init(void) 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 */

View file

@ -1985,8 +1985,9 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)
*/ */
if (result == -ESTALE) { if (result == -ESTALE) {
dout("got ESTALE on request %llu", req->r_tid); dout("got ESTALE on request %llu", req->r_tid);
if (!req->r_inode) ; //do nothing; not an authority problem if (!req->r_inode) {
else if (req->r_direct_mode != USE_AUTH_MDS) { /* do nothing; not an authority problem */
} else if (req->r_direct_mode != USE_AUTH_MDS) {
dout("not using auth, setting for that now"); dout("not using auth, setting for that now");
req->r_direct_mode = USE_AUTH_MDS; req->r_direct_mode = USE_AUTH_MDS;
__do_request(mdsc, req); __do_request(mdsc, req);

View file

@ -1302,8 +1302,8 @@ static void process_ack(struct ceph_connection *con)
static int read_partial_message_section(struct ceph_connection *con, static int read_partial_message_section(struct ceph_connection *con,
struct kvec *section, unsigned int sec_len, struct kvec *section,
u32 *crc) unsigned int sec_len, u32 *crc)
{ {
int left; int left;
int ret; int ret;
@ -1434,7 +1434,8 @@ static int read_partial_message(struct ceph_connection *con)
/* middle */ /* middle */
if (m->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); &con->in_middle_crc);
if (ret <= 0) if (ret <= 0)
return ret; return ret;