aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2010-12-09 09:03:57 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 05:36:24 -0500
commit81e84650c200de0695372461964dd960365696db (patch)
treec57e51e8c1f540321fd6e8d43c304a95f7fa5ebe /drivers/block/drbd/drbd_main.c
parent6184ea2145609b4ad63b141bf1f8124135ff4949 (diff)
drbd: Use the standard bool, true, and false keywords
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index a101dceb2d49..7eb447d20cce 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -456,7 +456,7 @@ void tl_restart(struct drbd_conf *mdev, enum drbd_req_event what)
456} 456}
457 457
458/** 458/**
459 * cl_wide_st_chg() - TRUE if the state change is a cluster wide one 459 * cl_wide_st_chg() - true if the state change is a cluster wide one
460 * @mdev: DRBD device. 460 * @mdev: DRBD device.
461 * @os: old (current) state. 461 * @os: old (current) state.
462 * @ns: new (wanted) state. 462 * @ns: new (wanted) state.
@@ -1623,7 +1623,7 @@ int drbd_thread_start(struct drbd_thread *thi)
1623 if (!try_module_get(THIS_MODULE)) { 1623 if (!try_module_get(THIS_MODULE)) {
1624 dev_err(DEV, "Failed to get module reference in drbd_thread_start\n"); 1624 dev_err(DEV, "Failed to get module reference in drbd_thread_start\n");
1625 spin_unlock_irqrestore(&thi->t_lock, flags); 1625 spin_unlock_irqrestore(&thi->t_lock, flags);
1626 return FALSE; 1626 return false;
1627 } 1627 }
1628 1628
1629 init_completion(&thi->stop); 1629 init_completion(&thi->stop);
@@ -1640,7 +1640,7 @@ int drbd_thread_start(struct drbd_thread *thi)
1640 dev_err(DEV, "Couldn't start thread\n"); 1640 dev_err(DEV, "Couldn't start thread\n");
1641 1641
1642 module_put(THIS_MODULE); 1642 module_put(THIS_MODULE);
1643 return FALSE; 1643 return false;
1644 } 1644 }
1645 spin_lock_irqsave(&thi->t_lock, flags); 1645 spin_lock_irqsave(&thi->t_lock, flags);
1646 thi->task = nt; 1646 thi->task = nt;
@@ -1660,7 +1660,7 @@ int drbd_thread_start(struct drbd_thread *thi)
1660 break; 1660 break;
1661 } 1661 }
1662 1662
1663 return TRUE; 1663 return true;
1664} 1664}
1665 1665
1666 1666
@@ -1758,8 +1758,8 @@ int _drbd_send_cmd(struct drbd_conf *mdev, struct socket *sock,
1758{ 1758{
1759 int sent, ok; 1759 int sent, ok;
1760 1760
1761 ERR_IF(!h) return FALSE; 1761 ERR_IF(!h) return false;
1762 ERR_IF(!size) return FALSE; 1762 ERR_IF(!size) return false;
1763 1763
1764 h->magic = BE_DRBD_MAGIC; 1764 h->magic = BE_DRBD_MAGIC;
1765 h->command = cpu_to_be16(cmd); 1765 h->command = cpu_to_be16(cmd);
@@ -2196,14 +2196,14 @@ int _drbd_send_bitmap(struct drbd_conf *mdev)
2196 struct p_header80 *p; 2196 struct p_header80 *p;
2197 int ret; 2197 int ret;
2198 2198
2199 ERR_IF(!mdev->bitmap) return FALSE; 2199 ERR_IF(!mdev->bitmap) return false;
2200 2200
2201 /* maybe we should use some per thread scratch page, 2201 /* maybe we should use some per thread scratch page,
2202 * and allocate that during initial device creation? */ 2202 * and allocate that during initial device creation? */
2203 p = (struct p_header80 *) __get_free_page(GFP_NOIO); 2203 p = (struct p_header80 *) __get_free_page(GFP_NOIO);
2204 if (!p) { 2204 if (!p) {
2205 dev_err(DEV, "failed to allocate one page buffer in %s\n", __func__); 2205 dev_err(DEV, "failed to allocate one page buffer in %s\n", __func__);
2206 return FALSE; 2206 return false;
2207 } 2207 }
2208 2208
2209 if (get_ldev(mdev)) { 2209 if (get_ldev(mdev)) {
@@ -2256,7 +2256,7 @@ int drbd_send_b_ack(struct drbd_conf *mdev, u32 barrier_nr, u32 set_size)
2256 p.set_size = cpu_to_be32(set_size); 2256 p.set_size = cpu_to_be32(set_size);
2257 2257
2258 if (mdev->state.conn < C_CONNECTED) 2258 if (mdev->state.conn < C_CONNECTED)
2259 return FALSE; 2259 return false;
2260 ok = drbd_send_cmd(mdev, USE_META_SOCKET, P_BARRIER_ACK, 2260 ok = drbd_send_cmd(mdev, USE_META_SOCKET, P_BARRIER_ACK,
2261 (struct p_header80 *)&p, sizeof(p)); 2261 (struct p_header80 *)&p, sizeof(p));
2262 return ok; 2262 return ok;
@@ -2284,7 +2284,7 @@ static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packets cmd,
2284 p.seq_num = cpu_to_be32(atomic_add_return(1, &mdev->packet_seq)); 2284 p.seq_num = cpu_to_be32(atomic_add_return(1, &mdev->packet_seq));
2285 2285
2286 if (!mdev->meta.socket || mdev->state.conn < C_CONNECTED) 2286 if (!mdev->meta.socket || mdev->state.conn < C_CONNECTED)
2287 return FALSE; 2287 return false;
2288 ok = drbd_send_cmd(mdev, USE_META_SOCKET, cmd, 2288 ok = drbd_send_cmd(mdev, USE_META_SOCKET, cmd,
2289 (struct p_header80 *)&p, sizeof(p)); 2289 (struct p_header80 *)&p, sizeof(p));
2290 return ok; 2290 return ok;
@@ -2390,8 +2390,8 @@ int drbd_send_ov_request(struct drbd_conf *mdev, sector_t sector, int size)
2390} 2390}
2391 2391
2392/* called on sndtimeo 2392/* called on sndtimeo
2393 * returns FALSE if we should retry, 2393 * returns false if we should retry,
2394 * TRUE if we think connection is dead 2394 * true if we think connection is dead
2395 */ 2395 */
2396static int we_should_drop_the_connection(struct drbd_conf *mdev, struct socket *sock) 2396static int we_should_drop_the_connection(struct drbd_conf *mdev, struct socket *sock)
2397{ 2397{
@@ -2404,7 +2404,7 @@ static int we_should_drop_the_connection(struct drbd_conf *mdev, struct socket *
2404 || mdev->state.conn < C_CONNECTED; 2404 || mdev->state.conn < C_CONNECTED;
2405 2405
2406 if (drop_it) 2406 if (drop_it)
2407 return TRUE; 2407 return true;
2408 2408
2409 drop_it = !--mdev->ko_count; 2409 drop_it = !--mdev->ko_count;
2410 if (!drop_it) { 2410 if (!drop_it) {
@@ -3283,7 +3283,7 @@ struct drbd_conf *drbd_new_device(unsigned int minor)
3283 goto out_no_disk; 3283 goto out_no_disk;
3284 mdev->vdisk = disk; 3284 mdev->vdisk = disk;
3285 3285
3286 set_disk_ro(disk, TRUE); 3286 set_disk_ro(disk, true);
3287 3287
3288 disk->queue = q; 3288 disk->queue = q;
3289 disk->major = DRBD_MAJOR; 3289 disk->major = DRBD_MAJOR;
@@ -3560,7 +3560,7 @@ void drbd_md_sync(struct drbd_conf *mdev)
3560 if (!drbd_md_sync_page_io(mdev, mdev->ldev, sector, WRITE)) { 3560 if (!drbd_md_sync_page_io(mdev, mdev->ldev, sector, WRITE)) {
3561 /* this was a try anyways ... */ 3561 /* this was a try anyways ... */
3562 dev_err(DEV, "meta data update failed!\n"); 3562 dev_err(DEV, "meta data update failed!\n");
3563 drbd_chk_io_error(mdev, 1, TRUE); 3563 drbd_chk_io_error(mdev, 1, true);
3564 } 3564 }
3565 3565
3566 /* Update mdev->ldev->md.la_size_sect, 3566 /* Update mdev->ldev->md.la_size_sect,