aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_worker.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-01-25 09:37:43 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-08-29 05:26:55 -0400
commit8554df1c6d3bb7686b39ed775772f507fa857c19 (patch)
tree50a85c4313859c6104718c7c680ac33a2584a835 /drivers/block/drbd/drbd_worker.c
parentbb3bfe96144a4535d47ccfea444bc1ef8e02f4e3 (diff)
drbd: Convert all constants in enum drbd_req_event to upper case
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_worker.c')
-rw-r--r--drivers/block/drbd/drbd_worker.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 1ddf6b61b20b..550617b1a39c 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -209,12 +209,12 @@ void drbd_endio_pri(struct bio *bio, int error)
209 /* to avoid recursion in __req_mod */ 209 /* to avoid recursion in __req_mod */
210 if (unlikely(error)) { 210 if (unlikely(error)) {
211 what = (bio_data_dir(bio) == WRITE) 211 what = (bio_data_dir(bio) == WRITE)
212 ? write_completed_with_error 212 ? WRITE_COMPLETED_WITH_ERROR
213 : (bio_rw(bio) == READ) 213 : (bio_rw(bio) == READ)
214 ? read_completed_with_error 214 ? READ_COMPLETED_WITH_ERROR
215 : read_ahead_completed_with_error; 215 : READ_AHEAD_COMPLETED_WITH_ERROR;
216 } else 216 } else
217 what = completed_ok; 217 what = COMPLETED_OK;
218 218
219 bio_put(req->private_bio); 219 bio_put(req->private_bio);
220 req->private_bio = ERR_PTR(error); 220 req->private_bio = ERR_PTR(error);
@@ -238,7 +238,7 @@ int w_read_retry_remote(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
238 238
239 spin_lock_irq(&mdev->req_lock); 239 spin_lock_irq(&mdev->req_lock);
240 if (cancel || mdev->state.pdsk != D_UP_TO_DATE) { 240 if (cancel || mdev->state.pdsk != D_UP_TO_DATE) {
241 _req_mod(req, read_retry_remote_canceled); 241 _req_mod(req, READ_RETRY_REMOTE_CANCELED);
242 spin_unlock_irq(&mdev->req_lock); 242 spin_unlock_irq(&mdev->req_lock);
243 return 1; 243 return 1;
244 } 244 }
@@ -1243,12 +1243,12 @@ int w_send_oos(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
1243 int ok; 1243 int ok;
1244 1244
1245 if (unlikely(cancel)) { 1245 if (unlikely(cancel)) {
1246 req_mod(req, send_canceled); 1246 req_mod(req, SEND_CANCELED);
1247 return 1; 1247 return 1;
1248 } 1248 }
1249 1249
1250 ok = drbd_send_oos(mdev, req); 1250 ok = drbd_send_oos(mdev, req);
1251 req_mod(req, oos_handed_to_network); 1251 req_mod(req, OOS_HANDED_TO_NETWORK);
1252 1252
1253 return ok; 1253 return ok;
1254} 1254}
@@ -1265,12 +1265,12 @@ int w_send_dblock(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
1265 int ok; 1265 int ok;
1266 1266
1267 if (unlikely(cancel)) { 1267 if (unlikely(cancel)) {
1268 req_mod(req, send_canceled); 1268 req_mod(req, SEND_CANCELED);
1269 return 1; 1269 return 1;
1270 } 1270 }
1271 1271
1272 ok = drbd_send_dblock(mdev, req); 1272 ok = drbd_send_dblock(mdev, req);
1273 req_mod(req, ok ? handed_over_to_network : send_failed); 1273 req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED);
1274 1274
1275 return ok; 1275 return ok;
1276} 1276}
@@ -1287,7 +1287,7 @@ int w_send_read_req(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
1287 int ok; 1287 int ok;
1288 1288
1289 if (unlikely(cancel)) { 1289 if (unlikely(cancel)) {
1290 req_mod(req, send_canceled); 1290 req_mod(req, SEND_CANCELED);
1291 return 1; 1291 return 1;
1292 } 1292 }
1293 1293
@@ -1300,7 +1300,7 @@ int w_send_read_req(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
1300 if (mdev->state.conn >= C_CONNECTED) 1300 if (mdev->state.conn >= C_CONNECTED)
1301 drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE)); 1301 drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE));
1302 } 1302 }
1303 req_mod(req, ok ? handed_over_to_network : send_failed); 1303 req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED);
1304 1304
1305 return ok; 1305 return ok;
1306} 1306}