Andreas Gruenbacher [Mon, 4 Apr 2011 13:30:24 +0000 (15:30 +0200)]
drbd: Make all asynchronous command handlers return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 4 Apr 2011 11:09:15 +0000 (13:09 +0200)]
drbd: validate_req_change_req_state(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 22 Mar 2011 12:17:47 +0000 (13:17 +0100)]
drbd: Removed outdated comments and code that envisioned VNRs in header 95
Since have now header 100, that has space for 16 bit volume numbers,
the high byte of the length in header 95 is no longer reserved for
8 bit volume numbers.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 30 Mar 2011 14:00:17 +0000 (16:00 +0200)]
drbd: Introduce protocol version 100 headers
The 8 byte header finally becomes too small. With the protocol 100 header we
have 16 bit for the volume number, proper 32 bit for the data length, and
32 bit for further extensions in the future.
Previous versions of drbd are using version 80 headers for all packets
short enough for protocol 80. They support both header versions in
worker context, but only version 80 headers in asynchronous context.
For backwards compatibility, continue to use version 80 headers for
short packets before protocol version 100.
From protocol version 100 on, use the same header version for all
packets.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 30 Mar 2011 10:54:42 +0000 (12:54 +0200)]
drbd: Remove headers from on-the-wire data structures (struct p_*)
Prepare the introduction of the protocol 100 headers. The actual protocol
header is removed for the packet declarations. I.e. allow us to use the
packets with different headers.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 30 Mar 2011 09:53:51 +0000 (11:53 +0200)]
drbd: Remove some fixed header size assumptions
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 30 Mar 2011 23:15:34 +0000 (01:15 +0200)]
drbd: Remove now-unused int_dig_out buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 28 Mar 2011 12:23:08 +0000 (14:23 +0200)]
drbd: Replace and remove old primitives
Centralize sock->mutex locking and unlocking in [drbd|conn]_prepare_command()
and [drbd|conn]_send_comman().
Therefore all *_send_* functions are touched to use these primitives instead
of drbd_get_data_sock()/drbd_put_data_sock() and former helper functions.
That change makes the *_send_* functions more standardized.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 30 Mar 2011 09:38:49 +0000 (11:38 +0200)]
drbd: Introduce drbd_header_size()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 29 Mar 2011 14:55:40 +0000 (16:55 +0200)]
drbd: Introduce new primitives for sending commands
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Fri, 1 Apr 2011 10:49:42 +0000 (12:49 +0200)]
drbd: drbd_send_ping(), drbd_send_ping(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 1 Mar 2011 10:08:28 +0000 (11:08 +0100)]
drbd: Use tconn in request_timer_fn()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 13:20:27 +0000 (15:20 +0200)]
drbd: Improved logging of state changes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 16:16:11 +0000 (18:16 +0200)]
drbd: Implemented IO thawing for multiple volumes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 16:15:49 +0000 (18:15 +0200)]
drbd: Implemented conn_lowest_disk()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 12:21:03 +0000 (14:21 +0200)]
drbd: Implemented conn_lowest_conn()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 12:01:02 +0000 (14:01 +0200)]
drbd: Calculate and provide ns_min to the w_after_conn_state_ch() work
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 11:20:58 +0000 (13:20 +0200)]
drbd: Renamed nms to ns_max
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Tue, 29 Mar 2011 08:52:01 +0000 (10:52 +0200)]
drbd: Introduced a new type union drbd_dev_state
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Mon, 28 Mar 2011 14:18:39 +0000 (16:18 +0200)]
drbd: Moved susp, susp_nod and susp_fen to the connection object
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Mon, 28 Mar 2011 14:48:11 +0000 (16:48 +0200)]
drbd: Renamed id_susp(union drbd_state s) to drbd_suspended(struct drbd_conf *)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Mon, 28 Mar 2011 13:40:12 +0000 (15:40 +0200)]
drbd: Introduced drbd_read_state()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Lars Ellenberg [Fri, 1 Apr 2011 08:38:30 +0000 (10:38 +0200)]
drbd: improvements to activate/deactivate multiple activity log extents
Recent commit drbd: get rid of bio_split, allow bios of "arbitrary" size
had a reference count leak: it only deactivated the first of several
activity log extents for intervals crossing extent boundaries.
This commit generalizes on bios spanning multiple activity log extents
in drbd_al_begin_io, and adds the necessary loop around lc_put in
drbd_al_complete_io as well.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Lars Ellenberg [Thu, 31 Mar 2011 14:36:43 +0000 (16:36 +0200)]
drbd: get rid of bio_split, allow bios of "arbitrary" size
Where "arbitrary" size is currently 1 MiB, which is the BIO_MAX_SIZE
for architectures with 4k PAGE_CACHE_SIZE (most).
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Lars Ellenberg [Thu, 31 Mar 2011 14:00:51 +0000 (16:00 +0200)]
drbd: prepare to activate two activity log extents at once
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Lars Ellenberg [Thu, 31 Mar 2011 13:18:56 +0000 (15:18 +0200)]
drbd: preparation commit, pass drbd_interval to drbd_al_begin/complete_io
We want to avoid bio_split for bios crossing activity log boundaries.
So we may need to activate two activity log extents "atomically".
drbd_al_begin_io() needs to know more than just the start sector.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Lars Ellenberg [Thu, 31 Mar 2011 10:06:48 +0000 (12:06 +0200)]
drbd: introduce the "initialized" activity log transaction type
So we can initialize a clean on disk activity log area,
without the module complaining with loud assert messages
because of checksum or magic value mismatches.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 28 Mar 2011 15:05:50 +0000 (17:05 +0200)]
drbd: Change how the "handshake" packets are called
Packets of type P_HAND_SHAKE define which protocol versions and features
a node supports. For clarity, call those packets P_CONNECTION_FEATURES
instead.
(This does not determine the features that a specific drbd device
supports, such as drbd protocol A, B, C.)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 28 Mar 2011 14:44:40 +0000 (16:44 +0200)]
drbd: Change how the initial packets are called
The first packets exchanged when a connection is established are
referred to as P_HAND_SHAKE_S and P_HAND_SHAKE_M in the code, followed
by P_HAND_SHAKE packets. To avoid confusion between these two unrelated
things, call the initial packets P_INITIAL_DATA and P_INITIAL_META.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 21 Mar 2011 23:49:36 +0000 (00:49 +0100)]
drbd: _conn_send_cmd(), _drbd_send_cmd(): Pass a struct drbd_socket instead of a plain socket
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 28 Mar 2011 14:33:12 +0000 (16:33 +0200)]
drbd: drbd_connect(): Initialize struct drbd_socket before sending anything
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Fri, 25 Mar 2011 14:37:43 +0000 (15:37 +0100)]
drbd: Map from (connection, volume number) to device in the asender handlers
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Fri, 25 Mar 2011 14:16:26 +0000 (15:16 +0100)]
drbd: Pass struct packet_info down to the asender receive functions
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Mon, 28 Mar 2011 12:48:01 +0000 (14:48 +0200)]
drbd: Do not segfault if a sync dependency reaches a diskless device
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Mon, 28 Mar 2011 10:55:03 +0000 (12:55 +0200)]
drbd: Allow to disconnect if one volume is diskless
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Fri, 25 Mar 2011 14:11:30 +0000 (15:11 +0100)]
drbd: Print common state changes of all volumes as connection state changes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Fri, 25 Mar 2011 13:31:11 +0000 (14:31 +0100)]
drbd: Fixed logging of old connection state
During a disconnect the oc variable in _conn_request_state()
could become outdated. Determin the common old state after
sleeping.
While at it, I implemented that for all parts of the state
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Fri, 25 Mar 2011 11:02:20 +0000 (12:02 +0100)]
drbd: Use the idr_for_each_entry() iterator instead of idr_for_each()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Fri, 25 Mar 2011 01:43:51 +0000 (02:43 +0100)]
drbd: Map from (connection, volume number) to device in the receive handlers
The receive handlers do not all handle unknown volume numbers the same
way.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 23:57:38 +0000 (00:57 +0100)]
drbd: Pass struct packet_info down to the receive functions
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 23:35:45 +0000 (00:35 +0100)]
drbd: Remove useless error messages
These messages can only trigger in case there is a pretty obvious
internal programming error.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 23:01:04 +0000 (00:01 +0100)]
drbd: A small cleanup in drbdd()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 20:31:38 +0000 (21:31 +0100)]
drbd: _drbd_send_bitmap(): Use the pre-allocated send buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 20:17:52 +0000 (21:17 +0100)]
drbd: Preallocate one page per drbd_socket as a send buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 20:23:50 +0000 (21:23 +0100)]
drbd: receive_bitmap(): Use the pre-allocated receive buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 17:07:54 +0000 (18:07 +0100)]
drbd: Preallocate one page per drbd_socket as a receive buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner [Thu, 24 Mar 2011 10:03:07 +0000 (11:03 +0100)]
drbd: Converted drbd_try_outdate_peer() from mdev to tconn
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 22 Mar 2011 16:20:45 +0000 (17:20 +0100)]
drbd: Rename the DCBP_* functions to dcbp_* and move them to where they are used
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 22 Mar 2011 15:03:43 +0000 (16:03 +0100)]
drbd: Make _drbd_send_bitmap() static
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 22 Mar 2011 09:55:48 +0000 (10:55 +0100)]
drbd: Move drbd_send_ping() and drbd_send_ping_ack() to drbd_main.c
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 21 Mar 2011 13:10:15 +0000 (14:10 +0100)]
drbd: Always use the same protocol version for the same peer
There is no need to send protocol 80 headers to peers that understand
protocol 95 headers. Make sure that we don't send protocol 95 headers
until we have agreed upon a protocol version with our peer, though.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 13:31:22 +0000 (14:31 +0100)]
drbd: drbd_connected(): Return an error code upon failure.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 24 Mar 2011 02:28:04 +0000 (03:28 +0100)]
drbd: Introduce and use drbd_recv_all_warn()
The pattern of receiving a fixed number of bytes and warning if a short
packet is received and the receiver has not actively been interruped is
repeated many times; clean that up.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 21 Dec 2010 11:38:39 +0000 (12:38 +0100)]
drbd: Get rid of typedef drbd_work_cb
This type is not used anywhere else.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Sun, 19 Dec 2010 22:53:14 +0000 (23:53 +0100)]
drbd: Rename various functions from *_oos_* to *_out_of_sync_* for clarity
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Sun, 19 Dec 2010 19:48:29 +0000 (20:48 +0100)]
drbd: drbd_may_do_local_read(): Use bool/true/false
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Fri, 17 Dec 2010 22:08:33 +0000 (23:08 +0100)]
drbd: Remove unnecessary assertion
This is also checked further below in the same function.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 13 Dec 2010 21:50:15 +0000 (22:50 +0100)]
drbd: Remove duplicate initialization
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 13 Dec 2010 01:25:41 +0000 (02:25 +0100)]
drbd: drbd_md_sync_page_io(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 13 Dec 2010 01:20:47 +0000 (02:20 +0100)]
drbd: _drbd_md_sync_page_io(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Mon, 13 Dec 2010 00:44:11 +0000 (01:44 +0100)]
drbd: drbd_bm_read() never returns a positive value through drbd_bitmap_io()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 17 Mar 2011 11:10:19 +0000 (12:10 +0100)]
drbd: Make all command handlers return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 17 Mar 2011 16:15:20 +0000 (17:15 +0100)]
drbd: Add drbd_recv_all(): Receive an entire buffer
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Thu, 9 Dec 2010 23:45:25 +0000 (00:45 +0100)]
drbd: send_bitmap_rle_or_plain(): Error handling cleanup
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:58:27 +0000 (17:58 +0100)]
drbd: recv_resync_read(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:54:02 +0000 (17:54 +0100)]
drbd: recv_dless_read(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:50:50 +0000 (17:50 +0100)]
drbd: drbd_drain_block(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:31:52 +0000 (17:31 +0100)]
drbd: drbd_recv_header(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:22:39 +0000 (17:22 +0100)]
drbd: decode_header(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 16:16:12 +0000 (17:16 +0100)]
drbd: drbd_process_done_ee(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 14:31:39 +0000 (15:31 +0100)]
drbd: Make all worker callbacks return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 13:53:19 +0000 (14:53 +0100)]
drbd: Temporarily change the return type of all worker callbacks
This helps to ensure that we don't miss one of them when changing their
return value semantics.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 15:08:22 +0000 (16:08 +0100)]
drbd: drbd_send_short_cmd(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 10:52:58 +0000 (11:52 +0100)]
drbd: drbd_send_dblock(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 10:46:33 +0000 (11:46 +0100)]
drbd: _drbd_send_bio(), _drbd_send_zc_bio(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 10:35:20 +0000 (11:35 +0100)]
drbd: drbd_send_block(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 09:49:09 +0000 (10:49 +0100)]
drbd: _drbd_send_zc_ee(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 09:44:16 +0000 (10:44 +0100)]
drbd: _drbd_send_page(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 08:41:10 +0000 (09:41 +0100)]
drbd: _drbd_no_send_page(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:39:44 +0000 (01:39 +0100)]
drbd: drbd_send_oos(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:37:21 +0000 (01:37 +0100)]
drbd: drbd_send_drequest_csum(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:34:24 +0000 (01:34 +0100)]
drbd: drbd_send_drequest(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:31:39 +0000 (01:31 +0100)]
drbd: drbd_send_ov_request(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:31:39 +0000 (01:31 +0100)]
drbd: drbd_send_ack_ex(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:30:14 +0000 (01:30 +0100)]
drbd: drbd_send_ack_{dp,rp}(): Return void: the result is never used
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 14:39:08 +0000 (15:39 +0100)]
drbd: drbd_send_ack(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:27:22 +0000 (01:27 +0100)]
drbd: _drbd_send_ack(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:25:28 +0000 (01:25 +0100)]
drbd: drbd_send_b_ack(): Return void: the result is never used
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:20:38 +0000 (01:20 +0100)]
drbd: drbd_send_sr_reply(): Return void: the result is never used
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:19:27 +0000 (01:19 +0100)]
drbd: drbd_send_state_req(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:17:35 +0000 (01:17 +0100)]
drbd: conn_send_state_req(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:16:25 +0000 (01:16 +0100)]
drbd: _conn_send_state_req(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:12:50 +0000 (01:12 +0100)]
drbd: drbd_send_sizes(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:09:01 +0000 (01:09 +0100)]
drbd: drbd_gen_and_send_sync_uuid(): Return void: the result is never used
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:07:20 +0000 (01:07 +0100)]
drbd: drbd_send_uuids() and its variants: Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Wed, 16 Mar 2011 00:05:37 +0000 (01:05 +0100)]
drbd: drbd_send_protocol(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 15 Mar 2011 23:54:19 +0000 (00:54 +0100)]
drbd: drbd_send_handshake(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 15 Mar 2011 23:50:00 +0000 (00:50 +0100)]
drbd: drbd_send_state(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 15 Mar 2011 23:43:02 +0000 (00:43 +0100)]
drbd: drbd_send_sync_param(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Andreas Gruenbacher [Tue, 15 Mar 2011 23:38:58 +0000 (00:38 +0100)]
drbd: drbd_send_cmd(): Return 0 upon success and an error code otherwise
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>