14 Jun, 2016

2 commits

  • crypto_alloc_hash returns an ERR_PTR(), not NULL.

    Also reset peer_integrity_tfm to NULL, to not call crypto_free_hash()
    on an errno in the cleanup path.

    Reported-by: Insu Yun

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Lars Ellenberg
     
  • This contains various cosmetic fixes ranging from simple typos to
    const-ifying, and using booleans properly.

    Original commit messages from Fabian's patch set:
    drbd: debugfs: constify drbd_version_fops
    drbd: use seq_put instead of seq_print where possible
    drbd: include linux/uaccess.h instead of asm/uaccess.h
    drbd: use const char * const for drbd strings
    drbd: kerneldoc warning fix in w_e_end_data_req()
    drbd: use unsigned for one bit fields
    drbd: use bool for peer is_ states
    drbd: fix typo
    drbd: use | for bitmask combination
    drbd: use true/false for bool
    drbd: fix drbd_bm_init() comments
    drbd: introduce peer state union
    drbd: fix maybe_pull_ahead() locking comments
    drbd: use bool for growing
    drbd: remove redundant declarations
    drbd: replace if/BUG by BUG_ON

    Signed-off-by: Fabian Frederick
    Signed-off-by: Roland Kammerer
    Signed-off-by: Jens Axboe

    Fabian Frederick
     

26 Nov, 2015

4 commits


11 Nov, 2014

1 commit

  • . Update comments
    . drbd_set_{in,out_of}_sync(): Remove unused parameters
    . Move common code into adm_del_resource()
    . Redefine ERR_MINOR_EXISTS -> ERR_MINOR_OR_VOLUME_EXISTS

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Andreas Gruenbacher
     

11 Jul, 2014

1 commit


10 Jul, 2014

1 commit

  • Some parts of the code assumed that get_ldev_if_state(device, D_ATTACHING)
    is sufficient to access the ldev member of the device object. That was
    wrong. ldev may not be there or might be freed at any time if the device
    has a disk state of D_ATTACHING.

    bm_rw()
    Documented that drbd_bm_read() is only called from drbd_adm_attach.
    drbd_bm_write() is only called when a reference is held, and it is
    documented that a caller has to hold a reference before calling
    drbd_bm_write()

    drbd_bm_write_page()
    Use get_ldev() instead of get_ldev_if_state(device, D_ATTACHING)

    drbd_bmio_set_n_write()
    No longer use get_ldev_if_state(device, D_ATTACHING). All callers
    hold a reference to ldev now.

    drbd_bmio_clear_n_write()
    All callers where holding a reference of ldev anyways. Remove the
    misleading get_ldev_if_state(device, D_ATTACHING)

    drbd_reconsider_max_bio_size()
    Removed the get_ldev_if_state(device, D_ATTACHING). All callers
    now pass a struct drbd_backing_dev* when they have a proper
    reference, or a NULL pointer.
    Before this fix, the receiver could trigger a NULL pointer
    deref when in drbd_reconsider_max_bio_size()

    drbd_bump_write_ordering()
    Used get_ldev_if_state(device, D_ATTACHING) with the wrong assumption.
    Remove it, and allow the caller to pass in a struct drbd_backing_dev*
    when the caller knows that accessing this bdev is safe.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Philipp Reisner
     

17 Feb, 2014

2 commits


28 Jun, 2013

1 commit

  • Allow to change the AL layout with an resize operation. For that
    the reisze command gets two new fields: al_stripes and al_stripe_size.

    In order to make the operation crash save:
    1) Lock out all IO and MD-IO
    2) Write the super block with MDF_PRIMARY_IND clear
    3) write the bitmap to the new location (all zeros, since
    we allow only while connected)
    4) Initialize the new AL-area
    5) Write the super block with the restored MDF_PRIMARY_IND.
    6) Unfreeze all IO

    Since the AL-layout has no influence on the protocol, this operation
    needs to be beforemed on both sides of a resource (if intended).

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Philipp Reisner
    Signed-off-by: Jens Axboe

    Philipp Reisner
     

29 Mar, 2013

2 commits

  • It was unnoticed for some time that assigning to current->policy is
    no longer sufficient to set a real time priority for a kernel thread.

    Reported-by: Charlie Suffin
    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Philipp Reisner
     
  • The issue was that if the connection broke while we did the
    gracefull state change to C_DISCONNECTING (C_TEARDOWN), then
    we returned a success code from the state engine. (SS_CW_NO_NEED)

    The result of that is that we missed to call the fence-peer
    script in such a case.

    Fixed that by introducing a new error code (SS_OUTDATE_WO_CONN).
    This one should never reach back into user space.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Jens Axboe

    Philipp Reisner
     

09 Nov, 2012

3 commits

  • Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Philipp Reisner
     
  • If for some reason (typically "split-brained" cluster manager)
    drbd replica data has diverged, we can chose a victim,
    and reconnect using "--discard-my-data", causing the victim
    to become sync-target, fetching all changed blocks from the peer.

    If we are Primary, we are potentially in use, and we refuse to
    "roll back" changes to the data below the page cache and other users.

    Rename the error symbol for this to ERR_DISCARD_IMPOSSIBLE.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Lars Ellenberg
     
  • We now can schedule only a specific range of sectors for online verify,
    or interrupt a running verify without interrupting the connection.

    Had to bump the protocol version differently, we are now 101.
    Added verify_can_do_stop_sector() { protocol >= 97 && protocol != 100; }

    Also, the return value convention for worker callbacks has changed,
    we returned "true/false" for "keep the connection up" in 8.3,
    we return 0 for success and
    Signed-off-by: Lars Ellenberg

    Lars Ellenberg
     

08 Nov, 2012

11 commits


04 Nov, 2012

2 commits


14 Oct, 2011

3 commits


28 Sep, 2011

1 commit

  • The new header layout will only be used if the peer supports
    it of course.

    For the first packet and the handshake packet the old (h80)
    layout is used for compatibility reasons.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Philipp Reisner
     

25 Aug, 2011

1 commit


24 May, 2011

2 commits

  • Found these with the help of ispell -l.

    Signed-off-by: Bart Van Assche
    Signed-off-by: Lars Ellenberg
    Signed-off-by: Philipp Reisner

    Bart Van Assche
     
  • An administrative detach used to request a state change directly to D_DISKLESS,
    first suspending IO to avoid the last put_ldev() occuring from an endio handler,
    potentially in irq context.

    This is not enough on the receiving side (typically secondary), we may miss
    some peer_req on the way to local disk, which then may do the last put_ldev()
    from their drbd_peer_request_endio().

    This patch makes the detach always go through the intermediate D_FAILED state.
    We may consider to rename it D_DETACHING.

    Alternative approach would be to create yet an other work item to be scheduled
    on the worker, do the destructor work from there, and get the timing right.

    manually picked commit 564040f from the drbd 8.4 branch.

    Signed-off-by: Philipp Reisner
    Signed-off-by: Lars Ellenberg

    Lars Ellenberg
     

31 Mar, 2011

1 commit


10 Mar, 2011

2 commits