Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346134
b: refs/heads/master
c: 376694a
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent ff4144d commit 850bfa5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bcd2521827bb7c418a83a77474c449d6496d55c
refs/heads/master: 376694a0543f5da194d9c6e102cfcd023ffac949
11 changes: 3 additions & 8 deletions trunk/drivers/block/drbd/drbd_actlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ void drbd_al_begin_io(struct drbd_conf *mdev, struct drbd_interval *i)
/* Double check: it may have been committed by someone else,
* while we have been waiting for the lock. */
if (mdev->act_log->pending_changes) {
int err;
err = al_write_transaction(mdev);
al_write_transaction(mdev);
mdev->al_writ_cnt++;

spin_lock_irq(&mdev->al_lock);
Expand All @@ -290,7 +289,6 @@ void drbd_al_complete_io(struct drbd_conf *mdev, struct drbd_interval *i)
unsigned enr;
struct lc_element *extent;
unsigned long flags;
bool wake = false;

spin_lock_irqsave(&mdev->al_lock, flags);

Expand All @@ -300,8 +298,7 @@ void drbd_al_complete_io(struct drbd_conf *mdev, struct drbd_interval *i)
dev_err(DEV, "al_complete_io() called on inactive extent %u\n", enr);
continue;
}
if (lc_put(mdev->act_log, extent) == 0)
wake = true;
lc_put(mdev->act_log, extent);
}
spin_unlock_irqrestore(&mdev->al_lock, flags);
wake_up(&mdev->al_wait);
Expand Down Expand Up @@ -730,7 +727,7 @@ void __drbd_set_in_sync(struct drbd_conf *mdev, sector_t sector, int size,
int __drbd_set_out_of_sync(struct drbd_conf *mdev, sector_t sector, int size,
const char *file, const unsigned int line)
{
unsigned long sbnr, ebnr, lbnr, flags;
unsigned long sbnr, ebnr, flags;
sector_t esector, nr_sectors;
unsigned int enr, count = 0;
struct lc_element *e;
Expand All @@ -752,8 +749,6 @@ int __drbd_set_out_of_sync(struct drbd_conf *mdev, sector_t sector, int size,
if (!expect(esector < nr_sectors))
esector = nr_sectors - 1;

lbnr = BM_SECT_TO_BIT(nr_sectors-1);

/* we set it out of sync,
* we do not need to round anything here */
sbnr = BM_SECT_TO_BIT(sector);
Expand Down
13 changes: 2 additions & 11 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4324,7 +4324,7 @@ static void conn_disconnect(struct drbd_tconn *tconn)
{
struct drbd_conf *mdev;
enum drbd_conns oc;
int vnr, rv = SS_UNKNOWN_ERROR;
int vnr;

if (tconn->cstate == C_STANDALONE)
return;
Expand All @@ -4351,7 +4351,7 @@ static void conn_disconnect(struct drbd_tconn *tconn)
spin_lock_irq(&tconn->req_lock);
oc = tconn->cstate;
if (oc >= C_UNCONNECTED)
rv = _conn_request_state(tconn, NS(conn, C_UNCONNECTED), CS_VERBOSE);
_conn_request_state(tconn, NS(conn, C_UNCONNECTED), CS_VERBOSE);

spin_unlock_irq(&tconn->req_lock);

Expand All @@ -4361,7 +4361,6 @@ static void conn_disconnect(struct drbd_tconn *tconn)

static int drbd_disconnected(struct drbd_conf *mdev)
{
enum drbd_fencing_p fp;
unsigned int i;

/* wait for current activity to cease. */
Expand Down Expand Up @@ -4405,14 +4404,6 @@ static int drbd_disconnected(struct drbd_conf *mdev)

drbd_md_sync(mdev);

fp = FP_DONT_CARE;
if (get_ldev(mdev)) {
rcu_read_lock();
fp = rcu_dereference(mdev->ldev->disk_conf)->fencing;
rcu_read_unlock();
put_ldev(mdev);
}

/* serialize with bitmap writeout triggered by the state change,
* if any. */
wait_event(mdev->misc_wait, !test_bit(BITMAP_IO, &mdev->flags));
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
cpu = part_stat_lock();
part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
(void) cpu; /* The macro invocations above want the cpu argument, I do not like
the compiler warning about cpu only assigned but never used... */
part_inc_in_flight(&mdev->vdisk->part0, rw);
part_stat_unlock();
}
Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,6 @@ int drbd_bitmap_io_from_worker(struct drbd_conf *mdev,
static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
union drbd_state ns, enum chg_state_flags flags)
{
enum drbd_fencing_p fp;
struct sib_info sib;

sib.sib_reason = SIB_STATE_CHANGE;
Expand All @@ -1156,14 +1155,6 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
mdev->p_uuid[UI_FLAGS] &= ~((u64)2);
}

fp = FP_DONT_CARE;
if (get_ldev(mdev)) {
rcu_read_lock();
fp = rcu_dereference(mdev->ldev->disk_conf)->fencing;
rcu_read_unlock();
put_ldev(mdev);
}

/* Inform userspace about the change... */
drbd_bcast_event(mdev, &sib);

Expand Down

0 comments on commit 850bfa5

Please sign in to comment.